From 371d17960dffa13bc5154f0aba4d2e7b3a11a1e2 Mon Sep 17 00:00:00 2001 From: Tom Hunger Date: Sat, 13 Aug 2016 17:30:57 +0100 Subject: [PATCH 1/2] libdynd: init at 0.7.2 --- .../development/libraries/libdynd/default.nix | 28 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/libdynd/default.nix diff --git a/pkgs/development/libraries/libdynd/default.nix b/pkgs/development/libraries/libdynd/default.nix new file mode 100644 index 000000000000..119c92d690de --- /dev/null +++ b/pkgs/development/libraries/libdynd/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub, cmake }: + +let version = "0.7.2"; in +stdenv.mkDerivation { + name = "libdynd-${version}"; + + src = fetchFromGitHub { + owner = "libdynd"; + repo = "libdynd"; + rev = "v${version}"; + sha256 = "0fkd5rawqni1cq51fmr76iw7ll4fmbahfwv4rglnsabbkylf73pr"; + }; + + cmakeFlags = [ + "-DDYND_BUILD_BENCHMARKS=OFF" + ]; + + buildInputs = [ cmake ]; + + outputs = [ "dev" "out" ]; + outputDoc = "dev"; + + meta = with stdenv.lib; { + description = "C++ dynamic ndarray library, with Python exposure."; + homepage = http://libdynd.org; + license = licenses.bsd2; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c0c95a56c039..d2636f0ee438 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1531,7 +1531,7 @@ in hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { }; unikey = callPackage ../tools/inputmethods/fcitx-engines/fcitx-unikey { }; - + m17n = callPackage ../tools/inputmethods/fcitx-engines/fcitx-m17n { }; mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc { @@ -9810,6 +9810,8 @@ in fetchurl = fetchurlBoot; }; + libdynd = callPackage ../development/libraries/libdynd { }; + zlog = callPackage ../development/libraries/zlog { }; zlibStatic = lowPrio (appendToName "static" (callPackage ../development/libraries/zlib { From 7845ca62193efd916ddad9a538154b4d11e7db54 Mon Sep 17 00:00:00 2001 From: Tom Hunger Date: Sat, 13 Aug 2016 18:02:01 +0100 Subject: [PATCH 2/2] dynd-python: init at 0.7.2 --- pkgs/top-level/python-packages.nix | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4c7f6308cbe1..360fe27bbee6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14849,6 +14849,39 @@ in modules // { }; }; + dynd = buildPythonPackage rec { + version = "0.7.2"; + name = "dynd-${version}"; + disabled = isPyPy; + + src = pkgs.fetchFromGitHub { + owner = "libdynd"; + repo = "dynd-python"; + rev = "v${version}"; + sha256 = "19igd6ibf9araqhq9bxmzbzdz05vp089zxvddkiik3b5gb7l17nh"; + }; + + # setup.py invokes git on build but we're fetching a tarball, so + # can't retrieve git version. We hardcode: + preConfigure = '' + substituteInPlace setup.py --replace "ver = check_output(['git', 'describe', '--dirty'," "ver = '${version}'" + substituteInPlace setup.py --replace "'--always', '--match', 'v*']).decode('ascii').strip('\n')" "" + ''; + + # Python 3 works but has a broken import test that I couldn't + # figure out. + doCheck = !isPy3k; + buildInputs = with pkgs; [ cmake libdynd.dev self.cython ]; + propagatedBuildInputs = with self; [ numpy pkgs.libdynd ]; + + meta = { + homepage = http://libdynd.org; + license = licenses.bsd2; + description = "Python exposure of dynd"; + maintainers = with maintainers; [ teh ]; + }; + }; + livestreamer = buildPythonPackage rec { version = "1.12.2"; name = "livestreamer-${version}";