8 , libxslt # for xsltproc
17 stdenv.mkDerivation rec {
21 src = fetchFromGitHub {
25 hash = "sha256-1QIMEGBZsqLYU3v5ZswD5K9VcIGLBovJlC10lBHhH7c=";
28 outputs = [ "out" "bin" "dev"];
30 # For cross platform builds of p11-kit, libtasn1 in nativeBuildInputs
31 # provides the asn1Parser binary on the hostPlatform needed for building.
32 # at the same time, libtasn1 in buildInputs provides the libasn1 library
33 # to link against for the target platform.
34 # Hence, libtasn1 is required in both native and build inputs.
54 NOCONFIGURE=1 ./autogen.sh
60 "--localstatedir=/var"
61 "--with-trust-paths=${lib.concatStringsSep ":" [
62 "/etc/ssl/trust-source" # p11-kit trust source
63 "/etc/ssl/certs/ca-certificates.crt" # NixOS + Debian/Ubuntu/Arch/Gentoo...
64 "/etc/pki/tls/certs/ca-bundle.crt" # Fedora/CentOS
65 "/var/lib/ca-certificates/ca-bundle.pem" # openSUSE
66 "/etc/ssl/cert.pem" # Darwin/macOS
70 enableParallelBuilding = true;
72 # Tests run in fakeroot for non-root users
74 if [ "$(id -u)" != "0" ]; then
79 doCheck = !stdenv.isDarwin;
82 "exampledir=${placeholder "out"}/etc/pkcs11"
86 installShellCompletion --bash bash-completion/{p11-kit,trust}
90 description = "Library for loading and sharing PKCS#11 modules";
92 Provides a way to load and enumerate PKCS#11 modules.
93 Provides a standard configuration setup for installing
94 PKCS#11 modules in such a way that they're discoverable.
96 homepage = "https://p11-glue.github.io/p11-glue/p11-kit.html";
98 "https://github.com/p11-glue/p11-kit/raw/${version}/NEWS"
99 "https://github.com/p11-glue/p11-kit/releases/tag/${version}"
101 platforms = platforms.all;
102 license = licenses.bsd3;