Skip to content

Commit

Permalink
pkcs11-provider: init at 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
numinit committed Mar 31, 2024
1 parent 38baa03 commit baf9236
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions pkgs/by-name/pk/pkcs11-provider/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{ lib, stdenv, fetchFromGitHub, runCommandLocal
, openssl, nss, p11-kit
, opensc, gnutls, expect
, autoconf, autoconf-archive, automake, pkg-config, libtool
}:

stdenv.mkDerivation rec {
pname = "pkcs11-provider";
version = "0.3";

src = fetchFromGitHub {
owner = "latchset";
repo = "pkcs11-provider";
rev = "v${version}";
hash = "sha256-jEQYsINRZ7bi2UqOXUUmGpm+1h+1qBNe18KvfAw2JzU=";
};

buildInputs = [ openssl nss p11-kit ];
nativeBuildInputs = [ autoconf autoconf-archive automake pkg-config libtool ];

# don't add SoftHSM to here: https://github.com/openssl/openssl/issues/22508
nativeCheckInputs = [ p11-kit.bin opensc nss.tools gnutls openssl.bin expect ];

postPatch = ''
patchShebangs .
# Makefile redirects to logfiles; make sure we can catch them.
for name in softokn softhsm; do
ln -s /dev/stderr tests/setup-$name.log
done
'';

preConfigure = "autoreconf -fi";

enableParallelBuilding = true;
enableParallelInstalling = false;

doCheck = true;

meta = with lib; {
homepage = "https://github.com/latchset/pkcs11-provider";
description = "An OpenSSL 3.x provider to access hardware or software tokens using the PKCS#11 Cryptographic Token Interface";
maintainers = with maintainers; [ numinit ];
license = licenses.asl20;
platforms = platforms.unix;
};
}

0 comments on commit baf9236

Please sign in to comment.