Merge pull request #272509 from anthonyroussel/updates/yubico-piv-tool

yubico-piv-tool: 2.3.1 -> 2.4.1

authored by Stanisław Pitucha and committed by GitHub d901c3c5 ab3122ea

+31 -18
+31 -18
pkgs/tools/misc/yubico-piv-tool/default.nix
··· 1 1 { lib 2 2 , stdenv 3 - , fetchurl 3 + , fetchFromGitHub 4 4 , pkg-config 5 5 , openssl 6 6 , check 7 7 , pcsclite 8 8 , PCSC 9 9 , gengetopt 10 + , help2man 10 11 , cmake 12 + , zlib 11 13 , withApplePCSC ? stdenv.isDarwin 12 - , gitUpdater 14 + , nix-update-script 13 15 , testers 14 - , yubico-piv-tool 15 16 }: 16 17 17 - stdenv.mkDerivation rec { 18 + stdenv.mkDerivation (finalAttrs: { 18 19 pname = "yubico-piv-tool"; 19 - version = "2.3.1"; 20 + version = "2.4.1"; 21 + 22 + outputs = [ "out" "dev" "man" ]; 20 23 21 - src = fetchurl { 22 - url = "https://developers.yubico.com/yubico-piv-tool/Releases/yubico-piv-tool-${version}.tar.gz"; 23 - hash = "sha256-2ona/YthhapjU0Z1P53bKa8pvEq9kt2B832dZWC11k4="; 24 + src = fetchFromGitHub { 25 + owner = "Yubico"; 26 + repo = "yubico-piv-tool"; 27 + rev = "refs/tags/yubico-piv-tool-${finalAttrs.version}"; 28 + hash = "sha256-KprY5BX7Fi/qWRT1pda9g8fqnmDB1Bh7oFM7sCwViuw="; 24 29 }; 25 30 26 31 postPatch = '' 27 32 substituteInPlace CMakeLists.txt --replace "-Werror" "" 28 33 ''; 29 34 30 - nativeBuildInputs = [ pkg-config cmake gengetopt ]; 31 - buildInputs = [ openssl check ] 32 - ++ (if withApplePCSC then [ PCSC ] else [ pcsclite ]); 35 + nativeBuildInputs = [ 36 + pkg-config 37 + cmake 38 + gengetopt 39 + help2man 40 + ]; 41 + 42 + buildInputs = [ 43 + openssl 44 + check 45 + zlib.dev 46 + ] 47 + ++ (if withApplePCSC then [ PCSC ] else [ pcsclite ]); 33 48 34 49 cmakeFlags = [ 35 - "-DGENERATE_MAN_PAGES=OFF" # Use the man page generated at release time 50 + "-DGENERATE_MAN_PAGES=ON" 36 51 "-DCMAKE_INSTALL_BINDIR=bin" 37 52 "-DCMAKE_INSTALL_INCLUDEDIR=include" 38 53 "-DCMAKE_INSTALL_MANDIR=share/man" ··· 42 57 configureFlags = [ "--with-backend=${if withApplePCSC then "macscard" else "pcsc"}" ]; 43 58 44 59 passthru = { 45 - updateScript = gitUpdater { 46 - url = "https://github.com/Yubico/yubico-piv-tool.git"; 47 - rev-prefix = "yubico-piv-tool-"; 60 + updateScript = nix-update-script { 61 + extraArgs = [ "--version-regex" "yubico-piv-tool-([0-9.]+)$" ]; 48 62 }; 49 63 tests.version = testers.testVersion { 50 - inherit version; 51 - package = yubico-piv-tool; 64 + package = finalAttrs.finalPackage; 52 65 command = "yubico-piv-tool --version"; 53 66 }; 54 67 }; ··· 72 85 maintainers = with maintainers; [ viraptor anthonyroussel ]; 73 86 mainProgram = "yubico-piv-tool"; 74 87 }; 75 - } 88 + })