diff options
author | matthewcroughan <matt@croughan.sh> | 2022-04-21 22:44:30 +0100 |
---|---|---|
committer | matthewcroughan <matt@croughan.sh> | 2022-05-12 01:15:02 +0100 |
commit | 40733622e731d5f15db7d138369b4d7490434042 (patch) | |
tree | 48d6823094f9db400abd42815cb1cd5c9c33989d /pkgs/tools/security/yubihsm-shell | |
parent | 62745b65f4684a4772bd70fdfa09669a9c6af874 (diff) |
yubihsm-shell: init at 2.3.1
Co-authored-by: Jan Tojnar <jtojnar@gmail.com> Co-authored-by: 06kellyjac <dev@j-k.io>
Diffstat (limited to 'pkgs/tools/security/yubihsm-shell')
-rw-r--r-- | pkgs/tools/security/yubihsm-shell/default.nix | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/tools/security/yubihsm-shell/default.nix b/pkgs/tools/security/yubihsm-shell/default.nix new file mode 100644 index 0000000000000..06a1452400de5 --- /dev/null +++ b/pkgs/tools/security/yubihsm-shell/default.nix @@ -0,0 +1,59 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, openssl +, libusb1 +, libedit +, curl +, gengetopt +, pkg-config +, pcsclite +, help2man +}: + +stdenv.mkDerivation rec { + pname = "yubihsm-shell"; + version = "2.3.1"; + + src = fetchFromGitHub { + owner = "Yubico"; + repo = "yubihsm-shell"; + rev = version; + sha256 = "D0kXiwc+i6mKA4oHuHjgXUmLMsmY5o/VI+1aCWtNjC0="; + }; + + nativeBuildInputs = [ + pkg-config + cmake + help2man + gengetopt + ]; + + buildInputs = [ + libusb1 + libedit + curl + pcsclite + openssl + ]; + + cmakeFlags = [ + # help2man fails without this + "-DCMAKE_SKIP_BUILD_RPATH=OFF" + ]; + + postPatch = '' + # Can't find libyubihsm at runtime because of dlopen() in C code + substituteInPlace lib/yubihsm.c \ + --replace "libyubihsm_usb.so" "$out/lib/libyubihsm_usb.so" \ + --replace "libyubihsm_http.so" "$out/lib/libyubihsm_http.so" + ''; + + meta = with lib; { + description = "yubihsm-shell and libyubihsm"; + homepage = "https://github.com/Yubico/yubihsm-shell"; + maintainers = with maintainers; [ matthewcroughan ]; + license = licenses.asl20; + }; +} |