slurm-spank-stunnel: cleanup
* run pre/post hooks in install and build phase * replace hostlist patch with upstream patch
This commit is contained in:
@@ -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);
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user