nixpkgs/pkgs/servers/shellinabox/default.nix

39 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pam, openssl, openssh, shadow, makeWrapper }:
2013-12-07 06:13:35 +01:00
stdenv.mkDerivation rec {
version = "2.14";
name = "shellinabox-${version}";
2013-12-07 06:13:35 +01:00
src = fetchurl {
url = "https://shellinabox.googlecode.com/files/shellinabox-${version}.tar.gz";
2013-12-07 06:13:35 +01:00
sha1 = "9e01f58c68cb53211b83d0f02e676e0d50deb781";
};
buildInputs = [ pam openssl openssh makeWrapper ];
2013-12-07 06:13:35 +01:00
patches = [ ./shellinabox-minus.patch ];
# Disable GSSAPIAuthentication errors. Also, paths in certain source files are
# hardcoded. Replace the hardcoded paths with correct paths.
2013-12-07 06:13:35 +01:00
preConfigure = ''
substituteInPlace ./shellinabox/service.c --replace "-oGSSAPIAuthentication=no" ""
substituteInPlace ./shellinabox/launcher.c --replace "/usr/games" "${openssh}/bin"
substituteInPlace ./shellinabox/service.c --replace "/bin/login" "${shadow}/bin/login"
substituteInPlace ./shellinabox/launcher.c --replace "/bin/login" "${shadow}/bin/login"
substituteInPlace ./libhttp/ssl.c --replace "/usr/bin" "${openssl}/bin"
'';
postInstall = ''
wrapProgram $out/bin/shellinaboxd \
--prefix LD_LIBRARY_PATH : ${openssl}/lib
'';
meta = with stdenv.lib; {
2013-12-07 06:13:35 +01:00
homepage = https://code.google.com/p/shellinabox;
description = "Web based AJAX terminal emulator";
license = licenses.gpl2;
maintainers = with maintainers; [ tomberek lihop ];
platforms = platforms.linux;
2013-12-07 06:13:35 +01:00
};
}