From 3eb461dedb762289f3d5c9aa029cfc36a4b7f3c2 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Sun, 2 Dec 2018 11:11:38 -0500 Subject: [PATCH 1/3] pagmo2: 2.8 -> 2.9 fix broken package corrects the library nlopt location as well. --- pkgs/development/libraries/pagmo2/default.nix | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/pkgs/development/libraries/pagmo2/default.nix b/pkgs/development/libraries/pagmo2/default.nix index c680efa95f89..842fae5ea938 100644 --- a/pkgs/development/libraries/pagmo2/default.nix +++ b/pkgs/development/libraries/pagmo2/default.nix @@ -11,32 +11,34 @@ stdenv.mkDerivation rec { name = "pagmo2-${version}"; - version = "2.8"; + version = "2.9"; src = fetchFromGitHub { owner = "esa"; repo = "pagmo2"; rev = "v${version}"; - sha256 = "1xwxamcn3fkwr62jn6bkanrwy0cvsksf75hfwx4fvl56awnbz41z"; + sha256 = "0al2i59m5qr83wz5n5408zvys0b3mc40rszf0l5b9a0gp1axj400"; }; - buildInputs = [ cmake eigen nlopt ipopt boost ]; + nativeBuildInputs = [ cmake ]; + buildInputs = [ eigen nlopt ipopt boost ]; - preBuild = '' - cp -r $src/* . - ''; + cmakeFlags = [ + "-DPAGMO_BUILD_TESTS=no" + "-DPAGMO_WITH_EIGEN3=yes" + "-DPAGMO_WITH_NLOPT=yes" + "-DNLOPT_LIBRARY=${nlopt}/lib/libnlopt.so" + "-DPAGMO_WITH_IPOPT=yes" + "-DCMAKE_CXX_FLAGS='-fuse-ld=gold'" + ]; - cmakeFlags = [ "-DPAGMO_BUILD_TESTS=no" - "-DPAGMO_WITH_EIGEN3=yes" "-DPAGMO_WITH_NLOPT=yes" - "-DNLOPT_LIBRARY=${nlopt}/lib/libnlopt_cxx.so" "-DPAGMO_WITH_IPOPT=yes" - "-DCMAKE_CXX_FLAGS='-fuse-ld=gold'" ]; - - # All but one test pass skip for now (tests also take about 30 min to compile) + # tests pass but take 30+ minutes doCheck = false; - meta = { + meta = with stdenv.lib; { homepage = https://esa.github.io/pagmo2/; description = "Scientific library for massively parallel optimization"; - license = stdenv.lib.licenses.gpl3Plus; + license = licenses.gpl3Plus; + maintainers = [ maintainers.costrouc ]; }; } From 19d077a157caabb65133e48fbd109e94932ffab3 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Sun, 2 Dec 2018 11:21:50 -0500 Subject: [PATCH 2/3] pythonPackages.pygmo: 2.8 -> 2.9 refactor fix broken package Introduce a `pagmo2WithPython` which overrides the pagmo2 expression and enables the pygmo build. Then hand it over to `buildPythonPackage` by making it the src to produce a usable package. --- .../python-modules/pygmo/default.nix | 47 ++++++++++--------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/pygmo/default.nix b/pkgs/development/python-modules/pygmo/default.nix index 2500121dc9e6..30e4444f5527 100644 --- a/pkgs/development/python-modules/pygmo/default.nix +++ b/pkgs/development/python-modules/pygmo/default.nix @@ -1,7 +1,6 @@ { lib , fetchFromGitHub , buildPythonPackage -, cmake , eigen , nlopt , ipopt @@ -11,38 +10,44 @@ , cloudpickle , ipyparallel , numba +, python }: -buildPythonPackage rec { - pname = "pygmo"; - version = "2.8"; - - src = fetchFromGitHub { - owner = "esa"; - repo = "pagmo2"; - rev = "v${version}"; - sha256 = "1xwxamcn3fkwr62jn6bkanrwy0cvsksf75hfwx4fvl56awnbz41z"; - }; - - buildInputs = [ cmake eigen nlopt ipopt boost pagmo2 ]; +let propagatedBuildInputs = [ numpy cloudpickle ipyparallel numba ]; - preBuild = '' - cp -v -r $src/* . - cmake -DCMAKE_INSTALL_PREFIX=$out -DPAGMO_BUILD_TESTS=no -DCMAKE_SYSTEM_NAME=Linux -DPagmo_DIR=${pagmo2} -DPAGMO_BUILD_PYGMO=yes -DPAGMO_BUILD_PAGMO=no -DPAGMO_WITH_EIGEN3=yes -DPAGMO_WITH_NLOPT=yes -DNLOPT_LIBRARY=${nlopt}/lib/libnlopt_cxx.so -DPAGMO_WITH_IPOPT=yes -DIPOPT=${ipopt} + pagmo2WithPython = pagmo2.overrideAttrs (oldAttrs: { + cmakeFlags = oldAttrs.cmakeFlags ++ [ + "-DPAGMO_BUILD_PYGMO=yes" + "-DPAGMO_BUILD_PAGMO=no" + "-DPagmo_DIR=${pagmo2}" + ]; + buildInputs = [ eigen nlopt ipopt boost pagmo2 ] ++ propagatedBuildInputs; + postInstall = '' + mv wheel $out + ''; + }); - make install - mv $out/lib/python*/site-packages/pygmo wheel +in buildPythonPackage rec { + pname = "pygmo"; + version = pagmo2WithPython.version; + + inherit propagatedBuildInputs; + + src = pagmo2WithPython; + + preBuild = '' + mv ${python.sitePackages}/pygmo wheel cd wheel ''; # dont do tests doCheck = false; - meta = { + meta = with lib; { description = "Parallel optimisation for Python"; homepage = https://esa.github.io/pagmo2/; - license = lib.licenses.gpl3Plus; - maintainers = with lib.maintainers; [ costrouc ]; + license = licenses.gpl3Plus; + maintainers = [ maintainers.costrouc ]; }; } From 66a6445f6671bf55807ecdd61e99371b2a34a986 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 18 Nov 2018 15:27:07 -0800 Subject: [PATCH 3/3] python36Packages.ase: 3.16.2 -> 3.17.0 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python3.6-ase/versions --- pkgs/development/python-modules/ase/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/ase/default.nix b/pkgs/development/python-modules/ase/default.nix index 1f7b9419278e..3a466170c77c 100644 --- a/pkgs/development/python-modules/ase/default.nix +++ b/pkgs/development/python-modules/ase/default.nix @@ -1,5 +1,5 @@ { lib -, fetchurl +, fetchPypi , buildPythonPackage , numpy , scipy @@ -10,12 +10,12 @@ }: buildPythonPackage rec { - version = "3.16.2"; pname = "ase"; + version = "3.17.0"; - src = fetchurl { - url = "https://gitlab.com/${pname}/${pname}/-/archive/${version}/${pname}-${version}.tar.gz"; - sha256 = "171j3f4a261cfnqjq98px5fldxql65i3jgf60wc945xvh0mbc8ds"; + src = fetchPypi { + inherit pname version; + sha256 = "1d4gxypaahby45zcpl0rffcn2z7n55dg9lcd8sv6jjsmbbf9vr4g"; }; propagatedBuildInputs = [ numpy scipy matplotlib flask pillow psycopg2 ]; @@ -27,10 +27,10 @@ buildPythonPackage rec { # tests just hang most likely due to something with subprocesses and cli doCheck = false; - meta = { + meta = with lib; { description = "Atomic Simulation Environment"; homepage = https://wiki.fysik.dtu.dk/ase/; - license = lib.licenses.lgpl21Plus; - maintainers = with lib.maintainers; [ costrouc ]; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ costrouc ]; }; }