1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 { stdenv, applyPatches, fetchFromGitHub, pkg-config, glib, gwenhywfar, libchipcard, ... }:
stdenv.mkDerivation rec {
pname = "usbtan-cli";
version = "0.0.0";
src = applyPatches {
src = fetchFromGitHub {
owner = "hoehermann";
repo = pname;
rev = "8aa2e0098ff3c21c966f46fcccf7ca9addc18228";
sha256 = "sha256-thjquaSStf+RF12xvxVS6NtCFpF/voEIZO5ArVtPHl8";
};
patches = [
./0001-fix-makefile.patch
];
};
nativeBuildInputs = [ pkg-config glib libchipcard gwenhywfar ];
shellHook = ''
export PKG_CONFIG_PATH=${glib}/lib/pkgconfig/:${gwenhywfar}/lib/pkgconfig/:${libchipcard}/lib/pkgconfig
'';
installPhase = ''
mkdir -p $out/bin
cp usbtan-cli $out/bin/usbtan-cli
'';
}