about summary refs log tree commit diff
path: root/pkgs/tools/security
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r--pkgs/tools/security/pcsclite/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/tools/security/pcsclite/default.nix b/pkgs/tools/security/pcsclite/default.nix
index 08a4b5b08d02a..2b55b76b66543 100644
--- a/pkgs/tools/security/pcsclite/default.nix
+++ b/pkgs/tools/security/pcsclite/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: {
   inherit pname;
   version = "2.0.1";
 
-  outputs = [ "bin" "out" "dev" "doc" "man" ];
+  outputs = [ "out" "lib" "dev" "doc" "man" ];
 
   src = fetchFromGitLab {
     domain = "salsa.debian.org";
@@ -39,13 +39,21 @@ stdenv.mkDerivation (finalAttrs: {
     (lib.enableFeature polkitSupport "polkit")
   ] ++ lib.optionals stdenv.isLinux [
     "--enable-ipcdir=/run/pcscd"
-    "--with-systemdsystemunitdir=${placeholder "bin"}/lib/systemd/system"
+    "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
   ];
 
   makeFlags = [
     "POLICY_DIR=$(out)/share/polkit-1/actions"
   ];
 
+  # disable building pcsc-wirecheck{,-gen} when cross compiling
+  # see also: https://github.com/LudovicRousseau/PCSC/issues/25
+  postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
+    substituteInPlace src/Makefile.am \
+      --replace "noinst_PROGRAMS = testpcsc pcsc-wirecheck pcsc-wirecheck-gen" \
+                "noinst_PROGRAMS = testpcsc"
+  '';
+
   postInstall = ''
     # pcsc-spy is a debugging utility and it drags python into the closure
     moveToOutput bin/pcsc-spy "$dev"