about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/computing/slurm-spank-stunnel
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/computing/slurm-spank-stunnel')
-rw-r--r--nixpkgs/pkgs/servers/computing/slurm-spank-stunnel/default.nix33
-rw-r--r--nixpkgs/pkgs/servers/computing/slurm-spank-stunnel/hostlist.patch13
2 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/computing/slurm-spank-stunnel/default.nix b/nixpkgs/pkgs/servers/computing/slurm-spank-stunnel/default.nix
new file mode 100644
index 000000000000..3534c8981a26
--- /dev/null
+++ b/nixpkgs/pkgs/servers/computing/slurm-spank-stunnel/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, slurm } :
+
+stdenv.mkDerivation rec {
+  pname = "slurm-spank-stunnel";
+  version = "0.2.2";
+
+  src = fetchFromGitHub {
+    owner = "stanford-rc";
+    repo = "slurm-spank-stunnel";
+    rev = version;
+    sha256 = "15cpd49ccvzsmmr3gk8svm2nz461rvs4ybczckyf4yla0xzp06gj";
+  };
+
+  patches = [ ./hostlist.patch ];
+
+  buildPhase = ''
+    gcc -I${lib.getDev slurm}/include -shared -fPIC -o stunnel.so slurm-spank-stunnel.c
+  '';
+
+  installPhase = ''
+    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
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/stanford-rc/slurm-spank-stunnel";
+    description = "Plugin for SLURM for SSH tunneling and port forwarding support";
+    platforms = platforms.linux;
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ markuskowa ];
+  };
+}
diff --git a/nixpkgs/pkgs/servers/computing/slurm-spank-stunnel/hostlist.patch b/nixpkgs/pkgs/servers/computing/slurm-spank-stunnel/hostlist.patch
new file mode 100644
index 000000000000..0fc1d0626aab
--- /dev/null
+++ b/nixpkgs/pkgs/servers/computing/slurm-spank-stunnel/hostlist.patch
@@ -0,0 +1,13 @@
+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);