nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, fetchFromGitHub
4, fetchpatch
5, autoreconfHook
6, libxcrypt
7, gssapiSupport ? false
8, libkrb5
9, freeipmiSupport ? false
10, freeipmi
11, ipv6Support ? true
12, opensslSupport ? true
13, openssl
14, trustUdsCredSupport ? false
15, udsSupport ? false
16}:
17
18stdenv.mkDerivation rec {
19 pname = "conserver";
20 version = "8.2.7";
21
22 src = fetchFromGitHub {
23 owner = "bstansell";
24 repo = "conserver";
25 rev = "v${version}";
26 sha256 = "sha256-LiCknqitBoa8E8rNMVgp1004CwkW8G4O5XGKe4NfZI8=";
27 };
28
29 # Remove upon next release since upstream is fixed
30 # https://github.com/bstansell/conserver/pull/82
31 patches = [
32 (fetchpatch {
33 url = "https://github.com/bstansell/conserver/commit/84fc79a459e00dbc87b8cfc943c5045bfcc7aeeb.patch";
34 sha256 = "sha256:1dy8r9z7rv8512fl0rk5gi1vl02hnh7x0i6flvpcc13h6r6fhxyc";
35 })
36 ];
37
38 nativeBuildInputs = [ autoreconfHook ];
39
40 buildInputs = [ libxcrypt ]
41 ++ lib.optionals freeipmiSupport [ freeipmi ]
42 ++ lib.optionals gssapiSupport [ libkrb5 ]
43 ++ lib.optionals opensslSupport [ openssl ];
44
45 configureFlags = [ "--with-ccffile=/dev/null" "--with-cffile=/dev/null" ]
46 ++ lib.optionals freeipmiSupport [ "--with-freeipmi=${freeipmi}/include" ]
47 ++ lib.optionals gssapiSupport [ "--with-gssapi=${libkrb5.dev}/include" ]
48 ++ lib.optionals ipv6Support [ "--with-ipv6" ]
49 ++ lib.optionals opensslSupport [ "--with-openssl=${openssl.dev}/include" ]
50 ++ lib.optionals trustUdsCredSupport [ "--with-trust-uds-cred" ]
51 ++ lib.optionals udsSupport [ "--with-uds" ];
52
53 # Disabled due to exist upstream cases failing 8/15 tests
54 doCheck = false;
55
56 meta = with lib; {
57 homepage = "https://www.conserver.com/";
58 description = "An application that allows multiple users to watch a serial console at the same time";
59 license = licenses.bsd3;
60 platforms = platforms.unix;
61 maintainers = with maintainers; [ sarcasticadmin ];
62 };
63}