2022-06-16 17:23:12 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, makeWrapper, glibc, augeas, dnsutils, c-ares, curl,
|
2020-04-24 23:36:52 +00:00
|
|
|
cyrus_sasl, ding-libs, libnl, libunistring, nss, samba, nfs-utils, doxygen,
|
2021-12-19 01:06:50 +00:00
|
|
|
python3, pam, popt, talloc, tdb, tevent, pkg-config, ldb, openldap,
|
2021-12-06 16:07:01 +00:00
|
|
|
pcre2, libkrb5, cifs-utils, glib, keyutils, dbus, fakeroot, libxslt, libxml2,
|
2021-12-19 01:06:50 +00:00
|
|
|
libuuid, systemd, nspr, check, cmocka, uid_wrapper, p11-kit,
|
2022-06-16 17:23:12 +00:00
|
|
|
nss_wrapper, ncurses, Po4a, http-parser, jansson, jose,
|
2020-04-24 23:36:52 +00:00
|
|
|
docbook_xsl, docbook_xml_dtd_44,
|
2021-12-19 01:06:50 +00:00
|
|
|
nixosTests,
|
2020-04-24 23:36:52 +00:00
|
|
|
withSudo ? false }:
|
|
|
|
|
|
|
|
let
|
|
|
|
docbookFiles = "${docbook_xsl}/share/xml/docbook-xsl/catalog.xml:${docbook_xml_dtd_44}/xml/dtd/docbook/catalog.xml";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sssd";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "2.8.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SSSD";
|
|
|
|
repo = pname;
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = version;
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-nEMfwOvWd3FRk+1RS1NPT+LcfWi4lDLCGYqH7KuPw7o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs ./sbus_generate.sh.in
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Something is looking for <libxml/foo.h> instead of <libxml2/libxml/foo.h>
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export SGML_CATALOG_FILES="${docbookFiles}"
|
2022-09-30 11:47:45 +00:00
|
|
|
export PYTHONPATH=$(find ${python3.pkgs.python-ldap} -type d -name site-packages)
|
2020-04-24 23:36:52 +00:00
|
|
|
export PATH=$PATH:${openldap}/libexec
|
|
|
|
|
|
|
|
configureFlagsArray=(
|
|
|
|
--prefix=$out
|
|
|
|
--sysconfdir=/etc
|
|
|
|
--localstatedir=/var
|
|
|
|
--enable-pammoddir=$out/lib/security
|
|
|
|
--with-os=fedora
|
|
|
|
--with-pid-path=/run
|
|
|
|
--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
|
|
|
|
)
|
2021-02-05 17:12:51 +00:00
|
|
|
'' + lib.optionalString withSudo ''
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlagsArray+=("--with-sudo")
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config doxygen ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ augeas dnsutils c-ares curl cyrus_sasl ding-libs libnl libunistring nss
|
2021-12-19 01:06:50 +00:00
|
|
|
samba nfs-utils p11-kit python3 popt
|
2021-12-06 16:07:01 +00:00
|
|
|
talloc tdb tevent ldb pam openldap pcre2 libkrb5
|
2020-04-24 23:36:52 +00:00
|
|
|
cifs-utils glib keyutils dbus fakeroot libxslt libxml2
|
2022-09-30 11:47:45 +00:00
|
|
|
libuuid python3.pkgs.python-ldap systemd nspr check cmocka uid_wrapper
|
2022-06-16 17:23:12 +00:00
|
|
|
nss_wrapper ncurses Po4a http-parser jansson jose ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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 {} \;
|
|
|
|
'';
|
2022-06-16 17:23:12 +00:00
|
|
|
postFixup = ''
|
|
|
|
for f in $out/bin/sss{ctl,_cache,_debuglevel,_override,_seed}; do
|
|
|
|
wrapProgram $f --prefix LDB_MODULES_PATH : $out/modules/ldb
|
|
|
|
done
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) sssd sssd-ldap; };
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "System Security Services Daemon";
|
2021-05-28 09:39:13 +00:00
|
|
|
homepage = "https://sssd.io/";
|
|
|
|
changelog = "https://sssd.io/release-notes/sssd-${version}.html";
|
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2022-12-17 10:02:37 +00:00
|
|
|
maintainers = with maintainers; [ illustris ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|