at 22.05-pre 50 lines 1.8 kB view raw
1{ lib, stdenv, fetchFromGitHub, bash, perl, python2 }: 2 3# There are fixes for python3 compatibility on master 4 5stdenv.mkDerivation rec { 6 pname = "dmtcp"; 7 version = "unstable-2021-03-01"; 8 9 src = fetchFromGitHub { 10 owner = pname; 11 repo = pname; 12 rev = "f999adbb8e88fe452a0e57ceb43b6eed7b4409f9"; 13 sha256 = "sha256-codCHQui3fGfUZSNq8GuH4ad/GjD6I/S9rX83o8oFPc="; 14 }; 15 16 dontDisableStatic = true; 17 18 patches = [ ./ld-linux-so-buffer-size.patch ]; 19 20 postPatch = '' 21 patchShebangs . 22 23 substituteInPlace configure \ 24 --replace '#define ELF_INTERPRETER "$interp"' \ 25 "#define ELF_INTERPRETER \"$(cat $NIX_CC/nix-support/dynamic-linker)\"" 26 substituteInPlace src/restartscript.cpp \ 27 --replace /bin/bash ${stdenv.shell} 28 substituteInPlace util/dmtcp_restart_wrapper.sh \ 29 --replace /bin/bash ${stdenv.shell} 30 substituteInPlace test/autotest.py \ 31 --replace /bin/bash ${bash}/bin/bash \ 32 --replace /usr/bin/perl ${perl}/bin/perl \ 33 --replace /usr/bin/python ${python2}/bin/python \ 34 --replace "os.environ['USER']" "\"nixbld1\"" \ 35 --replace "os.getenv('USER')" "\"nixbld1\"" 36 ''; 37 38 meta = with lib; { 39 description = "Distributed MultiThreaded Checkpointing"; 40 longDescription = '' 41 DMTCP (Distributed MultiThreaded Checkpointing) is a tool to 42 transparently checkpointing the state of an arbitrary group of 43 programs spread across many machines and connected by sockets. It does 44 not modify the user's program or the operating system. 45 ''; 46 homepage = "http://dmtcp.sourceforge.net/"; 47 license = licenses.lgpl3Plus; # most files seem this or LGPL-2.1+ 48 platforms = intersectLists platforms.linux platforms.x86; # broken on ARM and Darwin 49 }; 50}