-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}; | ||
} |