Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 76 lines 2.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 autoreconfHook, 7 libxcrypt, 8 gssapiSupport ? false, 9 libkrb5, 10 freeipmiSupport ? false, 11 freeipmi, 12 ipv6Support ? true, 13 opensslSupport ? true, 14 openssl, 15 trustUdsCredSupport ? false, 16 udsSupport ? false, 17}: 18 19stdenv.mkDerivation rec { 20 pname = "conserver"; 21 version = "8.2.7"; 22 23 src = fetchFromGitHub { 24 owner = "bstansell"; 25 repo = "conserver"; 26 rev = "v${version}"; 27 sha256 = "sha256-LiCknqitBoa8E8rNMVgp1004CwkW8G4O5XGKe4NfZI8="; 28 }; 29 30 # Remove upon next release since upstream is fixed 31 # https://github.com/bstansell/conserver/pull/82 32 patches = [ 33 (fetchpatch { 34 url = "https://github.com/bstansell/conserver/commit/84fc79a459e00dbc87b8cfc943c5045bfcc7aeeb.patch"; 35 sha256 = "sha256:1dy8r9z7rv8512fl0rk5gi1vl02hnh7x0i6flvpcc13h6r6fhxyc"; 36 }) 37 ]; 38 39 nativeBuildInputs = [ autoreconfHook ]; 40 41 buildInputs = [ 42 libxcrypt 43 ] 44 ++ lib.optionals freeipmiSupport [ freeipmi ] 45 ++ lib.optionals gssapiSupport [ libkrb5 ] 46 ++ lib.optionals opensslSupport [ openssl ]; 47 48 configureFlags = [ 49 "--with-ccffile=/dev/null" 50 "--with-cffile=/dev/null" 51 ] 52 ++ lib.optionals freeipmiSupport [ "--with-freeipmi=${freeipmi}/include" ] 53 ++ lib.optionals gssapiSupport [ "--with-gssapi=${libkrb5.dev}/include" ] 54 ++ lib.optionals ipv6Support [ "--with-ipv6" ] 55 ++ lib.optionals opensslSupport [ "--with-openssl=${openssl.dev}/include" ] 56 ++ lib.optionals trustUdsCredSupport [ "--with-trust-uds-cred" ] 57 ++ lib.optionals udsSupport [ "--with-uds" ]; 58 59 # Disabled due to exist upstream cases failing 8/15 tests 60 doCheck = false; 61 62 postPatch = '' 63 # install -s calls the wrong strip program when cross compiling 64 substituteInPlace \ 65 console/Makefile.in conserver/Makefile.in autologin/Makefile.in contrib/chat/Makefile.in \ 66 --replace-fail "@INSTALL_PROGRAM@ -s" "@INSTALL_PROGRAM@" 67 ''; 68 69 meta = with lib; { 70 homepage = "https://www.conserver.com/"; 71 description = "Application that allows multiple users to watch a serial console at the same time"; 72 license = licenses.bsd3; 73 platforms = platforms.unix; 74 maintainers = with maintainers; [ sarcasticadmin ]; 75 }; 76}