nixpkgs/pkgs/development/libraries/p11-kit/default.nix

64 lines
1.7 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, which
, gettext, libffi, libiconv, libtasn1
}:
stdenv.mkDerivation rec {
pname = "p11-kit";
2021-01-20 13:43:28 +00:00
version = "0.23.22";
2017-08-01 01:03:23 +01:00
src = fetchFromGitHub {
owner = "p11-glue";
repo = pname;
2017-08-01 01:03:23 +01:00
rev = version;
2021-01-20 13:43:28 +00:00
sha256 = "sha256-erWqElJr0iESNUk9EZiJRmSMYhns8GxuFLNw7mIIIWs=";
};
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 ];
2017-08-01 01:03:23 +01:00
autoreconfPhase = ''
NOCONFIGURE=1 ./autogen.sh
'';
2015-04-20 06:43:41 +01:00
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
2020-04-25 17:27:34 +01:00
"--with-trust-paths=/etc/ssl/certs/ca-certificates.crt"
];
2014-01-10 00:17:54 +00:00
enableParallelBuilding = true;
# Tests run in fakeroot for non-root users
preCheck = ''
if [ "$(id -u)" != "0" ]; then
export FAKED_MODE=1
fi
'';
doCheck = !stdenv.isDarwin;
2020-04-25 17:27:34 +01:00
installFlags = [
"exampledir=${placeholder "out"}/etc/pkcs11"
];
meta = with 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";
2015-04-20 06:43:41 +01:00
platforms = platforms.all;
license = licenses.bsd3;
};
}