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