nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 41 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 openssh, 6}: 7 8stdenv.mkDerivation rec { 9 pname = "autossh"; 10 version = "1.4g"; 11 12 src = fetchurl { 13 url = "http://www.harding.motd.ca/autossh/${pname}-${version}.tgz"; 14 sha256 = "0xqjw8df68f4kzkns5gcah61s5wk0m44qdk2z1d6388w6viwxhsz"; 15 }; 16 17 preConfigure = '' 18 export ac_cv_func_malloc_0_nonnull=yes 19 export ac_cv_func_realloc_0_nonnull=yes 20 ''; 21 22 nativeBuildInputs = [ openssh ]; 23 24 installPhase = '' 25 install -D -m755 autossh $out/bin/autossh || return 1 26 install -D -m644 CHANGES $out/share/doc/autossh/CHANGES || return 1 27 install -D -m644 README $out/share/doc/autossh/README || return 1 28 install -D -m644 autossh.host $out/share/autossh/examples/autossh.host || return 1 29 install -D -m644 rscreen $out/share/autossh/examples/rscreen || return 1 30 install -D -m644 autossh.1 $out/man/man1/autossh.1 || return 1 31 ''; 32 33 meta = with lib; { 34 homepage = "https://www.harding.motd.ca/autossh/"; 35 description = "Automatically restart SSH sessions and tunnels"; 36 license = licenses.bsd1; 37 platforms = platforms.unix; 38 maintainers = with maintainers; [ pSub ]; 39 mainProgram = "autossh"; 40 }; 41}