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 61d108c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
47 changes: 47 additions & 0 deletions pkgs/development/libraries/pkcs11-provider/default.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;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24058,6 +24058,8 @@ with pkgs;
wine-staging = pkgsi686Linux.wine-staging;
};

pkcs11-provider = callPackage ../development/libraries/pkcs11-provider { };

pkcs11helper = callPackage ../development/libraries/pkcs11helper { };

pkgdiff = callPackage ../tools/misc/pkgdiff { };
Expand Down

0 comments on commit 61d108c

Please sign in to comment.