From 184dadc4058eeb3a113793e23d6d7cad84a8efb3 Mon Sep 17 00:00:00 2001 From: Youser Nayme <7685106-NeuralModder@users.noreply.gitlab.com> Date: Sun, 15 Feb 2026 23:34:44 +0000 Subject: [PATCH] dmtcp: unstable-2022-02-28 -> 4.1.0 Many releases have happened since 2022-02-28. See https://github.com/dmtcp/dmtcp/releases Substitutions had to be updated a bit. Also switched to use `--replace-fail` instead of `--replace`. Dependencies for tests were added, they aren't actually run though. They're currently broken in several ways: a build failure that's fixed on master but not in a tagged release yet, and the python tests all fail, though they fail on my host system as well. Homepage updated. Platform list updated. It seems linux x86, arm and riscv (both 32-bit and 64-bit) are all supported (though it's a little unclear? Release notes for 3.1.0 mention 32-bit arm but readme does not), and darwin is not. --- pkgs/by-name/dm/dmtcp/package.nix | 40 ++++++++++++++++++------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/pkgs/by-name/dm/dmtcp/package.nix b/pkgs/by-name/dm/dmtcp/package.nix index 4d2cecc48dcf..5f99f69deef5 100644 --- a/pkgs/by-name/dm/dmtcp/package.nix +++ b/pkgs/by-name/dm/dmtcp/package.nix @@ -7,37 +7,43 @@ python3, }: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "dmtcp"; - version = "unstable-2022-02-28"; + version = "4.1.0"; src = fetchFromGitHub { owner = "dmtcp"; repo = "dmtcp"; - rev = "133687764c6742906006a1d247e3b83cd860fa1d"; - hash = "sha256-9Vr8IhoeATCfyt7Lp7kYe/7e87mFX9KMNGTqxJgIztE="; + tag = finalAttrs.version; + hash = "sha256-5laifZ/8oYJrNO5JOggCbPKmA9XiHEC79C/hk+0TdeQ="; }; dontDisableStatic = true; + nativeCheckInputs = [ + perl + python3 + ]; + env.HAS_PYTHON3 = "yes"; + patches = [ ./ld-linux-so-buffer-size.patch ]; postPatch = '' patchShebangs . substituteInPlace configure \ - --replace '#define ELF_INTERPRETER "$interp"' \ - "#define ELF_INTERPRETER \"$(cat $NIX_CC/nix-support/dynamic-linker)\"" + --replace-fail '#define ELF_INTERPRETER \"$interp\"' \ + "#define ELF_INTERPRETER \\\"$(cat $NIX_CC/nix-support/dynamic-linker)\\\"" substituteInPlace src/restartscript.cpp \ - --replace /bin/bash ${stdenv.shell} + --replace-fail /bin/bash ${stdenv.shell} substituteInPlace util/dmtcp_restart_wrapper.sh \ - --replace /bin/bash ${stdenv.shell} + --replace-fail /bin/bash ${stdenv.shell} substituteInPlace test/autotest.py \ - --replace /bin/bash ${bash}/bin/bash \ - --replace /usr/bin/perl ${perl}/bin/perl \ - --replace /usr/bin/python ${python3.interpreter} \ - --replace "os.environ['USER']" "\"nixbld1\"" \ - --replace "os.getenv('USER')" "\"nixbld1\"" + --replace-fail /bin/bash ${bash}/bin/bash \ + --replace-fail /usr/bin/perl ${perl}/bin/perl \ + --replace-fail '/usr/bin/env python3' ${python3.interpreter} \ + --replace-fail "os.environ['USER']" "\"nixbld1\"" \ + --replace-fail "os.getenv('USER')" "\"nixbld1\"" ''; meta = { @@ -48,8 +54,10 @@ stdenv.mkDerivation { programs spread across many machines and connected by sockets. It does not modify the user's program or the operating system. ''; - homepage = "http://dmtcp.sourceforge.net/"; + homepage = "http://dmtcp.github.io/"; license = lib.licenses.lgpl3Plus; # most files seem this or LGPL-2.1+ - platforms = lib.intersectLists lib.platforms.linux lib.platforms.x86; # broken on ARM and Darwin + platforms = lib.intersectLists lib.platforms.linux ( + lib.platforms.x86 ++ lib.platforms.aarch ++ lib.platforms.riscv + ); }; -} +})