2015-08-07 07:31:11 +01:00
|
|
|
{ stdenv, fetchFromGitHub, autoconf, automake, libtool, pam, openssl, openssh, shadow, makeWrapper }:
|
2013-12-07 05:13:35 +00:00
|
|
|
|
2015-06-28 11:34:44 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-08-07 07:31:11 +01:00
|
|
|
version = "2.16";
|
2015-06-28 11:34:44 +01:00
|
|
|
name = "shellinabox-${version}";
|
2013-12-07 05:13:35 +00:00
|
|
|
|
2015-08-07 07:31:11 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "shellinabox";
|
|
|
|
repo = "shellinabox";
|
|
|
|
rev = "8ac3a4efcf20f7b66d3f1eb1d4f3054aef6e196b";
|
|
|
|
sha256 = "1pp6nk0279d2q7l1cvx8jc73skfjv0s42wxb2m00x0bg9i1fvs5j";
|
2013-12-07 05:13:35 +00:00
|
|
|
};
|
2014-03-28 10:51:41 +00:00
|
|
|
|
|
|
|
patches = [ ./shellinabox-minus.patch ];
|
|
|
|
|
2015-08-07 07:31:11 +01:00
|
|
|
buildInputs = [ autoconf automake libtool pam openssl openssh makeWrapper];
|
|
|
|
|
2015-06-28 11:34:44 +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"
|
2014-03-28 10:51:41 +00:00
|
|
|
substituteInPlace ./shellinabox/service.c --replace "/bin/login" "${shadow}/bin/login"
|
|
|
|
substituteInPlace ./shellinabox/launcher.c --replace "/bin/login" "${shadow}/bin/login"
|
2015-06-28 11:34:44 +01:00
|
|
|
substituteInPlace ./libhttp/ssl.c --replace "/usr/bin" "${openssl}/bin"
|
2015-08-07 07:31:11 +01:00
|
|
|
autoreconf -vfi
|
2015-06-28 11:34:44 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/shellinaboxd \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${openssl}/lib
|
2015-08-07 07:31:11 +01:00
|
|
|
mkdir -p $out/lib
|
|
|
|
cp shellinabox/* $out/lib
|
2015-06-28 11:34:44 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2013-12-07 05:13:35 +00:00
|
|
|
homepage = https://code.google.com/p/shellinabox;
|
|
|
|
description = "Web based AJAX terminal emulator";
|
2015-06-28 11:34:44 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ tomberek lihop ];
|
|
|
|
platforms = platforms.linux;
|
2013-12-07 05:13:35 +00:00
|
|
|
};
|
|
|
|
}
|