2019-05-13 22:28:31 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkgconfig, which
|
|
|
|
, gettext, libffi, libiconv, libtasn1
|
|
|
|
}:
|
2011-11-07 16:48:14 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-05-13 22:28:31 +01:00
|
|
|
pname = "p11-kit";
|
|
|
|
version = "0.23.15";
|
2011-11-07 16:48:14 +00:00
|
|
|
|
2017-08-01 01:03:23 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "p11-glue";
|
2019-05-13 22:28:31 +01:00
|
|
|
repo = pname;
|
2017-08-01 01:03:23 +01:00
|
|
|
rev = version;
|
2019-05-13 22:28:31 +01:00
|
|
|
sha256 = "0kf7zz2cvd6j09qkff3rl3wfisva82ia1z9h8bmy4ifwkv4yl9fv";
|
2011-11-07 16:48:14 +00:00
|
|
|
};
|
|
|
|
|
2019-05-13 22:28:31 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# https://github.com/p11-glue/p11-kit/issues/212
|
|
|
|
url = "https://github.com/p11-glue/p11-kit/commit/2a474e1fe8f4bd8b4ed7622e5cf3b2718a202562.patch";
|
|
|
|
sha256 = "13wi32hpzilvzxn57crn79h88q38jm2fzd5zxj4wnhv9dhwqr6lg";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
# https://github.com/p11-glue/p11-kit/issues/220
|
|
|
|
url = "https://github.com/p11-glue/p11-kit/commit/e2170b295992cb7fdf115227a78028ac3780619f.patch";
|
|
|
|
sha256 = "0433d8drfxaabsxwkkl4kr0jx8jr2l3a9ar11szipd9jwvrqnyr7";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2017-09-19 21:24:36 +01:00
|
|
|
outputs = [ "out" "dev"];
|
2015-10-07 21:36:11 +01:00
|
|
|
outputBin = "dev";
|
|
|
|
|
2019-05-13 22:28:31 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig which ];
|
|
|
|
buildInputs = [ gettext libffi libiconv libtasn1 ];
|
2017-08-01 01:03:23 +01:00
|
|
|
|
|
|
|
autoreconfPhase = ''
|
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
|
|
'';
|
2011-11-07 16:48:14 +00:00
|
|
|
|
2015-04-20 06:43:41 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--without-trust-paths"
|
2019-05-13 22:28:31 +01:00
|
|
|
]; # TODO: store trust anchors in a directory common to Nix and NixOS
|
2014-01-10 00:17:54 +00:00
|
|
|
|
2018-06-02 04:14:27 +01:00
|
|
|
enableParallelBuilding = true;
|
2018-04-25 04:20:18 +01:00
|
|
|
|
2019-05-13 22:28:31 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
installFlags = [ "exampledir=\${out}/etc/pkcs11" ];
|
|
|
|
|
2015-04-20 06:43:41 +01:00
|
|
|
meta = with stdenv.lib; {
|
2019-05-13 22:28:31 +01:00
|
|
|
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;
|
2019-05-13 22:28:31 +01:00
|
|
|
license = licenses.bsd3;
|
2011-11-07 16:48:14 +00:00
|
|
|
};
|
|
|
|
}
|