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 5 , cmake 6 6 , gsl 7 7 , libtool 8 + , findutils 9 + , llvmPackages 8 10 , mpi 9 11 , nest 10 12 , pkg-config 13 + , boost 11 14 , python3 12 15 , readline 13 16 , autoPatchelfHook ··· 37 40 nativeBuildInputs = [ 38 41 cmake 39 42 pkg-config 40 - autoPatchelfHook 43 + findutils 41 44 ]; 42 45 43 46 buildInputs = [ 44 47 gsl 45 48 readline 46 49 libtool # libltdl 50 + boost 47 51 ] ++ lib.optionals withPython [ 48 52 python3 49 53 python3.pkgs.cython 50 - ] ++ lib.optional withMpi mpi; 54 + ] ++ lib.optional withMpi mpi 55 + ++ lib.optional stdenv.isDarwin llvmPackages.openmp; 56 + 57 + propagatedBuildInputs = with python3.pkgs; [ 58 + numpy 59 + ]; 51 60 52 61 cmakeFlags = [ 53 62 "-Dwith-python=${if withPython then "ON" else "OFF"}" 54 63 "-Dwith-mpi=${if withMpi then "ON" else "OFF"}" 55 - "-Dwith-openmp=${if stdenv.isDarwin then "OFF" else "ON"}" 64 + "-Dwith-openmp=ON" 56 65 ]; 57 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 + 58 73 passthru.tests.version = testers.testVersion { 59 74 package = nest; 60 75 command = "nest --version"; ··· 64 79 description = "NEST is a command line tool for simulating neural networks"; 65 80 homepage = "https://www.nest-simulator.org/"; 66 81 license = licenses.gpl2; 67 - maintainers = with maintainers; [ jiegec ]; 82 + maintainers = with maintainers; [ jiegec davidcromp ]; 68 83 platforms = platforms.unix; 69 84 }; 70 85 }