Commit 5ca55217 authored by Anthony ROUSSEL's avatar Anthony ROUSSEL
Browse files

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

parent e91ed591
Loading
Loading
Loading
Loading
+36 −23
Original line number Diff line number Diff line
{ 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"
    ];
  };
})
+0 −4
Original line number Diff line number Diff line
@@ -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 { };