Merge pull request #272509 from anthonyroussel/updates/yubico-piv-tool
yubico-piv-tool: 2.3.1 -> 2.4.1
This commit is contained in:
commit
d901c3c5fc
1 changed files with 31 additions and 18 deletions
|
@ -1,38 +1,53 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, openssl
|
||||
, check
|
||||
, pcsclite
|
||||
, PCSC
|
||||
, gengetopt
|
||||
, help2man
|
||||
, cmake
|
||||
, zlib
|
||||
, withApplePCSC ? stdenv.isDarwin
|
||||
, gitUpdater
|
||||
, nix-update-script
|
||||
, testers
|
||||
, yubico-piv-tool
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "yubico-piv-tool";
|
||||
version = "2.3.1";
|
||||
version = "2.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://developers.yubico.com/yubico-piv-tool/Releases/yubico-piv-tool-${version}.tar.gz";
|
||||
hash = "sha256-2ona/YthhapjU0Z1P53bKa8pvEq9kt2B832dZWC11k4=";
|
||||
outputs = [ "out" "dev" "man" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Yubico";
|
||||
repo = "yubico-piv-tool";
|
||||
rev = "refs/tags/yubico-piv-tool-${finalAttrs.version}";
|
||||
hash = "sha256-KprY5BX7Fi/qWRT1pda9g8fqnmDB1Bh7oFM7sCwViuw=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt --replace "-Werror" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config cmake gengetopt ];
|
||||
buildInputs = [ openssl check ]
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
cmake
|
||||
gengetopt
|
||||
help2man
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
check
|
||||
zlib.dev
|
||||
]
|
||||
++ (if withApplePCSC then [ PCSC ] else [ pcsclite ]);
|
||||
|
||||
cmakeFlags = [
|
||||
"-DGENERATE_MAN_PAGES=OFF" # Use the man page generated at release time
|
||||
"-DGENERATE_MAN_PAGES=ON"
|
||||
"-DCMAKE_INSTALL_BINDIR=bin"
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
"-DCMAKE_INSTALL_MANDIR=share/man"
|
||||
|
@ -42,13 +57,11 @@ stdenv.mkDerivation rec {
|
|||
configureFlags = [ "--with-backend=${if withApplePCSC then "macscard" else "pcsc"}" ];
|
||||
|
||||
passthru = {
|
||||
updateScript = gitUpdater {
|
||||
url = "https://github.com/Yubico/yubico-piv-tool.git";
|
||||
rev-prefix = "yubico-piv-tool-";
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [ "--version-regex" "yubico-piv-tool-([0-9.]+)$" ];
|
||||
};
|
||||
tests.version = testers.testVersion {
|
||||
inherit version;
|
||||
package = yubico-piv-tool;
|
||||
package = finalAttrs.finalPackage;
|
||||
command = "yubico-piv-tool --version";
|
||||
};
|
||||
};
|
||||
|
@ -72,4 +85,4 @@ stdenv.mkDerivation rec {
|
|||
maintainers = with maintainers; [ viraptor anthonyroussel ];
|
||||
mainProgram = "yubico-piv-tool";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue