1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00
nixpkgs/pkgs/servers/shellinabox/default.nix

44 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, autoreconfHook, pam, openssl, openssh, shadow, makeWrapper }:
2013-12-07 05:13:35 +00:00
stdenv.mkDerivation rec {
version = "2.20";
pname = "shellinabox";
2013-12-07 05:13:35 +00:00
2015-08-07 07:31:11 +01:00
src = fetchFromGitHub {
owner = "shellinabox";
repo = "shellinabox";
rev = "v${version}";
sha256 = "1hmfayh21cks2lyj572944ll0mmgsxbnj981b3hq3nhdg8ywzjfr";
2013-12-07 05:13:35 +00:00
};
patches = [ ./shellinabox-minus.patch ];
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ pam openssl openssh makeWrapper ];
2015-08-07 07:31:11 +01:00
# Disable GSSAPIAuthentication errors. Also, paths in certain source files are
# hardcoded. Replace the hardcoded paths with correct paths.
2013-12-07 05:13:35 +00: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}/bin"
'';
postInstall = ''
wrapProgram $out/bin/shellinaboxd \
--prefix LD_LIBRARY_PATH : ${openssl.out}/lib
2015-08-07 07:31:11 +01:00
mkdir -p $out/lib
cp shellinabox/* $out/lib
'';
meta = with stdenv.lib; {
homepage = https://github.com/shellinabox/shellinabox;
2013-12-07 05:13:35 +00:00
description = "Web based AJAX terminal emulator";
license = licenses.gpl2;
maintainers = with maintainers; [ tomberek lihop ];
platforms = platforms.linux;
2013-12-07 05:13:35 +00:00
};
}