From 1c87fac0b981b1cf6daf1866cc4266b6b1e352bc Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Apr 2019 17:10:47 -0400 Subject: [PATCH 1/8] symengine: init at 0.3.0 --- .../python-modules/symengine/default.nix | 43 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/symengine/default.nix diff --git a/pkgs/development/python-modules/symengine/default.nix b/pkgs/development/python-modules/symengine/default.nix new file mode 100644 index 00000000000..7e10c02460e --- /dev/null +++ b/pkgs/development/python-modules/symengine/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, fetchPypi +, cython +, cmake +, symengine +, nose +}: + +buildPythonPackage rec { + pname = "symengine"; + version = "0.3.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "e86d13aadc9f765f2c5462da32950edd36d1a0a52dbfc96e766be3689957c04d"; + }; + + postConfigure = '' + substituteInPlace setup.py \ + --replace "\"cmake\"" "\"${cmake}/bin/cmake\"" + + substituteInPlace cmake/FindCython.cmake \ + --replace "SET(CYTHON_BIN cython" "SET(CYTHON_BIN ${cython}/bin/cython" + ''; + + buildInputs = [ cython cmake ]; + + setupPyBuildFlags = [ "--symengine-dir=${symengine}/" ]; + + # tests fail due to trying to import local "symengine" directory + doCheck = false; + checkPhase = '' + nosetests symengine/tests -v + ''; + + meta = with lib; { + description = "Python library providing wrappers to SymEngine"; + homepage = https://github.com/symengine/symengine.py; + license = licenses.mit; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a7e223e160c..c01b86d4f20 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5937,6 +5937,8 @@ in svtplay-dl = callPackage ../tools/misc/svtplay-dl { }; + symengine = callPackage ../development/libraries/symengine { }; + sysbench = callPackage ../development/tools/misc/sysbench {}; system-config-printer = callPackage ../tools/misc/system-config-printer { From b78f68944482245ff954bb7f0d951c0422781ba7 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Apr 2019 17:11:07 -0400 Subject: [PATCH 2/8] pythonPackages.cgen init at 2017.1 --- .../python-modules/cgen/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/cgen/default.nix diff --git a/pkgs/development/python-modules/cgen/default.nix b/pkgs/development/python-modules/cgen/default.nix new file mode 100644 index 00000000000..e0317249fe9 --- /dev/null +++ b/pkgs/development/python-modules/cgen/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytools +, numpy +, pytest +}: + +buildPythonPackage rec { + pname = "cgen"; + version = "2017.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "a04525d51ee975d37d590d6d82bf80a46e77f75187cccfd2248a89616a778795"; + }; + + checkInputs = [ pytest ]; + propagatedBuildInputs = [ + pytools + numpy + ]; + + checkPhase = '' + pytest + ''; + + meta = with lib; { + description = "C/C++ source generation from an AST"; + homepage = https://github.com/inducer/cgen; + license = licenses.mit; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9af4ca1d01c..43b305652cd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1196,6 +1196,8 @@ in { cement = callPackage ../development/python-modules/cement {}; + cgen = callPackage ../development/python-modules/cgen { }; + cgroup-utils = callPackage ../development/python-modules/cgroup-utils {}; chainer = callPackage ../development/python-modules/chainer { From 9f2bea930492d7886c64b66f275aa9fa94bade96 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Apr 2019 17:11:29 -0400 Subject: [PATCH 3/8] pythonPackages.genpy: init at 2016.1.3 --- .../python-modules/genpy/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/python-modules/genpy/default.nix diff --git a/pkgs/development/python-modules/genpy/default.nix b/pkgs/development/python-modules/genpy/default.nix new file mode 100644 index 00000000000..0a8344f8b92 --- /dev/null +++ b/pkgs/development/python-modules/genpy/default.nix @@ -0,0 +1,29 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytools +, numpy +, pytest +}: + +buildPythonPackage rec { + pname = "genpy"; + version = "2016.1.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "1c11726f1e8ace8bbdfc87816403c9a59f53a8c3d45c99187ae17c9725d87a91"; + }; + + propagatedBuildInputs = [ + pytools + numpy + ]; + + meta = with lib; { + description = "C/C++ source generation from an AST"; + homepage = https://github.com/inducer/genpy; + license = licenses.mit; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 43b305652cd..96a6839231a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5380,6 +5380,8 @@ in { gensim = callPackage ../development/python-modules/gensim { }; + genpy = callPackage ../development/python-modules/genpy { }; + cymem = callPackage ../development/python-modules/cymem { }; ftfy = callPackage ../development/python-modules/ftfy { }; From 9833f556f7246f3ac38ecc95190228035319bee4 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Apr 2019 17:12:04 -0400 Subject: [PATCH 4/8] pythonPackages.symengine: init at 0.3.0 --- .../libraries/symengine/default.nix | 38 +++++++++++++++++++ .../python-modules/symengine/default.nix | 29 +++++++++----- pkgs/top-level/python-packages.nix | 4 ++ 3 files changed, 61 insertions(+), 10 deletions(-) create mode 100644 pkgs/development/libraries/symengine/default.nix diff --git a/pkgs/development/libraries/symengine/default.nix b/pkgs/development/libraries/symengine/default.nix new file mode 100644 index 00000000000..7bdbeea1452 --- /dev/null +++ b/pkgs/development/libraries/symengine/default.nix @@ -0,0 +1,38 @@ +{ stdenv +, fetchFromGitHub +, cmake +, gmp +, flint +}: + +stdenv.mkDerivation rec { + name = "symengine-${version}"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "symengine"; + repo = "symengine"; + rev = "v${version}"; + sha256 = "1p7hk163rgn1zzvjlq4vskblry3s2rg5bc7xlr08wfqckfr47bqc"; + }; + + buildInputs = [ cmake gmp flint ]; + + cmakeFlags = [ + "-DWITH_FLINT=ON" + ]; + + doCheck = true; + checkPhase = '' + ctest + ''; + + meta = with stdenv.lib; { + description = "SymEngine is a fast symbolic manipulation library"; + homepage = https://github.com/symengine/symengine; + platforms = platforms.unix ++ platforms.windows; + license = licenses.bsd3; + maintainers = [ maintainers.costrouc ]; + }; + +} diff --git a/pkgs/development/python-modules/symengine/default.nix b/pkgs/development/python-modules/symengine/default.nix index 7e10c02460e..a2c0578f0c7 100644 --- a/pkgs/development/python-modules/symengine/default.nix +++ b/pkgs/development/python-modules/symengine/default.nix @@ -1,19 +1,23 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , cython , cmake , symengine -, nose +, pytest +, sympy +, python }: buildPythonPackage rec { pname = "symengine"; - version = "0.3.0"; + version = "0.4.0"; - src = fetchPypi { - inherit pname version; - sha256 = "e86d13aadc9f765f2c5462da32950edd36d1a0a52dbfc96e766be3689957c04d"; + src = fetchFromGitHub { + owner = "symengine"; + repo = "symengine.py"; + rev = "v${version}"; + sha256 = "07i9rwxphi4zgwc7y6f6qvq73iym2cx4k1bpd7rmd3wkpgrrfxqx"; }; postConfigure = '' @@ -26,12 +30,17 @@ buildPythonPackage rec { buildInputs = [ cython cmake ]; - setupPyBuildFlags = [ "--symengine-dir=${symengine}/" ]; + checkInputs = [ pytest sympy ]; + + setupPyBuildFlags = [ + "--symengine-dir=${symengine}/" + "--define=\"CYTHON_BIN=${cython}/bin/cython\"" + ]; - # tests fail due to trying to import local "symengine" directory - doCheck = false; checkPhase = '' - nosetests symengine/tests -v + mkdir empty + cd empty + ${python.interpreter} ../bin/test_python.py ''; meta = with lib; { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 96a6839231a..d926975fa8d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4607,6 +4607,10 @@ in { python-vagrant = callPackage ../development/python-modules/python-vagrant { }; + symengine = callPackage ../development/python-modules/symengine { + symengine = pkgs.symengine; + }; + sympy = callPackage ../development/python-modules/sympy { }; pilkit = callPackage ../development/python-modules/pilkit { }; From 2e3242191fd9f2c8e7d6ad452bc9304bf971035e Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Apr 2019 17:13:01 -0400 Subject: [PATCH 5/8] pythonPackages.loo-py: init at 2017.2 --- .../python-modules/loo-py/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/loo-py/default.nix diff --git a/pkgs/development/python-modules/loo-py/default.nix b/pkgs/development/python-modules/loo-py/default.nix new file mode 100644 index 00000000000..fe765f5ff0a --- /dev/null +++ b/pkgs/development/python-modules/loo-py/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytools +, pymbolic +, genpy +, cgen +, islpy +, six +, colorama +, mako +, pyopencl +, pytest +}: + +buildPythonPackage rec { + pname = "loo-py"; + version = "2017.2"; + + src = fetchPypi { + pname = "loo.py"; + inherit version; + sha256 = "c656992de48b328cdaccd7d1f14eb522b9dd5a1d0d15f54623f4ab18fd219abc"; + }; + + checkInputs = [ pytest ]; + propagatedBuildInputs = [ + pytools + pymbolic + genpy + cgen + islpy + six + colorama + mako + pyopencl + ]; + + # pyopencl._cl.LogicError: clGetPlatformIDs failed: PLATFORM_NOT_FOUND_KHR + doCheck = false; + checkPhase = '' + HOME=$(mktemp -d) pytest test + ''; + + meta = with lib; { + description = "A code generator for array-based code on CPUs and GPUs"; + homepage = https://mathema.tician.de/software/loopy; + license = licenses.mit; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d926975fa8d..9c8217a38bb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1740,6 +1740,8 @@ in { locket = callPackage ../development/python-modules/locket { }; + loo-py = callPackage ../development/python-modules/loo-py { }; + tblib = callPackage ../development/python-modules/tblib { }; s3fs = callPackage ../development/python-modules/s3fs { }; From b536b12b7bd7fa3886cc1f9d52c088ad54c9e99e Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Apr 2019 17:13:24 -0400 Subject: [PATCH 6/8] pythonPackages.pymbolic: init at 2018.1 --- .../python-modules/pymbolic/default.nix | 44 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/python-modules/pymbolic/default.nix diff --git a/pkgs/development/python-modules/pymbolic/default.nix b/pkgs/development/python-modules/pymbolic/default.nix new file mode 100644 index 00000000000..0d13b377b13 --- /dev/null +++ b/pkgs/development/python-modules/pymbolic/default.nix @@ -0,0 +1,44 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytools +, pytest +, six +, sympy +, pexpect +, symengine +}: + +buildPythonPackage rec { + pname = "pymbolic"; + version = "2018.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "a47d5524d6a3cdc8a028079ce632eeb45ceea7243272d234f250622087688207"; + }; + + postConfigure = '' + substituteInPlace setup.py \ + --replace "\"pytest>=2.3\"," "" + ''; + + checkInputs = [ sympy pexpect symengine pytest ]; + propagatedBuildInputs = [ + pytools + six + ]; + + # too many tests fail + doCheck = false; + checkPhase = '' + pytest test + ''; + + meta = with lib; { + description = "A package for symbolic computation"; + homepage = https://mathema.tician.de/software/pymbolic; + license = licenses.mit; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9c8217a38bb..a125a556b7d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2244,6 +2244,8 @@ in { pylama = callPackage ../development/python-modules/pylama { }; + pymbolic = callPackage ../development/python-modules/pymbolic { }; + pymediainfo = callPackage ../development/python-modules/pymediainfo { }; pyphen = callPackage ../development/python-modules/pyphen {}; From 150980c092d1c38a24754177c27d1dcb4c073567 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Apr 2019 17:27:00 -0400 Subject: [PATCH 7/8] pythonPackages.islpy: init at 2018.2 --- .../python-modules/islpy/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/islpy/default.nix diff --git a/pkgs/development/python-modules/islpy/default.nix b/pkgs/development/python-modules/islpy/default.nix new file mode 100644 index 00000000000..6274da95b32 --- /dev/null +++ b/pkgs/development/python-modules/islpy/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchPypi +, isl +, pytest +, cffi +, six +}: + +buildPythonPackage rec { + pname = "islpy"; + version = "2018.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "be422a53b576210a0bb9775866abb6580b1e568222fc3e4e39d9e82f6d1d7253"; + }; + + postConfigure = '' + substituteInPlace setup.py \ + --replace "\"pytest>=2\"," "" + ''; + + buildInputs = [ isl ]; + checkInputs = [ pytest ]; + propagatedBuildInputs = [ + cffi + six + ]; + + checkPhase = '' + pytest test + ''; + + meta = with lib; { + description = "Python wrapper around isl, an integer set library"; + homepage = https://github.com/inducer/islpy; + license = licenses.mit; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a125a556b7d..4b1124ea254 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2042,6 +2042,8 @@ in { isbnlib = callPackage ../development/python-modules/isbnlib { }; + islpy = callPackage ../development/python-modules/islpy { }; + itsdangerous = callPackage ../development/python-modules/itsdangerous { }; iniparse = callPackage ../development/python-modules/iniparse { }; From fe2d30e1c801f15892bf63ec4d81807627802b84 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 7 May 2019 11:27:07 -0400 Subject: [PATCH 8/8] symengine: init at 0.3.0 symengine: init at 0.3.0 --- pkgs/development/libraries/symengine/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/symengine/default.nix b/pkgs/development/libraries/symengine/default.nix index 7bdbeea1452..40e1a280aa2 100644 --- a/pkgs/development/libraries/symengine/default.nix +++ b/pkgs/development/libraries/symengine/default.nix @@ -3,26 +3,35 @@ , cmake , gmp , flint +, mpfr +, libmpc }: stdenv.mkDerivation rec { name = "symengine-${version}"; - version = "0.3.0"; + version = "0.4.0"; src = fetchFromGitHub { owner = "symengine"; repo = "symengine"; rev = "v${version}"; - sha256 = "1p7hk163rgn1zzvjlq4vskblry3s2rg5bc7xlr08wfqckfr47bqc"; + sha256 = "1kz893p3pmsw3gfwickk2nliw8p63yp89xriad7kpw4kmhvgr8gb"; }; - buildInputs = [ cmake gmp flint ]; + nativeBuildInputs = [ cmake ]; + + buildInputs = [ gmp flint mpfr libmpc ]; cmakeFlags = [ "-DWITH_FLINT=ON" + "-DINTEGER_CLASS=flint" + "-DWITH_SYMENGINE_THREAD_SAFE=yes" + "-DWITH_MPC=yes" + "-DBUILD_FOR_DISTRIBUTION=yes" ]; doCheck = true; + checkPhase = '' ctest '';