tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
freeipa: init at 4.10.1
s1341
2 years ago
da470200
6d33f53f
+194
3 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
freeipa
default.nix
paths.py
top-level
all-packages.nix
+171
pkgs/os-specific/linux/freeipa/default.nix
···
1
1
+
{ stdenv
2
2
+
, lib
3
3
+
, fetchurl
4
4
+
, pkgconfig
5
5
+
, autoconf
6
6
+
, automake
7
7
+
, kerberos
8
8
+
, openldap
9
9
+
, popt
10
10
+
, sasl
11
11
+
, curl
12
12
+
, xmlrpc_c
13
13
+
, ding-libs
14
14
+
, p11-kit
15
15
+
, gettext
16
16
+
, nspr
17
17
+
, nss
18
18
+
, _389-ds-base
19
19
+
, svrcore
20
20
+
, libuuid
21
21
+
, talloc
22
22
+
, tevent
23
23
+
, samba
24
24
+
, libunistring
25
25
+
, libverto
26
26
+
, libpwquality
27
27
+
, systemd
28
28
+
, python3
29
29
+
, bind
30
30
+
, sssd
31
31
+
, jre
32
32
+
, rhino
33
33
+
, lesscpy
34
34
+
, jansson
35
35
+
, runtimeShell
36
36
+
}:
37
37
+
38
38
+
let
39
39
+
pathsPy = ./paths.py;
40
40
+
41
41
+
pythonInputs = with python3.pkgs; [
42
42
+
six
43
43
+
ldap
44
44
+
dns
45
45
+
netaddr
46
46
+
netifaces
47
47
+
gssapi
48
48
+
dogtag-pki
49
49
+
pyasn1
50
50
+
sssd
51
51
+
cffi
52
52
+
lxml
53
53
+
dbus-python
54
54
+
cryptography
55
55
+
memcached
56
56
+
qrcode
57
57
+
pyusb
58
58
+
yubico
59
59
+
setuptools
60
60
+
jinja2
61
61
+
augeas
62
62
+
samba
63
63
+
];
64
64
+
in
65
65
+
stdenv.mkDerivation rec {
66
66
+
pname = "freeipa";
67
67
+
version = "4.10.1";
68
68
+
69
69
+
src = fetchurl {
70
70
+
url = "https://releases.pagure.org/freeipa/freeipa-${version}.tar.gz";
71
71
+
sha256 = "sha256-q2rQzcBl1tI4/7+hxEwOY9ND86hObe7O7Y9EEH7cUoA=";
72
72
+
};
73
73
+
74
74
+
nativeBuildInputs = [
75
75
+
python3.pkgs.wrapPython
76
76
+
jre
77
77
+
rhino
78
78
+
lesscpy
79
79
+
automake
80
80
+
autoconf
81
81
+
gettext
82
82
+
];
83
83
+
84
84
+
buildInputs = [
85
85
+
kerberos
86
86
+
openldap
87
87
+
popt
88
88
+
sasl
89
89
+
curl
90
90
+
xmlrpc_c
91
91
+
pkgconfig
92
92
+
ding-libs
93
93
+
p11-kit
94
94
+
python3
95
95
+
nspr
96
96
+
nss
97
97
+
_389-ds-base
98
98
+
svrcore
99
99
+
libuuid
100
100
+
talloc
101
101
+
tevent
102
102
+
samba
103
103
+
libunistring
104
104
+
libverto
105
105
+
systemd
106
106
+
bind
107
107
+
libpwquality
108
108
+
jansson
109
109
+
] ++ pythonInputs;
110
110
+
111
111
+
postPatch = ''
112
112
+
patchShebangs makeapi makeaci install/ui/util
113
113
+
114
114
+
substituteInPlace ipaplatform/setup.py \
115
115
+
--replace 'ipaplatform.debian' 'ipaplatform.nixos'
116
116
+
117
117
+
substituteInPlace ipasetup.py.in \
118
118
+
--replace 'int(v)' 'int(v.replace("post", ""))'
119
119
+
120
120
+
substituteInPlace client/ipa-join.c \
121
121
+
--replace /usr/sbin/ipa-getkeytab $out/bin/ipa-getkeytab
122
122
+
123
123
+
cp -r ipaplatform/{fedora,nixos}
124
124
+
substitute ${pathsPy} ipaplatform/nixos/paths.py \
125
125
+
--subst-var out \
126
126
+
--subst-var-by bind ${bind.dnsutils} \
127
127
+
--subst-var-by curl ${curl} \
128
128
+
--subst-var-by kerberos ${kerberos}
129
129
+
'';
130
130
+
131
131
+
NIX_CFLAGS_COMPILE = "-I${_389-ds-base}/include/dirsrv";
132
132
+
pythonPath = pythonInputs;
133
133
+
134
134
+
# Building and installing the server fails with silent Rhino errors, skipping
135
135
+
# for now. Need a newer Rhino version.
136
136
+
#buildFlags = [ "client" "server" ]
137
137
+
138
138
+
configureFlags = [
139
139
+
"--with-systemdsystemunitdir=$out/lib/systemd/system"
140
140
+
"--with-ipaplatform=nixos"
141
141
+
"--disable-server"
142
142
+
];
143
143
+
144
144
+
postInstall = ''
145
145
+
echo "
146
146
+
#!${runtimeShell}
147
147
+
echo 'ipa-client-install is not available on NixOS. Please see security.ipa, instead.'
148
148
+
exit 1
149
149
+
" > $out/sbin/ipa-client-install
150
150
+
'';
151
151
+
152
152
+
postFixup = ''
153
153
+
wrapPythonPrograms
154
154
+
rm -rf $out/etc/ipa $out/var/lib/ipa-client/sysrestore
155
155
+
'';
156
156
+
157
157
+
meta = with lib; {
158
158
+
description = "Identity, Policy and Audit system";
159
159
+
longDescription = ''
160
160
+
IPA is an integrated solution to provide centrally managed Identity (users,
161
161
+
hosts, services), Authentication (SSO, 2FA), and Authorization
162
162
+
(host access control, SELinux user roles, services). The solution provides
163
163
+
features for further integration with Linux based clients (SUDO, automount)
164
164
+
and integration with Active Directory based infrastructures (Trusts).
165
165
+
'';
166
166
+
homepage = "https://www.freeipa.org/";
167
167
+
license = licenses.gpl3Plus;
168
168
+
maintainers = [ maintainers.s1341 ];
169
169
+
platforms = platforms.linux;
170
170
+
};
171
171
+
}
+13
pkgs/os-specific/linux/freeipa/paths.py
···
1
1
+
from ipaplatform.fedora.paths import FedoraPathNamespace
2
2
+
3
3
+
class NixOSPathNamespace(FedoraPathNamespace):
4
4
+
SBIN_IPA_JOIN = "@out@/bin/ipa-join"
5
5
+
IPA_GETCERT = "@out@/bin/ipa-getcert"
6
6
+
IPA_RMKEYTAB = "@out@/bin/ipa-rmkeytab"
7
7
+
IPA_GETKEYTAB = "@out@/bin/ipa-getkeytab"
8
8
+
NSUPDATE = "@bind@/bin/nsupdate"
9
9
+
BIN_CURL = "@curl@/bin/curl"
10
10
+
KINIT = "@kerberos@/bin/kinit"
11
11
+
KDESTROY = "@kerberos@/bin/kdestroy"
12
12
+
13
13
+
paths = NixOSPathNamespace()
+10
pkgs/top-level/all-packages.nix
···
19907
19907
inherit (darwin) autoSignDarwinBinariesHook;
19908
19908
};
19909
19909
19910
19910
+
freeipa = callPackage ../os-specific/linux/freeipa {
19911
19911
+
kerberos = krb5.override {
19912
19912
+
withVerto = true;
19913
19913
+
};
19914
19914
+
sasl = cyrus_sasl;
19915
19915
+
samba = samba4.override {
19916
19916
+
enableLDAP = true;
19917
19917
+
};
19918
19918
+
};
19919
19919
+
19910
19920
freetts = callPackage ../development/libraries/freetts {
19911
19921
jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
19912
19922
};