2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, openssl
|
|
|
|
, libusb1
|
|
|
|
, libedit
|
|
|
|
, curl
|
|
|
|
, gengetopt
|
|
|
|
, pkg-config
|
|
|
|
, pcsclite
|
|
|
|
, help2man
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "yubihsm-shell";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "2.3.2";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Yubico";
|
|
|
|
repo = "yubihsm-shell";
|
|
|
|
rev = version;
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-rSIdI6ECLte+dEbT8NOUqS8jkozRhbo+eqFrdhTIKpY=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
cmake
|
|
|
|
help2man
|
|
|
|
gengetopt
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libusb1
|
|
|
|
libedit
|
|
|
|
curl
|
|
|
|
pcsclite
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|