2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, glibc, augeas, dnsutils, c-ares, curl,
|
2018-08-29 14:26:53 +02:00
|
|
|
cyrus_sasl, ding-libs, libnl, libunistring, nss, samba, nfs-utils, doxygen,
|
2016-04-14 20:18:09 +02:00
|
|
|
python, python3, pam, popt, talloc, tdb, tevent, pkgconfig, ldb, openldap,
|
2018-07-17 22:11:16 +02:00
|
|
|
pcre, kerberos, cifs-utils, glib, keyutils, dbus, fakeroot, libxslt, libxml2,
|
2018-07-21 02:44:44 +02:00
|
|
|
libuuid, ldap, systemd, nspr, check, cmocka, uid_wrapper,
|
2018-11-27 13:52:03 +01:00
|
|
|
nss_wrapper, ncurses, Po4a, http-parser, jansson,
|
|
|
|
docbook_xsl, docbook_xml_dtd_44,
|
|
|
|
withSudo ? false }:
|
2016-04-14 20:18:09 +02:00
|
|
|
|
|
|
|
let
|
2018-11-27 13:52:03 +01:00
|
|
|
docbookFiles = "${docbook_xsl}/share/xml/docbook-xsl/catalog.xml:${docbook_xml_dtd_44}/xml/dtd/docbook/catalog.xml";
|
2016-04-14 20:18:09 +02:00
|
|
|
in
|
2017-02-10 18:47:13 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "sssd";
|
2019-03-21 04:27:25 +01:00
|
|
|
version = "1.16.4";
|
2016-04-14 20:18:09 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://fedorahosted.org/released/sssd/${pname}-${version}.tar.gz";
|
2019-03-21 04:27:25 +01:00
|
|
|
sha256 = "0ngr7cgimyjc6flqkm7psxagp1m4jlzpqkn28pliifbmdg6i5ckb";
|
2016-04-14 20:18:09 +02:00
|
|
|
};
|
2020-03-31 08:35:45 +02:00
|
|
|
patches = [
|
|
|
|
# Fix build failure against samba 4.12.0rc1
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/SSSD/sssd/commit/bc56b10aea999284458dcc293b54cf65288e325d.patch";
|
|
|
|
sha256 = "0q74sx5n41srq3kdn55l5j1sq4xrjsnl5y4v8yh5mwsijj74yh4g";
|
|
|
|
})
|
2020-11-24 20:09:04 +01:00
|
|
|
# Fix collision with external nss symbol
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/SSSD/sssd/commit/fe9eeb51be06059721e873f77092b1e9ba08e6c1.patch";
|
|
|
|
sha256 = "0b83b2w0rnvm26pg03a4lpmkmi7n3gqxg7lk751q61q79gnzrpz4";
|
|
|
|
})
|
2020-03-31 08:35:45 +02:00
|
|
|
];
|
2016-04-14 20:18:09 +02:00
|
|
|
|
2017-02-10 18:47:13 +01:00
|
|
|
# Something is looking for <libxml/foo.h> instead of <libxml2/libxml/foo.h>
|
|
|
|
NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";
|
|
|
|
|
2016-04-14 20:18:09 +02:00
|
|
|
preConfigure = ''
|
|
|
|
export SGML_CATALOG_FILES="${docbookFiles}"
|
|
|
|
export PYTHONPATH=${ldap}/lib/python2.7/site-packages
|
2018-11-27 13:52:03 +01:00
|
|
|
export PATH=$PATH:${openldap}/libexec
|
2016-04-14 20:18:09 +02:00
|
|
|
|
|
|
|
configureFlagsArray=(
|
|
|
|
--prefix=$out
|
|
|
|
--sysconfdir=/etc
|
|
|
|
--localstatedir=/var
|
|
|
|
--enable-pammoddir=$out/lib/security
|
|
|
|
--with-os=fedora
|
|
|
|
--with-pid-path=/run
|
|
|
|
--with-python2-bindings
|
|
|
|
--with-python3-bindings
|
|
|
|
--with-syslog=journald
|
|
|
|
--without-selinux
|
|
|
|
--without-semanage
|
|
|
|
--with-xml-catalog-path=''${SGML_CATALOG_FILES%%:*}
|
|
|
|
--with-ldb-lib-dir=$out/modules/ldb
|
|
|
|
--with-nscd=${glibc.bin}/sbin/nscd
|
|
|
|
)
|
2017-10-02 16:57:17 +02:00
|
|
|
'' + stdenv.lib.optionalString withSudo ''
|
|
|
|
configureFlagsArray+=("--with-sudo")
|
2016-04-14 20:18:09 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2017-10-23 18:38:02 +02:00
|
|
|
buildInputs = [ augeas dnsutils c-ares curl cyrus_sasl ding-libs libnl libunistring nss
|
2018-08-29 14:26:53 +02:00
|
|
|
samba nfs-utils doxygen python python3 popt
|
2016-04-14 20:18:09 +02:00
|
|
|
talloc tdb tevent pkgconfig ldb pam openldap pcre kerberos
|
2018-07-17 22:11:16 +02:00
|
|
|
cifs-utils glib keyutils dbus fakeroot libxslt libxml2
|
2017-10-23 18:38:02 +02:00
|
|
|
libuuid ldap systemd nspr check cmocka uid_wrapper
|
2016-04-14 20:18:09 +02:00
|
|
|
nss_wrapper ncurses Po4a http-parser jansson ];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"SGML_CATALOG_FILES=${docbookFiles}"
|
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=$(out)/etc"
|
|
|
|
"localstatedir=$(out)/var"
|
|
|
|
"pidpath=$(out)/run"
|
|
|
|
"sss_statedir=$(out)/var/lib/sss"
|
|
|
|
"logpath=$(out)/var/log/sssd"
|
|
|
|
"pubconfpath=$(out)/var/lib/sss/pubconf"
|
|
|
|
"dbpath=$(out)/var/lib/sss/db"
|
|
|
|
"mcpath=$(out)/var/lib/sss/mc"
|
|
|
|
"pipepath=$(out)/var/lib/sss/pipes"
|
|
|
|
"gpocachepath=$(out)/var/lib/sss/gpo_cache"
|
|
|
|
"secdbpath=$(out)/var/lib/sss/secrets"
|
|
|
|
"initdir=$(out)/rc.d/init"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm -rf "$out"/run
|
|
|
|
rm -rf "$out"/rc.d
|
|
|
|
rm -f "$out"/modules/ldb/memberof.la
|
|
|
|
find "$out" -depth -type d -exec rmdir --ignore-fail-on-non-empty {} \;
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-04-14 20:18:09 +02:00
|
|
|
description = "System Security Services Daemon";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://fedorahosted.org/sssd/";
|
2016-04-14 20:18:09 +02:00
|
|
|
license = licenses.gpl3;
|
2017-02-10 18:47:13 +01:00
|
|
|
platforms = platforms.linux;
|
2016-04-14 20:18:09 +02:00
|
|
|
maintainers = [ maintainers.e-user ];
|
|
|
|
};
|
|
|
|
}
|