2022-05-18 10:38:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, makeWrapper, glibc, augeas, dnsutils, c-ares, curl,
|
2018-08-29 12:26:53 +00:00
|
|
|
cyrus_sasl, ding-libs, libnl, libunistring, nss, samba, nfs-utils, doxygen,
|
2021-12-13 08:03:42 +00:00
|
|
|
python3, pam, popt, talloc, tdb, tevent, pkg-config, ldb, openldap,
|
2021-10-29 11:57:33 +00:00
|
|
|
pcre2, libkrb5, cifs-utils, glib, keyutils, dbus, fakeroot, libxslt, libxml2,
|
2021-12-13 08:03:42 +00:00
|
|
|
libuuid, systemd, nspr, check, cmocka, uid_wrapper, p11-kit,
|
2022-05-18 11:05:12 +00:00
|
|
|
nss_wrapper, ncurses, Po4a, http-parser, jansson, jose,
|
2018-11-27 12:52:03 +00:00
|
|
|
docbook_xsl, docbook_xml_dtd_44,
|
2021-12-13 08:24:56 +00:00
|
|
|
nixosTests,
|
2018-11-27 12:52:03 +00:00
|
|
|
withSudo ? false }:
|
2016-04-14 18:18:09 +00:00
|
|
|
|
|
|
|
let
|
2018-11-27 12:52:03 +00:00
|
|
|
docbookFiles = "${docbook_xsl}/share/xml/docbook-xsl/catalog.xml:${docbook_xml_dtd_44}/xml/dtd/docbook/catalog.xml";
|
2016-04-14 18:18:09 +00:00
|
|
|
in
|
2017-02-10 17:47:13 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "sssd";
|
2023-05-07 05:39:33 +00:00
|
|
|
version = "2.9.0";
|
2016-04-14 18:18:09 +00:00
|
|
|
|
2021-05-22 08:27:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SSSD";
|
|
|
|
repo = pname;
|
2021-10-29 11:57:33 +00:00
|
|
|
rev = version;
|
2023-05-07 05:39:33 +00:00
|
|
|
sha256 = "sha256-H9Snh2RzbnjGPqvC9fJHeZvAkGX/O/vmVsl143yb194=";
|
2016-04-14 18:18:09 +00:00
|
|
|
};
|
2021-10-29 11:57:33 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs ./sbus_generate.sh.in
|
|
|
|
'';
|
2016-04-14 18:18:09 +00:00
|
|
|
|
2017-02-10 17:47:13 +00:00
|
|
|
# Something is looking for <libxml/foo.h> instead of <libxml2/libxml/foo.h>
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";
|
2017-02-10 17:47:13 +00:00
|
|
|
|
2016-04-14 18:18:09 +00:00
|
|
|
preConfigure = ''
|
|
|
|
export SGML_CATALOG_FILES="${docbookFiles}"
|
2022-09-15 23:54:14 +00:00
|
|
|
export PYTHONPATH=$(find ${python3.pkgs.python-ldap} -type d -name site-packages)
|
2018-11-27 12:52:03 +00:00
|
|
|
export PATH=$PATH:${openldap}/libexec
|
2016-04-14 18:18:09 +00:00
|
|
|
|
|
|
|
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-01-15 14:45:37 +00:00
|
|
|
'' + lib.optionalString withSudo ''
|
2017-10-02 14:57:17 +00:00
|
|
|
configureFlagsArray+=("--with-sudo")
|
2016-04-14 18:18:09 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2023-02-23 09:59:44 +00:00
|
|
|
# Disable parallel install due to missing depends:
|
|
|
|
# libtool: error: error: relink '_py3sss.la' with the above command before installing i
|
|
|
|
enableParallelInstalling = false;
|
2022-05-18 10:38:01 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config doxygen ];
|
2017-10-23 16:38:02 +00:00
|
|
|
buildInputs = [ augeas dnsutils c-ares curl cyrus_sasl ding-libs libnl libunistring nss
|
2021-12-13 08:03:42 +00:00
|
|
|
samba nfs-utils p11-kit python3 popt
|
2021-10-29 11:57:33 +00:00
|
|
|
talloc tdb tevent ldb pam openldap pcre2 libkrb5
|
2018-07-17 20:11:16 +00:00
|
|
|
cifs-utils glib keyutils dbus fakeroot libxslt libxml2
|
2022-09-15 23:54:14 +00:00
|
|
|
libuuid python3.pkgs.python-ldap systemd nspr check cmocka uid_wrapper
|
2022-05-18 11:05:12 +00:00
|
|
|
nss_wrapper ncurses Po4a http-parser jansson jose ];
|
2016-04-14 18:18:09 +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-05-18 10:38:01 +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
|
|
|
|
'';
|
2016-04-14 18:18:09 +00:00
|
|
|
|
2021-12-13 08:24:56 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) sssd sssd-ldap; };
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-04-14 18:18:09 +00:00
|
|
|
description = "System Security Services Daemon";
|
2021-05-22 08:27:02 +00:00
|
|
|
homepage = "https://sssd.io/";
|
|
|
|
changelog = "https://sssd.io/release-notes/sssd-${version}.html";
|
|
|
|
license = licenses.gpl3Plus;
|
2017-02-10 17:47:13 +00:00
|
|
|
platforms = platforms.linux;
|
2022-12-12 12:32:09 +00:00
|
|
|
maintainers = with maintainers; [ illustris ];
|
2016-04-14 18:18:09 +00:00
|
|
|
};
|
|
|
|
}
|