summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/gs/gssproxy/package.nix
blob: cb8cc73ab93118c8e1a68e77207985aa1506bfa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
  lib,
  stdenv,
  fetchFromGitHub,
  autoreconfHook,
  nix-update-script,
  pkg-config,
  ding-libs,
  krb5,
  libverto,
  popt,
  libxml2,
  libxslt,
  docbook-xsl-nons,
  docbook_xml_dtd_44,
  versionCheckHook,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "gssproxy";
  version = "0.9.2";
  __structuredAttrs = true;
  strictDeps = true;

  src = fetchFromGitHub {
    owner = "gssapi";
    repo = "gssproxy";
    tag = "v${finalAttrs.version}";
    hash = "sha256-RcT1ge/XxhTaT9hrvcHElAEAbvOtjqep3kdEw5e7WZY=";
  };

  nativeBuildInputs = [
    autoreconfHook
    docbook-xsl-nons
    docbook_xml_dtd_44
    libxml2
    libxslt
    pkg-config
  ];

  doInstallCheck = true;

  nativeInstallCheckInputs = [
    versionCheckHook
  ];

  makeFlags = [
    "SGML_CATALOG_FILES=${docbook-xsl-nons}/xml/xsl/docbook/catalog.xml ${docbook_xml_dtd_44}/xml/dtd/docbook/catalog.xml"
    "VERTO_CFLAGS=${libverto}/include"
    "VERTO_LIBS=${libverto}/lib/libverto.so"
  ];

  postInstall = ''
    find $out -type d -empty -delete
  '';

  buildInputs = [
    ding-libs
    krb5
    libverto
    popt
  ];

  configureFlags = [
    "--with-pubconf-path=${placeholder "out"}/etc/gssproxy"
    "--with-initscript=none"
    "--without-selinux"
    # Use REMOTE_FIRST behavior: try gssproxy daemon first, fall back to local credentials
    "--with-gpp-default-behavior=REMOTE_FIRST"
    "--with-xml-catalog-path=${docbook-xsl-nons}/xml/xsl/docbook/catalog.xml"
  ];

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "GSS-API proxy client library for credential isolation";
    homepage = "https://github.com/gssapi/gssproxy";
    changelog = "https://github.com/gssapi/gssproxy/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ jlesquembre ];
    mainProgram = "gssproxy";
    platforms = lib.platforms.all;
  };
})