Merge pull request #217897 from DavidCromp/nest

nest: fix Python & Darwin

authored by

Weijia Wang and committed by
GitHub
c8ba0464 6c585cde

+19 -4
+19 -4
pkgs/applications/science/biology/nest/default.nix
··· 5 , cmake 6 , gsl 7 , libtool 8 , mpi 9 , nest 10 , pkg-config 11 , python3 12 , readline 13 , autoPatchelfHook ··· 37 nativeBuildInputs = [ 38 cmake 39 pkg-config 40 - autoPatchelfHook 41 ]; 42 43 buildInputs = [ 44 gsl 45 readline 46 libtool # libltdl 47 ] ++ lib.optionals withPython [ 48 python3 49 python3.pkgs.cython 50 - ] ++ lib.optional withMpi mpi; 51 52 cmakeFlags = [ 53 "-Dwith-python=${if withPython then "ON" else "OFF"}" 54 "-Dwith-mpi=${if withMpi then "ON" else "OFF"}" 55 - "-Dwith-openmp=${if stdenv.isDarwin then "OFF" else "ON"}" 56 ]; 57 58 passthru.tests.version = testers.testVersion { 59 package = nest; 60 command = "nest --version"; ··· 64 description = "NEST is a command line tool for simulating neural networks"; 65 homepage = "https://www.nest-simulator.org/"; 66 license = licenses.gpl2; 67 - maintainers = with maintainers; [ jiegec ]; 68 platforms = platforms.unix; 69 }; 70 }
··· 5 , cmake 6 , gsl 7 , libtool 8 + , findutils 9 + , llvmPackages 10 , mpi 11 , nest 12 , pkg-config 13 + , boost 14 , python3 15 , readline 16 , autoPatchelfHook ··· 40 nativeBuildInputs = [ 41 cmake 42 pkg-config 43 + findutils 44 ]; 45 46 buildInputs = [ 47 gsl 48 readline 49 libtool # libltdl 50 + boost 51 ] ++ lib.optionals withPython [ 52 python3 53 python3.pkgs.cython 54 + ] ++ lib.optional withMpi mpi 55 + ++ lib.optional stdenv.isDarwin llvmPackages.openmp; 56 + 57 + propagatedBuildInputs = with python3.pkgs; [ 58 + numpy 59 + ]; 60 61 cmakeFlags = [ 62 "-Dwith-python=${if withPython then "ON" else "OFF"}" 63 "-Dwith-mpi=${if withMpi then "ON" else "OFF"}" 64 + "-Dwith-openmp=ON" 65 ]; 66 67 + postInstall = '' 68 + # Alternative to autoPatchElf, moves libraries where 69 + # Nest expects them to be 70 + find $out/lib/nest -type f -exec ln -s {} $out/lib \; 71 + ''; 72 + 73 passthru.tests.version = testers.testVersion { 74 package = nest; 75 command = "nest --version"; ··· 79 description = "NEST is a command line tool for simulating neural networks"; 80 homepage = "https://www.nest-simulator.org/"; 81 license = licenses.gpl2; 82 + maintainers = with maintainers; [ jiegec davidcromp ]; 83 platforms = platforms.unix; 84 }; 85 }