about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/networking/autossh/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/networking/autossh/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/networking/autossh/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/networking/autossh/default.nix b/nixpkgs/pkgs/tools/networking/autossh/default.nix
new file mode 100644
index 000000000000..f89302c4295f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/networking/autossh/default.nix
@@ -0,0 +1,34 @@
+{stdenv, fetchurl, openssh}:
+
+stdenv.mkDerivation rec {
+  name = "autossh-1.4g";
+
+  src = fetchurl {
+    url = "http://www.harding.motd.ca/autossh/${name}.tgz";
+    sha256 = "0xqjw8df68f4kzkns5gcah61s5wk0m44qdk2z1d6388w6viwxhsz";
+  };
+
+  preConfigure = ''
+    export ac_cv_func_malloc_0_nonnull=yes
+    export ac_cv_func_realloc_0_nonnull=yes
+  '';
+
+  nativeBuildInputs = [ openssh ];
+
+  installPhase =
+    ''
+      install -D -m755 autossh      $out/bin/autossh                          || return 1
+      install -D -m644 CHANGES      $out/share/doc/autossh/CHANGES            || return 1
+      install -D -m644 README       $out/share/doc/autossh/README             || return 1
+      install -D -m644 autossh.host $out/share/autossh/examples/autossh.host  || return 1
+      install -D -m644 rscreen      $out/share/autossh/examples/rscreen       || return 1
+      install -D -m644 autossh.1    $out/man/man1/autossh.1                   || return 1
+    '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://www.harding.motd.ca/autossh/";
+    description = "Automatically restart SSH sessions and tunnels";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ pSub ];
+  };
+}