2016-01-18 00:04:40 +01:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, pam, openssl, openssh, shadow, makeWrapper }:
|
2013-12-07 06:13:35 +01:00
|
|
|
|
2015-06-28 12:34:44 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2015-12-06 03:14:13 +01:00
|
|
|
version = "2.19";
|
2015-06-28 12:34:44 +02:00
|
|
|
name = "shellinabox-${version}";
|
2013-12-07 06:13:35 +01:00
|
|
|
|
2015-08-07 08:31:11 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "shellinabox";
|
|
|
|
repo = "shellinabox";
|
2015-12-06 03:14:13 +01:00
|
|
|
rev = "1a8010f2c94a62e7398c4fa130dfe9e099dc55cd";
|
|
|
|
sha256 = "16cr7gbnh6vzsxlhg9j9avqrxbhbkqhsbvh197b0ccdwbb04ysan";
|
2013-12-07 06:13:35 +01:00
|
|
|
};
|
2014-03-28 11:51:41 +01:00
|
|
|
|
|
|
|
patches = [ ./shellinabox-minus.patch ];
|
|
|
|
|
2016-01-18 00:04:40 +01:00
|
|
|
buildInputs = [ autoreconfHook pam openssl openssh makeWrapper ];
|
2015-08-07 08:31:11 +02:00
|
|
|
|
2015-06-28 12:34:44 +02:00
|
|
|
# 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"
|
2014-03-28 11:51:41 +01:00
|
|
|
substituteInPlace ./shellinabox/service.c --replace "/bin/login" "${shadow}/bin/login"
|
|
|
|
substituteInPlace ./shellinabox/launcher.c --replace "/bin/login" "${shadow}/bin/login"
|
2016-02-01 19:46:16 +01:00
|
|
|
substituteInPlace ./libhttp/ssl.c --replace "/usr/bin" "${openssl.bin}/bin"
|
2015-06-28 12:34:44 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/shellinaboxd \
|
2016-01-24 08:30:05 +01:00
|
|
|
--prefix LD_LIBRARY_PATH : ${openssl.out}/lib
|
2015-08-07 08:31:11 +02:00
|
|
|
mkdir -p $out/lib
|
|
|
|
cp shellinabox/* $out/lib
|
2015-06-28 12:34:44 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
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";
|
2015-06-28 12:34:44 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ tomberek lihop ];
|
|
|
|
platforms = platforms.linux;
|
2013-12-07 06:13:35 +01:00
|
|
|
};
|
|
|
|
}
|