1{ lib, stdenv, fetchFromGitHub, autoreconfHook, libtool, pkg-config
2, openssl }:
3
4stdenv.mkDerivation rec {
5 pname = "libp11";
6 version = "0.4.12";
7
8 src = fetchFromGitHub {
9 owner = "OpenSC";
10 repo = "libp11";
11 rev = "${pname}-${version}";
12 sha256 = "sha256-Xqjl12xT30ZXWYzPWNN3jWY9pxojhd7Kq0OC7rABt4M=";
13 };
14
15 configureFlags = [
16 "--with-enginesdir=${placeholder "out"}/lib/engines"
17 ];
18
19 nativeBuildInputs = [ autoreconfHook pkg-config libtool ];
20
21 buildInputs = [ openssl ];
22
23 enableParallelBuilding = true;
24
25 passthru = { inherit openssl; };
26
27 meta = with lib; {
28 description = "Small layer on top of PKCS#11 API to make PKCS#11 implementations easier";
29 homepage = "https://github.com/OpenSC/libp11";
30 license = licenses.lgpl21Plus;
31 platforms = platforms.all;
32 };
33}