lol

Merge pull request #8541 from lihop/fix-shellinabox

shellinabox: fix ssl/tls support

+20 -11
+20 -11
pkgs/servers/shellinabox/default.nix
··· 1 - { stdenv, fetchurl, pam, openssl, openssh, shadow }: 1 + { stdenv, fetchurl, pam, openssl, openssh, shadow, makeWrapper }: 2 2 3 - stdenv.mkDerivation { 4 - name = "shellinabox-2.14"; 3 + stdenv.mkDerivation rec { 4 + version = "2.14"; 5 + name = "shellinabox-${version}"; 5 6 6 7 src = fetchurl { 7 - url = "https://shellinabox.googlecode.com/files/shellinabox-2.14.tar.gz"; 8 + url = "https://shellinabox.googlecode.com/files/shellinabox-${version}.tar.gz"; 8 9 sha1 = "9e01f58c68cb53211b83d0f02e676e0d50deb781"; 9 10 }; 10 11 11 - buildInputs = [pam openssl openssh]; 12 + buildInputs = [ pam openssl openssh makeWrapper ]; 12 13 13 14 patches = [ ./shellinabox-minus.patch ]; 14 15 15 - # Disable GSSAPIAuthentication errors as well as correct hardcoded path. Take /usr/games's place. 16 + # Disable GSSAPIAuthentication errors. Also, paths in certain source files are 17 + # hardcoded. Replace the hardcoded paths with correct paths. 16 18 preConfigure = '' 17 19 substituteInPlace ./shellinabox/service.c --replace "-oGSSAPIAuthentication=no" "" 18 20 substituteInPlace ./shellinabox/launcher.c --replace "/usr/games" "${openssh}/bin" 19 21 substituteInPlace ./shellinabox/service.c --replace "/bin/login" "${shadow}/bin/login" 20 22 substituteInPlace ./shellinabox/launcher.c --replace "/bin/login" "${shadow}/bin/login" 21 - ''; 22 - meta = { 23 + substituteInPlace ./libhttp/ssl.c --replace "/usr/bin" "${openssl}/bin" 24 + ''; 25 + 26 + postInstall = '' 27 + wrapProgram $out/bin/shellinaboxd \ 28 + --prefix LD_LIBRARY_PATH : ${openssl}/lib 29 + ''; 30 + 31 + meta = with stdenv.lib; { 23 32 homepage = https://code.google.com/p/shellinabox; 24 33 description = "Web based AJAX terminal emulator"; 25 - license = stdenv.lib.licenses.gpl2; 26 - maintainers = [stdenv.lib.maintainers.tomberek]; 27 - platforms = stdenv.lib.platforms.linux; 34 + license = licenses.gpl2; 35 + maintainers = with maintainers; [ tomberek lihop ]; 36 + platforms = platforms.linux; 28 37 }; 29 38 }