at 18.09-beta 43 lines 1.5 kB view raw
1{ stdenv, fetchFromGitHub, autoreconfHook, pam, openssl, openssh, shadow, makeWrapper }: 2 3stdenv.mkDerivation rec { 4 version = "2.20"; 5 name = "shellinabox-${version}"; 6 7 src = fetchFromGitHub { 8 owner = "shellinabox"; 9 repo = "shellinabox"; 10 rev = "v${version}"; 11 sha256 = "1hmfayh21cks2lyj572944ll0mmgsxbnj981b3hq3nhdg8ywzjfr"; 12 }; 13 14 patches = [ ./shellinabox-minus.patch ]; 15 16 nativeBuildInputs = [ autoreconfHook ]; 17 buildInputs = [ pam openssl openssh makeWrapper ]; 18 19 # Disable GSSAPIAuthentication errors. Also, paths in certain source files are 20 # hardcoded. Replace the hardcoded paths with correct paths. 21 preConfigure = '' 22 substituteInPlace ./shellinabox/service.c --replace "-oGSSAPIAuthentication=no" "" 23 substituteInPlace ./shellinabox/launcher.c --replace "/usr/games" "${openssh}/bin" 24 substituteInPlace ./shellinabox/service.c --replace "/bin/login" "${shadow}/bin/login" 25 substituteInPlace ./shellinabox/launcher.c --replace "/bin/login" "${shadow}/bin/login" 26 substituteInPlace ./libhttp/ssl.c --replace "/usr/bin" "${openssl.bin}/bin" 27 ''; 28 29 postInstall = '' 30 wrapProgram $out/bin/shellinaboxd \ 31 --prefix LD_LIBRARY_PATH : ${openssl.out}/lib 32 mkdir -p $out/lib 33 cp shellinabox/* $out/lib 34 ''; 35 36 meta = with stdenv.lib; { 37 homepage = https://github.com/shellinabox/shellinabox; 38 description = "Web based AJAX terminal emulator"; 39 license = licenses.gpl2; 40 maintainers = with maintainers; [ tomberek lihop ]; 41 platforms = platforms.linux; 42 }; 43}