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
-
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook,
2
-
glib, gtk3, pcsclite, lua5_2, curl, readline }:
0
0
0
0
0
0
0
0
0
0
0
0
3
let
4
version = "0.8.4";
5
in
6
-
stdenv.mkDerivation {
7
-
pname = "cardpeek";
8
-
inherit version;
9
10
-
src = fetchFromGitHub {
11
-
owner = "L1L1";
12
-
repo = "cardpeek";
13
-
rev = "cardpeek-${version}";
14
-
sha256 = "1ighpl7nvcvwnsd6r5h5n9p95kclwrq99hq7bry7s53yr57l6588";
15
-
};
0
0
0
0
0
0
0
16
17
-
nativeBuildInputs = [ pkg-config autoreconfHook ];
18
-
buildInputs = [ glib gtk3 pcsclite lua5_2 curl readline ];
0
0
19
20
-
enableParallelBuilding = true;
21
22
-
meta = with lib; {
23
-
homepage = "https://github.com/L1L1/cardpeek";
24
-
description = "A tool to read the contents of ISO7816 smart cards";
25
-
license = licenses.gpl3Plus;
26
-
platforms = with platforms; linux ++ darwin;
27
-
maintainers = with maintainers; [ embr ];
28
-
};
29
-
}
···
1
+
{ lib
2
+
, stdenv
3
+
, fetchFromGitHub
4
+
, pkg-config
5
+
, autoreconfHook
6
+
, glib
7
+
, gtk3
8
+
, pcsclite
9
+
, lua5_2
10
+
, curl
11
+
, readline
12
+
, PCSC
13
+
, xcbuild
14
+
}:
15
let
16
version = "0.8.4";
17
in
18
+
stdenv.mkDerivation {
19
+
pname = "cardpeek";
20
+
inherit version;
21
22
+
src = fetchFromGitHub {
23
+
owner = "L1L1";
24
+
repo = "cardpeek";
25
+
rev = "cardpeek-${version}";
26
+
sha256 = "1ighpl7nvcvwnsd6r5h5n9p95kclwrq99hq7bry7s53yr57l6588";
27
+
};
28
+
29
+
postPatch = lib.optionalString stdenv.isDarwin ''
30
+
# replace xcode check and hard-coded PCSC framework path
31
+
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'
34
+
'';
35
36
+
nativeBuildInputs = [ pkg-config autoreconfHook ];
37
+
buildInputs = [ glib gtk3 lua5_2 curl readline ]
38
+
++ lib.optional stdenv.isDarwin PCSC
39
+
++ lib.optional stdenv.isLinux pcsclite;
40
41
+
enableParallelBuilding = true;
42
43
+
meta = with lib; {
44
+
homepage = "https://github.com/L1L1/cardpeek";
45
+
description = "A tool to read the contents of ISO7816 smart cards";
46
+
license = licenses.gpl3Plus;
47
+
platforms = with platforms; linux ++ darwin;
48
+
maintainers = with maintainers; [ embr ];
49
+
};
50
+
}
+1
-1
pkgs/top-level/all-packages.nix
···
2377
2378
catclock = callPackage ../applications/misc/catclock { };
2379
2380
-
cardpeek = callPackage ../applications/misc/cardpeek { };
2381
2382
cawbird = callPackage ../applications/networking/cawbird { };
2383
···
2377
2378
catclock = callPackage ../applications/misc/catclock { };
2379
2380
+
cardpeek = callPackage ../applications/misc/cardpeek { inherit (darwin.apple_sdk.frameworks) PCSC; };
2381
2382
cawbird = callPackage ../applications/networking/cawbird { };
2383