1{
2 lib,
3 stdenv,
4 autoreconfHook,
5 cyrus_sasl,
6 docbook_xml_dtd_43,
7 docbook_xsl,
8 fetchFromGitLab,
9 libkrb5,
10 libxslt,
11 openldap,
12 pkg-config,
13 util-linux,
14 xmlto,
15}:
16
17stdenv.mkDerivation (finalAttrs: {
18 pname = "adcli";
19 version = "0.9.2";
20
21 src = fetchFromGitLab {
22 domain = "gitlab.freedesktop.org";
23 owner = "realmd";
24 repo = "adcli";
25 tag = finalAttrs.version;
26 hash = "sha256-dipNKlIdc1DpXLg/YJjUxZlNoMFy+rt8Y/+AfWFA4dE=";
27 };
28
29 nativeBuildInputs = [
30 autoreconfHook
31 docbook_xsl
32 libxslt # xsltproc
33 pkg-config
34 util-linux
35 xmlto
36 ];
37
38 buildInputs = [
39 cyrus_sasl
40 libkrb5
41 openldap
42 ];
43
44 strictDeps = true;
45
46 configureFlags = [
47 "--disable-debug"
48 "ac_cv_path_KRB5_CONFIG=${lib.getExe' (lib.getDev libkrb5) "krb5-config"}"
49 ];
50
51 postPatch = ''
52 substituteInPlace tools/Makefile.am \
53 --replace-fail 'sbin_PROGRAMS' 'bin_PROGRAMS'
54
55 substituteInPlace doc/Makefile.am \
56 --replace-fail 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl' \
57 '${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl'
58
59 function patch_docbook() {
60 substituteInPlace $1 \
61 --replace-fail "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
62 "${docbook_xml_dtd_43}/xml/dtd/docbook/docbookx.dtd"
63 }
64 patch_docbook doc/adcli.xml
65 patch_docbook doc/adcli-devel.xml
66 patch_docbook doc/adcli-docs.xml
67 '';
68
69 meta = {
70 homepage = "https://www.freedesktop.org/software/realmd/adcli/adcli.html";
71 description = "Helper library and tools for Active Directory client operations";
72 mainProgram = "adcli";
73 license = lib.licenses.lgpl21Only;
74 maintainers = with lib.maintainers; [
75 SohamG
76 anthonyroussel
77 ];
78 platforms = lib.platforms.linux;
79 };
80})