mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
yubihsm-shell: 2.3.2 -> 2.4.0
This commit is contained in:
parent
3cbe06b845
commit
e71c6dae8a
@ -10,19 +10,31 @@
|
|||||||
, pkg-config
|
, pkg-config
|
||||||
, pcsclite
|
, pcsclite
|
||||||
, help2man
|
, help2man
|
||||||
|
, darwin
|
||||||
|
, libiconv
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "yubihsm-shell";
|
pname = "yubihsm-shell";
|
||||||
version = "2.3.2";
|
version = "2.4.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Yubico";
|
owner = "Yubico";
|
||||||
repo = "yubihsm-shell";
|
repo = "yubihsm-shell";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-rSIdI6ECLte+dEbT8NOUqS8jkozRhbo+eqFrdhTIKpY=";
|
hash = "sha256-zWhvECPdZnrbSAVPDVZk54SWHVkd/HEQxS3FgXoqXHY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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"
|
||||||
|
# ld: unknown option: -z
|
||||||
|
substituteInPlace CMakeLists.txt cmake/SecurityFlags.cmake \
|
||||||
|
--replace "AppleClang" "Clang"
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
cmake
|
cmake
|
||||||
@ -34,16 +46,17 @@ stdenv.mkDerivation rec {
|
|||||||
libusb1
|
libusb1
|
||||||
libedit
|
libedit
|
||||||
curl
|
curl
|
||||||
pcsclite
|
|
||||||
openssl
|
openssl
|
||||||
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
|
pcsclite
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
darwin.apple_sdk.frameworks.PCSC
|
||||||
|
libiconv
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
cmakeFlags = lib.optionals stdenv.isDarwin [
|
||||||
# Can't find libyubihsm at runtime because of dlopen() in C code
|
"-DDISABLE_LTO=ON"
|
||||||
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; {
|
meta = with lib; {
|
||||||
description = "yubihsm-shell and libyubihsm";
|
description = "yubihsm-shell and libyubihsm";
|
||||||
|
Loading…
Reference in New Issue
Block a user