diff --git a/pkgs/by-name/sl/slurm-spank-stunnel/hostlist.patch b/pkgs/by-name/sl/slurm-spank-stunnel/hostlist.patch deleted file mode 100644 index 0fc1d0626aab..000000000000 --- a/pkgs/by-name/sl/slurm-spank-stunnel/hostlist.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/slurm-spank-stunnel.c b/slurm-spank-stunnel.c -index 81fb4fd..dbe69f6 100644 ---- a/slurm-spank-stunnel.c -+++ b/slurm-spank-stunnel.c -@@ -278,7 +278,7 @@ int _stunnel_connect_nodes (char* nodes) - { - - char* host; -- hostlist_t hlist; -+ hostlist_t *hlist; - - // Connect to the first host in the list - hlist = slurm_hostlist_create(nodes); diff --git a/pkgs/by-name/sl/slurm-spank-stunnel/package.nix b/pkgs/by-name/sl/slurm-spank-stunnel/package.nix index 4ee7ded8530e..ccc8e7bc99b1 100644 --- a/pkgs/by-name/sl/slurm-spank-stunnel/package.nix +++ b/pkgs/by-name/sl/slurm-spank-stunnel/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, slurm, }: @@ -17,18 +18,30 @@ stdenv.mkDerivation (finalAttrs: { }; patches = [ - ./hostlist.patch ./backward-compat.patch + (fetchpatch { + name = "hostlist_t-signature.patch"; + url = "https://github.com/stanford-rc/slurm-spank-stunnel/commit/84d04e4ccfe538a09c3f17a52dde616903b66db8.patch"; + sha256 = "sha256-RaUYqeNmFPvYci2yX8Bxps1nDjX/UAG+e3JbjbcwrO0="; + }) ]; buildPhase = '' + runHook preBuild + gcc -I${lib.getDev slurm}/include -shared -fPIC -o stunnel.so slurm-spank-stunnel.c + + runHook postBuild ''; installPhase = '' + runHook preInstall + mkdir -p $out/lib $out/etc/slurm/plugstack.conf.d install -m 755 stunnel.so $out/lib install -m 644 plugstack.conf $out/etc/slurm/plugstack.conf.d/stunnel.conf.example + + runHook postInstall ''; meta = {