nixpkgs/pkgs/development/libraries/p11-kit/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

64 lines
1.7 KiB
Nix

{ stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, which
, gettext, libffi, libiconv, libtasn1
}:
stdenv.mkDerivation rec {
pname = "p11-kit";
version = "0.23.21";
src = fetchFromGitHub {
owner = "p11-glue";
repo = pname;
rev = version;
sha256 = "1w24brn8j3vwfp07p2hldw2ci06pk1cx1dvjk8jjxkccp20fk958";
};
outputs = [ "out" "dev"];
outputBin = "dev";
# for cross platform builds of p11-kit, libtasn1 in nativeBuildInputs
# provides the asn1Parser binary on the hostPlatform needed for building.
# at the same time, libtasn1 in buildInputs provides the libasn1 library
# to link against for the target platform.
# hence, libtasn1 is required in both native and build inputs.
nativeBuildInputs = [ autoreconfHook pkg-config which libtasn1 ];
buildInputs = [ gettext libffi libiconv libtasn1 ];
autoreconfPhase = ''
NOCONFIGURE=1 ./autogen.sh
'';
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-trust-paths=/etc/ssl/certs/ca-certificates.crt"
];
enableParallelBuilding = true;
# Tests run in fakeroot for non-root users
preCheck = ''
if [ "$(id -u)" != "0" ]; then
export FAKED_MODE=1
fi
'';
doCheck = !stdenv.isDarwin;
installFlags = [
"exampledir=${placeholder "out"}/etc/pkcs11"
];
meta = with stdenv.lib; {
description = "Library for loading and sharing PKCS#11 modules";
longDescription = ''
Provides a way to load and enumerate PKCS#11 modules.
Provides a standard configuration setup for installing
PKCS#11 modules in such a way that they're discoverable.
'';
homepage = "https://p11-glue.github.io/p11-glue/p11-kit.html";
platforms = platforms.all;
license = licenses.bsd3;
};
}