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