tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
cardpeek: fix build on darwin
flurie
4 years ago
ef1a0dab
c8920ed7
+44
-23
2 changed files
expand all
collapse all
unified
split
pkgs
applications
misc
cardpeek
default.nix
top-level
all-packages.nix
+43
-22
pkgs/applications/misc/cardpeek/default.nix
···
1
1
-
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook,
2
2
-
glib, gtk3, pcsclite, lua5_2, curl, readline }:
1
1
+
{ lib
2
2
+
, stdenv
3
3
+
, fetchFromGitHub
4
4
+
, pkg-config
5
5
+
, autoreconfHook
6
6
+
, glib
7
7
+
, gtk3
8
8
+
, pcsclite
9
9
+
, lua5_2
10
10
+
, curl
11
11
+
, readline
12
12
+
, PCSC
13
13
+
, xcbuild
14
14
+
}:
3
15
let
4
16
version = "0.8.4";
5
17
in
6
6
-
stdenv.mkDerivation {
7
7
-
pname = "cardpeek";
8
8
-
inherit version;
18
18
+
stdenv.mkDerivation {
19
19
+
pname = "cardpeek";
20
20
+
inherit version;
9
21
10
10
-
src = fetchFromGitHub {
11
11
-
owner = "L1L1";
12
12
-
repo = "cardpeek";
13
13
-
rev = "cardpeek-${version}";
14
14
-
sha256 = "1ighpl7nvcvwnsd6r5h5n9p95kclwrq99hq7bry7s53yr57l6588";
15
15
-
};
22
22
+
src = fetchFromGitHub {
23
23
+
owner = "L1L1";
24
24
+
repo = "cardpeek";
25
25
+
rev = "cardpeek-${version}";
26
26
+
sha256 = "1ighpl7nvcvwnsd6r5h5n9p95kclwrq99hq7bry7s53yr57l6588";
27
27
+
};
28
28
+
29
29
+
postPatch = lib.optionalString stdenv.isDarwin ''
30
30
+
# replace xcode check and hard-coded PCSC framework path
31
31
+
substituteInPlace configure.ac \
32
32
+
--replace 'if test ! -e "/Applications/Xcode.app/"; then' 'if test yes != yes; then' \
33
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'
34
34
+
'';
16
35
17
17
-
nativeBuildInputs = [ pkg-config autoreconfHook ];
18
18
-
buildInputs = [ glib gtk3 pcsclite lua5_2 curl readline ];
36
36
+
nativeBuildInputs = [ pkg-config autoreconfHook ];
37
37
+
buildInputs = [ glib gtk3 lua5_2 curl readline ]
38
38
+
++ lib.optional stdenv.isDarwin PCSC
39
39
+
++ lib.optional stdenv.isLinux pcsclite;
19
40
20
20
-
enableParallelBuilding = true;
41
41
+
enableParallelBuilding = true;
21
42
22
22
-
meta = with lib; {
23
23
-
homepage = "https://github.com/L1L1/cardpeek";
24
24
-
description = "A tool to read the contents of ISO7816 smart cards";
25
25
-
license = licenses.gpl3Plus;
26
26
-
platforms = with platforms; linux ++ darwin;
27
27
-
maintainers = with maintainers; [ embr ];
28
28
-
};
29
29
-
}
43
43
+
meta = with lib; {
44
44
+
homepage = "https://github.com/L1L1/cardpeek";
45
45
+
description = "A tool to read the contents of ISO7816 smart cards";
46
46
+
license = licenses.gpl3Plus;
47
47
+
platforms = with platforms; linux ++ darwin;
48
48
+
maintainers = with maintainers; [ embr ];
49
49
+
};
50
50
+
}
+1
-1
pkgs/top-level/all-packages.nix
···
2377
2377
2378
2378
catclock = callPackage ../applications/misc/catclock { };
2379
2379
2380
2380
-
cardpeek = callPackage ../applications/misc/cardpeek { };
2380
2380
+
cardpeek = callPackage ../applications/misc/cardpeek { inherit (darwin.apple_sdk.frameworks) PCSC; };
2381
2381
2382
2382
cawbird = callPackage ../applications/networking/cawbird { };
2383
2383