Skip to content

Commit b0b74eb

Browse files
authored
cardpeek: fix darwin build (#399602)
2 parents 9550085 + 25f57e1 commit b0b74eb

File tree

2 files changed

+14
-20
lines changed

2 files changed

+14
-20
lines changed

pkgs/applications/misc/cardpeek/default.nix

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
lua5_2,
1111
curl,
1212
readline,
13-
PCSC,
1413
}:
1514
let
1615
version = "0.8.4";
@@ -29,33 +28,30 @@ stdenv.mkDerivation {
2928
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
3029
# replace xcode check and hard-coded PCSC framework path
3130
substituteInPlace configure.ac \
32-
--replace 'if test ! -e "/Applications/Xcode.app/"; then' 'if test yes != yes; then' \
33-
--replace 'PCSC_HEADERS=`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*.sdk/System/Library/Frameworks/PCSC.framework/Versions/Current/Headers/ | sort | head -1`' 'PCSC_HEADERS=${PCSC}/Library/Frameworks/PCSC.framework/Headers'
31+
--replace-fail 'if test ! -e "/Applications/Xcode.app/"; then' 'if test yes != yes; then' \
32+
--replace-fail 'PCSC_HEADERS=`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*.sdk/System/Library/Frameworks/PCSC.framework/Versions/Current/Headers/ | sort | head -1`' 'PCSC_HEADERS=$SDKROOT/System/Library/Frameworks/PCSC.framework/Versions/Current/Headers'
3433
'';
3534

3635
nativeBuildInputs = [
3736
pkg-config
3837
autoreconfHook
3938
];
40-
buildInputs =
41-
[
42-
glib
43-
gtk3
44-
lua5_2
45-
curl
46-
readline
47-
]
48-
++ lib.optional stdenv.hostPlatform.isDarwin PCSC
49-
++ lib.optional stdenv.hostPlatform.isLinux pcsclite;
39+
buildInputs = [
40+
glib
41+
gtk3
42+
lua5_2
43+
curl
44+
readline
45+
] ++ lib.optional stdenv.hostPlatform.isLinux pcsclite;
5046

5147
enableParallelBuilding = true;
5248

53-
meta = with lib; {
49+
meta = {
5450
homepage = "https://github.com/L1L1/cardpeek";
5551
description = "Tool to read the contents of ISO7816 smart cards";
56-
license = licenses.gpl3Plus;
57-
platforms = with platforms; linux ++ darwin;
58-
maintainers = with maintainers; [ embr ];
52+
license = lib.licenses.gpl3Plus;
53+
platforms = lib.platforms.unix;
54+
maintainers = with lib.maintainers; [ embr ];
5955
mainProgram = "cardpeek";
6056
};
6157
}

pkgs/top-level/all-packages.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,9 +2202,7 @@ with pkgs;
22022202

22032203
catch2_3 = callPackage ../development/libraries/catch2/3.nix { };
22042204

2205-
cardpeek = callPackage ../applications/misc/cardpeek {
2206-
inherit (darwin.apple_sdk.frameworks) PCSC;
2207-
};
2205+
cardpeek = callPackage ../applications/misc/cardpeek { };
22082206

22092207
ceres-solver = callPackage ../development/libraries/ceres-solver {
22102208
gflags = null; # only required for examples/tests

0 commit comments

Comments
 (0)