git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #8541 from lihop/fix-shellinabox

shellinabox: fix ssl/tls support

commit643d0550581de49f7a5d043289b405169eda2cc8 authorArseniy Seroka <jagajaga@users.noreply.github.com> dateSun 28 Jun 2015, 16:15 (11 years ago) parentc45b5abd0633a2
1 file changed+20−11
pkgs/servers/shellinabox/default.nix+20−11
pkgs/servers/shellinabox/default.nix+20−11
@@ -1,29 +1,38 @@
1−{ stdenv, fetchurl, pam, openssl, openssh, shadow }:
1+{ stdenv, fetchurl, pam, openssl, openssh, shadow, makeWrapper }:
22
3−stdenv.mkDerivation {
4− name = "shellinabox-2.14";
3+stdenv.mkDerivation rec {
4+ version = "2.14";
5+ name = "shellinabox-${version}";
56
67 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";
89 sha1 = "9e01f58c68cb53211b83d0f02e676e0d50deb781";
910 };
1011
11− buildInputs = [pam openssl openssh];
12+ buildInputs = [ pam openssl openssh makeWrapper ];
1213
1314 patches = [ ./shellinabox-minus.patch ];
1415
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.
1618 preConfigure = ''
1719 substituteInPlace ./shellinabox/service.c --replace "-oGSSAPIAuthentication=no" ""
1820 substituteInPlace ./shellinabox/launcher.c --replace "/usr/games" "${openssh}/bin"
1921 substituteInPlace ./shellinabox/service.c --replace "/bin/login" "${shadow}/bin/login"
2022 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; {
2332 homepage = https://code.google.com/p/shellinabox;
2433 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;
2837 };
2938}