22 src = fetchFromGitHub {
25 rev = "cardpeek-${version}";
26 sha256 = "1ighpl7nvcvwnsd6r5h5n9p95kclwrq99hq7bry7s53yr57l6588";
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'
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;
41 enableParallelBuilding = true;
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 ];