about summary refs log tree commit diff
path: root/pkgs/tools/misc
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2024-06-23 19:08:51 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2024-06-23 19:09:00 +0200
commit2096642430b4ec87e2c34ff37f1b2f5c9665a38b (patch)
tree716bd3257d5e9541e67a02bb263480da8bdf9baa /pkgs/tools/misc
parentce08ce6dacfb2ee4be50e0b96bb37d4b3351f23c (diff)
parent5005a65bcc90157005b57c25bb92e71f0fd9daf7 (diff)
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
- pkgs/os-specific/windows/mingw-w64/default.nix
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r--pkgs/tools/misc/SP800-90B_EntropyAssessment/default.nix50
-rw-r--r--pkgs/tools/misc/cyberchef/default.nix4
-rw-r--r--pkgs/tools/misc/dotter/default.nix17
-rw-r--r--pkgs/tools/misc/eget/default.nix4
-rw-r--r--pkgs/tools/misc/fend/default.nix6
-rw-r--r--pkgs/tools/misc/gaphor/default.nix2
-rw-r--r--pkgs/tools/misc/gh-dash/default.nix6
-rw-r--r--pkgs/tools/misc/google-cloud-sql-proxy/default.nix10
-rw-r--r--pkgs/tools/misc/grizzly/default.nix4
-rw-r--r--pkgs/tools/misc/gummy/default.nix33
-rw-r--r--pkgs/tools/misc/phrase-cli/default.nix6
-rw-r--r--pkgs/tools/misc/remind/default.nix38
-rw-r--r--pkgs/tools/misc/sensible-utils/default.nix4
-rw-r--r--pkgs/tools/misc/svtplay-dl/default.nix4
-rw-r--r--pkgs/tools/misc/ttchat/default.nix2
-rw-r--r--pkgs/tools/misc/xcp/default.nix6
-rw-r--r--pkgs/tools/misc/yubico-piv-tool/default.nix38
17 files changed, 110 insertions, 124 deletions
diff --git a/pkgs/tools/misc/SP800-90B_EntropyAssessment/default.nix b/pkgs/tools/misc/SP800-90B_EntropyAssessment/default.nix
deleted file mode 100644
index 3c18621d712de..0000000000000
--- a/pkgs/tools/misc/SP800-90B_EntropyAssessment/default.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, bzip2
-, libdivsufsort
-, jsoncpp
-, openssl
-, mpfr
-}:
-
-stdenv.mkDerivation rec {
-  pname = "SP800-90B_EntropyAssessment";
-  version = "1.1.6";
-
-  src = fetchFromGitHub {
-    owner = "usnistgov";
-    repo = "SP800-90B_EntropyAssessment";
-    rev = "v${version}";
-    hash = "sha256-KZQ7kC0PbBkjLEQZIqYakQ91OvCxruhdfUwiRHtno3w=";
-  };
-
-  buildInputs = [ bzip2 libdivsufsort jsoncpp openssl mpfr ];
-
-  postPatch = ''
-    substituteInPlace Makefile \
-      --replace "-march=native" ""
-  '';
-
-  sourceRoot = "${src.name}/cpp";
-
-  makeFlags = [
-    "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
-    "ARCH=${stdenv.hostPlatform.linuxArch}"
-  ];
-
-  installPhase = ''
-    runHook preInstall
-    mkdir -p $out/bin
-    cp ea_* $out/bin
-    runHook postInstall
-  '';
-
-  meta = {
-    homepage = "https://github.com/usnistgov/SP800-90B_EntropyAssessment";
-    description = "Implementation of min-entropy assessment methods included in Special Publication 800-90B";
-    platforms = lib.platforms.linux;
-    license = lib.licenses.nistSoftware;
-    maintainers = with lib.maintainers; [ orichter thillux ];
-  };
-}
diff --git a/pkgs/tools/misc/cyberchef/default.nix b/pkgs/tools/misc/cyberchef/default.nix
index db888fccbf9bc..c8e57c208982d 100644
--- a/pkgs/tools/misc/cyberchef/default.nix
+++ b/pkgs/tools/misc/cyberchef/default.nix
@@ -5,11 +5,11 @@
 
 stdenv.mkDerivation rec {
   pname = "cyberchef";
-  version = "10.18.8";
+  version = "10.19.0";
 
   src = fetchzip {
     url = "https://github.com/gchq/CyberChef/releases/download/v${version}/CyberChef_v${version}.zip";
-    sha256 = "sha256-1Ta0fgrwBHfUlj7aJkiAHV7MmHRlXJloYt2P889ya+U=";
+    sha256 = "sha256-jhT1HcAXNRBNgZcRv6yYZ8xTIHo5EUe71KpAgUx8FCU=";
     stripRoot = false;
   };
 
diff --git a/pkgs/tools/misc/dotter/default.nix b/pkgs/tools/misc/dotter/default.nix
index 48d89dd86b339..ec8232ffc0fd6 100644
--- a/pkgs/tools/misc/dotter/default.nix
+++ b/pkgs/tools/misc/dotter/default.nix
@@ -5,29 +5,38 @@
 , rustPlatform
 , CoreServices
 , which
+, installShellFiles
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "dotter";
-  version = "0.13.1";
+  version = "0.13.2";
 
   src = fetchFromGitHub {
     owner = "SuperCuber";
     repo = "dotter";
     rev = "v${version}";
-    hash = "sha256-Xmdg5ITKWhL5AxTS7z4f9ecigQpBqna+kZclA+mDJhA=";
+    hash = "sha256-IV3wvmRiRtzu5UhIlL1BnL8hy+fQHQA9Mfiy6dIsjdw=";
   };
 
-  cargoHash = "sha256-W8khm9E5f/PROVJDAUr57nAiTEXV4a0fepzV00HoT8c=";
+  cargoHash = "sha256-jNHq1cH3I29b6LIoO2ApLDTYzFGGSua1lACvYCBpbQQ=";
 
   buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
 
-  nativeCheckInputs = [ which ];
+  nativeCheckInputs = [ which installShellFiles ];
+
+  postInstall = ''
+    installShellCompletion --cmd dotter \
+      --bash <($out/bin/dotter gen-completions --shell bash) \
+      --fish <($out/bin/dotter gen-completions --shell fish) \
+      --zsh <($out/bin/dotter gen-completions --shell zsh)
+  '';
 
   passthru = {
     updateScript = nix-update-script { };
   };
 
+
   meta = with lib; {
     description = "Dotfile manager and templater written in rust 🦀";
     homepage = "https://github.com/SuperCuber/dotter";
diff --git a/pkgs/tools/misc/eget/default.nix b/pkgs/tools/misc/eget/default.nix
index 1bf2b7f10110e..89aa759741ae8 100644
--- a/pkgs/tools/misc/eget/default.nix
+++ b/pkgs/tools/misc/eget/default.nix
@@ -10,13 +10,13 @@
 
 buildGoModule rec {
   pname = "eget";
-  version = "1.3.3";
+  version = "1.3.4";
 
   src = fetchFromGitHub {
     owner = "zyedidia";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-OOqfZ2uS3sYBH9xrlQN1iSNdNE9RGi6qiDXfPgf2aB0=";
+    sha256 = "sha256-jhVUYyp6t5LleVotQQme07IJVdVnIOVFFtKEmzt8e2k=";
   };
 
   vendorHash = "sha256-A3lZtV0pXh4KxINl413xGbw2Pz7OzvIQiFSRubH428c=";
diff --git a/pkgs/tools/misc/fend/default.nix b/pkgs/tools/misc/fend/default.nix
index 2e7c22672330c..6986bc69645a8 100644
--- a/pkgs/tools/misc/fend/default.nix
+++ b/pkgs/tools/misc/fend/default.nix
@@ -18,16 +18,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "fend";
-  version = "1.4.8";
+  version = "1.4.9";
 
   src = fetchFromGitHub {
     owner = "printfn";
     repo = "fend";
     rev = "v${version}";
-    hash = "sha256-i4h2QYgA1XX+qHOEH07PR3G/0SSA8a413vm9T39TuYQ=";
+    hash = "sha256-ZfDoDOHQlvuPSX6OWQOX7HdeSVUfAlOpHVwcNPDEeU8=";
   };
 
-  cargoHash = "sha256-EhumvDwXNXB0Vp3qWkJs0y0gEwiy3Z9/3KZ92YDTlqk=";
+  cargoHash = "sha256-Xwf3Mxvso9mb1YYTuKMzLhtJNX5b2dmGi05TZ111cMc=";
 
   nativeBuildInputs = [ pandoc installShellFiles pkg-config copyDesktopItems ];
   buildInputs = [ pkg-config openssl ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
diff --git a/pkgs/tools/misc/gaphor/default.nix b/pkgs/tools/misc/gaphor/default.nix
index a8afdef6a2bff..68f922d4abd81 100644
--- a/pkgs/tools/misc/gaphor/default.nix
+++ b/pkgs/tools/misc/gaphor/default.nix
@@ -76,7 +76,7 @@ buildPythonApplication rec {
 
   meta = with lib; {
     description = "Simple modeling tool written in Python";
-    maintainers = with maintainers; [ wolfangaukang ];
+    maintainers = [ ];
     homepage = "https://github.com/gaphor/gaphor";
     license = licenses.asl20;
     platforms = [ "x86_64-linux" ];
diff --git a/pkgs/tools/misc/gh-dash/default.nix b/pkgs/tools/misc/gh-dash/default.nix
index 91de04a0565d1..aa65da648166c 100644
--- a/pkgs/tools/misc/gh-dash/default.nix
+++ b/pkgs/tools/misc/gh-dash/default.nix
@@ -7,13 +7,13 @@
 
 buildGoModule rec {
   pname = "gh-dash";
-  version = "4.1.2";
+  version = "4.2.0";
 
   src = fetchFromGitHub {
     owner = "dlvhdr";
     repo = "gh-dash";
     rev = "v${version}";
-    hash = "sha256-crMlld0Lrfy/MPjQd071azRpvdII8aC2nbSRxBxYu+U=";
+    hash = "sha256-9aXGNLaNXzDGJVTAXhOPt8XNxnWUpmiXCa60jsIUja8=";
   };
 
   vendorHash = "sha256-JOd2czYWVgE1jBfeuoVRp+oE/asyk50o5Pf021jD5mY=";
@@ -21,7 +21,7 @@ buildGoModule rec {
   ldflags = [
     "-s"
     "-w"
-    "-X github.com/dlvhdr/gh-dash/cmd.Version=${version}"
+    "-X github.com/dlvhdr/gh-dash/v4/cmd.Version=${version}"
   ];
 
   passthru.tests = {
diff --git a/pkgs/tools/misc/google-cloud-sql-proxy/default.nix b/pkgs/tools/misc/google-cloud-sql-proxy/default.nix
index 3bf76cc5bf3c6..b9a68b60dbd3e 100644
--- a/pkgs/tools/misc/google-cloud-sql-proxy/default.nix
+++ b/pkgs/tools/misc/google-cloud-sql-proxy/default.nix
@@ -1,22 +1,22 @@
 { lib
-, buildGo122Module
+, buildGoModule
 , fetchFromGitHub
 }:
 
-buildGo122Module rec {
+buildGoModule rec {
   pname = "google-cloud-sql-proxy";
-  version = "2.9.0";
+  version = "2.11.4";
 
   src = fetchFromGitHub {
     owner = "GoogleCloudPlatform";
     repo = "cloud-sql-proxy";
     rev = "v${version}";
-    hash = "sha256-V1Q6DFWSIIff2FuOyE5XwtJN8RObGlhpW/nMWFmNoxI=";
+    hash = "sha256-eM1sS9+L3Z7qCQl+HPcdfoSSdcCKvaz5zwQM4k55hZY=";
   };
 
   subPackages = [ "." ];
 
-  vendorHash = "sha256-sAVMmDeHXEgQXb/Xi4nXYztXjuykE0TFebkeubMTZ3k=";
+  vendorHash = "sha256-/cHQ1vElE+QCxQo6s3Isf2USFP0LWJH3YdcbUfGuuVw=";
 
   checkFlags = [
     "-short"
diff --git a/pkgs/tools/misc/grizzly/default.nix b/pkgs/tools/misc/grizzly/default.nix
index af80a479ba7f5..469fea27fa648 100644
--- a/pkgs/tools/misc/grizzly/default.nix
+++ b/pkgs/tools/misc/grizzly/default.nix
@@ -5,13 +5,13 @@
 
 buildGoModule rec {
   pname = "grizzly";
-  version = "0.4.2";
+  version = "0.4.3";
 
   src = fetchFromGitHub {
     owner = "grafana";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-UOUBck1GrG3ijUpE3jPaFcC/KtlObaR38u3St8NToTk=";
+    hash = "sha256-f60zAE94jdJaGjn+SoO1qs3SgWRpK9pdbirRrsKKBJQ=";
   };
 
   vendorHash = "sha256-lioFmaFzqaxN1wnYJaoHA54to1xGZjaLGaqAFIfTaTs=";
diff --git a/pkgs/tools/misc/gummy/default.nix b/pkgs/tools/misc/gummy/default.nix
index 9d5b473c3b9c4..192c1e3261a56 100644
--- a/pkgs/tools/misc/gummy/default.nix
+++ b/pkgs/tools/misc/gummy/default.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
-, fetchFromGitHub
+, fetchFromGitea
+, substituteAll
 , testers
 , gummy
 , cmake
@@ -8,18 +9,25 @@
 , libXext
 , sdbus-cpp
 , udev
+, xcbutilimage
 , coreutils
+, cli11
+, ddcutil
+, fmt
+, nlohmann_json
+, spdlog
 }:
 
 stdenv.mkDerivation rec {
   pname = "gummy";
-  version = "0.3";
+  version = "0.6.0";
 
-  src = fetchFromGitHub {
-    owner = "fushko";
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "fusco";
     repo = "gummy";
     rev = version;
-    sha256 = "sha256-dw2yOXTS61OIe+NOq8MPydhkZvTit13eC7cbL5nFseg=";
+    hash = "sha256-kATieFf+dEpcYgSEPoETacP7R+u2dOrg7rOhIkNQ1uE=";
   };
 
   nativeBuildInputs = [
@@ -27,25 +35,32 @@ stdenv.mkDerivation rec {
   ];
 
   buildInputs = [
+    cli11
+    ddcutil
+    fmt
     libX11
     libXext
+    nlohmann_json
     sdbus-cpp
+    spdlog
     udev
+    xcbutilimage
   ];
 
   cmakeFlags = [
     "-DUDEV_DIR=${placeholder "out"}/lib/udev"
+    "-DUDEV_RULES_DIR=${placeholder "out"}/lib/udev/rules.d"
   ];
 
   # Fixes the "gummy start" command, without this it cannot find the binary.
   # Setting this through cmake does not seem to work.
   postPatch = ''
-    substituteInPlace src/gummy/gummy.cpp \
+    substituteInPlace gummyd/gummyd/api.cpp \
       --replace "CMAKE_INSTALL_DAEMON_PATH" "\"${placeholder "out"}/libexec/gummyd\""
   '';
 
   preFixup = ''
-    substituteInPlace $out/lib/udev/99-gummy.rules \
+    substituteInPlace $out/lib/udev/rules.d/99-gummy.rules \
       --replace "/bin/chmod" "${coreutils}/bin/chmod"
 
     ln -s $out/libexec/gummyd $out/bin/gummyd
@@ -54,13 +69,13 @@ stdenv.mkDerivation rec {
   passthru.tests.version = testers.testVersion { package = gummy; };
 
   meta = with lib; {
-    homepage = "https://github.com/Fushko/gummy";
+    homepage = "https://codeberg.org/fusco/gummy";
     description = "Brightness and temperature manager for X11";
     longDescription = ''
       CLI screen manager for X11 that allows automatic and manual brightness/temperature adjustments,
       via backlight (currently only for embedded displays) and gamma. Multiple monitors are supported.
     '';
     license = licenses.gpl3Only;
-    maintainers = [ maintainers.ivar ];
+    maintainers = with maintainers; [ ivar ];
   };
 }
diff --git a/pkgs/tools/misc/phrase-cli/default.nix b/pkgs/tools/misc/phrase-cli/default.nix
index fa262ec1e583c..7cd0a3cabcba9 100644
--- a/pkgs/tools/misc/phrase-cli/default.nix
+++ b/pkgs/tools/misc/phrase-cli/default.nix
@@ -2,16 +2,16 @@
 
 buildGoModule rec {
   pname = "phrase-cli";
-  version = "2.28.0";
+  version = "2.28.1";
 
   src = fetchFromGitHub {
     owner = "phrase";
     repo = "phrase-cli";
     rev = version;
-    sha256 = "sha256-jaGCNWbq/CDxJXiGqueM1mj86K26Eyr0ND08Pt0IEj0=";
+    sha256 = "sha256-pGh1OorNF2fe5rKkszQc2PadrrN/Kpx0+7E5fJERYpQ=";
   };
 
-  vendorHash = "sha256-MwwIzgOmEUcTxdlJWKZU8A4fH3efuNIeS/mFceBYBY0=";
+  vendorHash = "sha256-lXgTi6hYDBK1QGw8RQoNIHIlmyHPM6z8RYAmbW7N42s=";
 
   ldflags = [ "-X=github.com/phrase/phrase-cli/cmd.PHRASE_CLIENT_VERSION=${version}" ];
 
diff --git a/pkgs/tools/misc/remind/default.nix b/pkgs/tools/misc/remind/default.nix
index 467981bb0a294..51448931dcfb3 100644
--- a/pkgs/tools/misc/remind/default.nix
+++ b/pkgs/tools/misc/remind/default.nix
@@ -1,4 +1,5 @@
 { lib
+, stdenv
 , fetchurl
 , tk
 , tcllib
@@ -6,38 +7,43 @@
 , tkremind ? true
 }:
 
-let
-  inherit (lib) optionals optionalString;
-  tclLibraries = optionals tkremind [ tcllib tk ];
-  tkremindPatch = optionalString tkremind ''
-    substituteInPlace scripts/tkremind --replace "exec wish" "exec ${tk}/bin/wish"
-  '';
-in
 tcl.mkTclDerivation rec {
   pname = "remind";
   version = "05.00.01";
 
   src = fetchurl {
     url = "https://dianne.skoll.ca/projects/remind/download/remind-${version}.tar.gz";
-    sha256 = "sha256-tj36/lLn67/hkNMrRVGXRLqQ9Sx6oDKZHeajiSYn97c=";
+    hash = "sha256-tj36/lLn67/hkNMrRVGXRLqQ9Sx6oDKZHeajiSYn97c=";
   };
 
-  propagatedBuildInputs = tclLibraries;
+  propagatedBuildInputs = lib.optionals tkremind [ tcllib tk ];
 
-  postPatch = ''
-    substituteInPlace ./configure \
-      --replace "sleep 1" "true"
-    substituteInPlace ./src/init.c \
-      --replace "rkrphgvba(0);" "" \
-      --replace "rkrphgvba(1);" ""
-    ${tkremindPatch}
+  postPatch = lib.optionalString tkremind ''
+    # NOTA BENE: The path to rem2pdf is replaced in tkremind for future use
+    # as rem2pdf is currently not build since it requires the JSON::MaybeXS,
+    # Pango and Cairo Perl modules.
+    substituteInPlace scripts/tkremind \
+      --replace-fail "exec wish" "exec ${lib.getBin tk}/bin/wish" \
+      --replace-fail 'set Remind "remind"' "set Remind \"$out/bin/remind\"" \
+      --replace-fail 'set Rem2PS "rem2ps"' "set Rem2PS \"$out/bin/rem2ps\"" \
+      --replace-fail 'set Rem2PDF "rem2pdf"' "set Rem2PDF \"$out/bin/rem2pdf\""
   '';
 
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin (toString [
+    # Disable clang link time optimization until the following issue is resolved:
+    # https://github.com/NixOS/nixpkgs/issues/19098
+    "-fno-lto"
+    # On Darwin setenv and unsetenv are defined in stdlib.h from libSystem
+    "-DHAVE_SETENV"
+    "-DHAVE_UNSETENV"
+  ]);
+
   meta = with lib; {
     homepage = "https://dianne.skoll.ca/projects/remind/";
     description = "Sophisticated calendar and alarm program for the console";
     license = licenses.gpl2Only;
     maintainers = with maintainers; [ raskin kovirobi ];
+    mainProgram = "remind";
     platforms = platforms.unix;
   };
 }
diff --git a/pkgs/tools/misc/sensible-utils/default.nix b/pkgs/tools/misc/sensible-utils/default.nix
index 0335a0756401f..4584de1f8fdda 100644
--- a/pkgs/tools/misc/sensible-utils/default.nix
+++ b/pkgs/tools/misc/sensible-utils/default.nix
@@ -2,14 +2,14 @@
 
 stdenv.mkDerivation rec {
   pname = "sensible-utils";
-  version = "0.0.18";
+  version = "0.0.23";
 
   src = fetchFromGitLab {
     domain = "salsa.debian.org";
     owner = "debian";
     repo = "sensible-utils";
     rev = "debian/${version}";
-    sha256 = "sha256-fZJKPnEkPfo/3luUcHzAmGB2k1nkA4ATEQMSz0aN0YY=";
+    sha256 = "sha256-EiWrMDVfauCBHmpJOoJFWOdigtDiNc5DzDoeyWhke9k=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/tools/misc/svtplay-dl/default.nix b/pkgs/tools/misc/svtplay-dl/default.nix
index e03b792456816..ec8cefeab7a8e 100644
--- a/pkgs/tools/misc/svtplay-dl/default.nix
+++ b/pkgs/tools/misc/svtplay-dl/default.nix
@@ -15,7 +15,7 @@ let
     python pytest nose3 cryptography pyyaml requests mock requests-mock
     python-dateutil setuptools;
 
-  version = "4.83";
+  version = "4.89";
 
 in
 
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
     owner = "spaam";
     repo = "svtplay-dl";
     rev = version;
-    hash = "sha256-CaidnRd21qtPKlFMHfQMmYVz/CfN88uBC1XK3JikHf0=";
+    hash = "sha256-EuLXDbJembiFFEuIihrc8KkdqxLBgT4Ib3xwkKibVS8=";
   };
 
   pythonPaths = [ cryptography pyyaml requests ];
diff --git a/pkgs/tools/misc/ttchat/default.nix b/pkgs/tools/misc/ttchat/default.nix
index 5aad1527df42d..ec62357cbbedd 100644
--- a/pkgs/tools/misc/ttchat/default.nix
+++ b/pkgs/tools/misc/ttchat/default.nix
@@ -17,7 +17,7 @@ buildGoModule rec {
     description = "Connect to a Twitch channel's chat from your terminal";
     homepage = "https://github.com/atye/ttchat";
     license = licenses.asl20;
-    maintainers = with maintainers; [ wolfangaukang ];
+    maintainers = [ ];
     mainProgram = "ttchat";
   };
 }
diff --git a/pkgs/tools/misc/xcp/default.nix b/pkgs/tools/misc/xcp/default.nix
index ecdb455986153..718027b1efd7f 100644
--- a/pkgs/tools/misc/xcp/default.nix
+++ b/pkgs/tools/misc/xcp/default.nix
@@ -2,19 +2,19 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "xcp";
-  version = "0.20.4";
+  version = "0.21.0";
 
   src = fetchFromGitHub {
     owner = "tarka";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-0ucm8XBxYwXvpVJN8If8BIToQGiBisKLZJYKuvaORto=";
+    hash = "sha256-RxEEbyM7wXteYteA4GmvXEraHhm+Kkr2UbYR8G0gO8c=";
   };
 
   # no such file or directory errors
   doCheck = false;
 
-  cargoHash = "sha256-UdQUrIRos3TmebotdESvKH+90WVMJ0oTc43p+AT4xMI=";
+  cargoHash = "sha256-ruL1KP3a76DRg0RqpNYz0ZL0V2Ce4v3zt9B/tXyXQs0=";
 
   meta = with lib; {
     description = "Extended cp(1)";
diff --git a/pkgs/tools/misc/yubico-piv-tool/default.nix b/pkgs/tools/misc/yubico-piv-tool/default.nix
index d3c73b62a7b65..eb3a88d1faac4 100644
--- a/pkgs/tools/misc/yubico-piv-tool/default.nix
+++ b/pkgs/tools/misc/yubico-piv-tool/default.nix
@@ -10,9 +10,9 @@
 , help2man
 , cmake
 , zlib
-, withApplePCSC ? stdenv.isDarwin
 , nix-update-script
 , testers
+, withApplePCSC ? stdenv.isDarwin
 }:
 
 stdenv.mkDerivation (finalAttrs: {
@@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
   };
 
   postPatch = ''
-    substituteInPlace CMakeLists.txt --replace "-Werror" ""
+    substituteInPlace CMakeLists.txt --replace-fail "-Werror" ""
   '';
 
   nativeBuildInputs = [
@@ -41,32 +41,37 @@ stdenv.mkDerivation (finalAttrs: {
 
   buildInputs = [
     openssl
-    check
     zlib.dev
   ]
   ++ (if withApplePCSC then [ PCSC ] else [ pcsclite ]);
 
   cmakeFlags = [
-    "-DGENERATE_MAN_PAGES=ON"
-    "-DCMAKE_INSTALL_BINDIR=bin"
-    "-DCMAKE_INSTALL_INCLUDEDIR=include"
-    "-DCMAKE_INSTALL_MANDIR=share/man"
-    "-DCMAKE_INSTALL_LIBDIR=lib"
+    (lib.cmakeBool "GENERATE_MAN_PAGES" true)
+    (lib.cmakeFeature "BACKEND" (if withApplePCSC then "macscard" else "pcsc"))
+    (lib.cmakeFeature "CMAKE_INSTALL_BINDIR" "bin")
+    (lib.cmakeFeature "CMAKE_INSTALL_INCLUDEDIR" "include")
+    (lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib")
+    (lib.cmakeFeature "CMAKE_INSTALL_MANDIR" "share/man")
   ];
 
-  configureFlags = [ "--with-backend=${if withApplePCSC then "macscard" else "pcsc"}" ];
+  doCheck = true;
+
+  nativeCheckInputs = [ check ];
 
   passthru = {
     updateScript = nix-update-script {
       extraArgs = [ "--version-regex" "yubico-piv-tool-([0-9.]+)$" ];
     };
-    tests.version = testers.testVersion {
-      package = finalAttrs.finalPackage;
-      command = "yubico-piv-tool --version";
+    tests = {
+      pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+      version = testers.testVersion {
+        package = finalAttrs.finalPackage;
+        command = "yubico-piv-tool --version";
+      };
     };
   };
 
-  meta = with lib; {
+  meta = {
     homepage = "https://developers.yubico.com/yubico-piv-tool/";
     changelog = "https://developers.yubico.com/yubico-piv-tool/Release_Notes.html";
     description = ''
@@ -80,9 +85,10 @@ stdenv.mkDerivation (finalAttrs: {
       certificates, and create certificate requests, and other operations.
       A shared library and a command-line tool is included.
     '';
-    license = licenses.bsd2;
-    platforms = platforms.all;
-    maintainers = with maintainers; [ viraptor anthonyroussel ];
+    license = lib.licenses.bsd2;
+    platforms = lib.platforms.all;
+    maintainers = with lib.maintainers; [ viraptor anthonyroussel ];
     mainProgram = "yubico-piv-tool";
+    pkgConfigModules = [ "ykcs11" "ykpiv" ];
   };
 })