21 stdenv.mkDerivation rec {
25 src = fetchFromGitHub {
27 repo = "nest-simulator";
29 hash = "sha256-hysOe1ZZpCClVOGo0+UeCP7imAakXrZlnJ4V95zfiyA=";
33 patchShebangs cmake/CheckFiles/check_return_val.sh
34 # fix PyNEST installation path
35 # it expects CMAKE_INSTALL_LIBDIR to be relative
36 substituteInPlace cmake/ProcessOptions.cmake \
37 --replace "\''${CMAKE_INSTALL_LIBDIR}/python" "lib/python"
53 ++ lib.optionals withPython [
57 ++ lib.optional withMpi mpi
58 ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp;
60 propagatedBuildInputs = with python3.pkgs; [
65 "-Dwith-python=${if withPython then "ON" else "OFF"}"
66 "-Dwith-mpi=${if withMpi then "ON" else "OFF"}"
71 # Alternative to autoPatchElf, moves libraries where
72 # Nest expects them to be
73 find $out/lib/nest -exec ln -s {} $out/lib \;
76 passthru.tests.version = testers.testVersion {
78 command = "nest --version";
82 description = "NEST is a command line tool for simulating neural networks";
83 homepage = "https://www.nest-simulator.org/";
84 changelog = "https://github.com/nest/nest-simulator/releases/tag/v${version}";
85 license = licenses.gpl2Plus;
86 maintainers = with maintainers; [
90 platforms = platforms.unix;