1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

yubico-piv-tool: reformat and migrate to pkgs/by-name

This commit is contained in:
Anthony ROUSSEL 2024-08-25 11:36:49 +02:00
parent e91ed5910c
commit 5ca5521799
2 changed files with 36 additions and 27 deletions

View file

@ -1,25 +1,30 @@
{ lib {
, stdenv lib,
, fetchFromGitHub check,
, pkg-config cmake,
, openssl darwin,
, check fetchFromGitHub,
, pcsclite gengetopt,
, PCSC help2man,
, gengetopt nix-update-script,
, help2man openssl,
, cmake pcsclite,
, zlib pkg-config,
, nix-update-script stdenv,
, testers testers,
, withApplePCSC ? stdenv.isDarwin zlib,
withApplePCSC ? stdenv.isDarwin,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "yubico-piv-tool"; pname = "yubico-piv-tool";
version = "2.6.0"; version = "2.6.0";
outputs = [ "out" "dev" "man" ]; outputs = [
"out"
"dev"
"man"
];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Yubico"; owner = "Yubico";
@ -33,17 +38,16 @@ stdenv.mkDerivation (finalAttrs: {
''; '';
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config
cmake cmake
gengetopt gengetopt
help2man help2man
pkg-config
]; ];
buildInputs = [ buildInputs = [
openssl openssl
zlib.dev zlib
] ] ++ (if withApplePCSC then [ darwin.apple_sdk.frameworks.PCSC ] else [ pcsclite ]);
++ (if withApplePCSC then [ PCSC ] else [ pcsclite ]);
cmakeFlags = [ cmakeFlags = [
(lib.cmakeBool "GENERATE_MAN_PAGES" true) (lib.cmakeBool "GENERATE_MAN_PAGES" true)
@ -60,7 +64,10 @@ stdenv.mkDerivation (finalAttrs: {
passthru = { passthru = {
updateScript = nix-update-script { updateScript = nix-update-script {
extraArgs = [ "--version-regex" "yubico-piv-tool-([0-9.]+)$" ]; extraArgs = [
"--version-regex"
"yubico-piv-tool-([0-9.]+)$"
];
}; };
tests = { tests = {
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
@ -87,8 +94,14 @@ stdenv.mkDerivation (finalAttrs: {
''; '';
license = lib.licenses.bsd2; license = lib.licenses.bsd2;
platforms = lib.platforms.all; platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ viraptor anthonyroussel ]; maintainers = with lib.maintainers; [
viraptor
anthonyroussel
];
mainProgram = "yubico-piv-tool"; mainProgram = "yubico-piv-tool";
pkgConfigModules = [ "ykcs11" "ykpiv" ]; pkgConfigModules = [
"ykcs11"
"ykpiv"
];
}; };
}) })

View file

@ -24311,10 +24311,6 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) CoreServices SystemConfiguration; inherit (darwin.apple_sdk.frameworks) CoreServices SystemConfiguration;
}; };
yubico-piv-tool = callPackage ../tools/misc/yubico-piv-tool {
inherit (darwin.apple_sdk.frameworks) PCSC;
};
yubihsm-connector = callPackage ../tools/security/yubihsm-connector { }; yubihsm-connector = callPackage ../tools/security/yubihsm-connector { };
yubikey-manager = callPackage ../tools/misc/yubikey-manager { }; yubikey-manager = callPackage ../tools/misc/yubikey-manager { };