@@ -0,0 +1,37 @@
1+{ stdenv, fetchFromGitHub, pkgconfig, ncurses, readline }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "proxmark3";
5+ version = "3.1.0";
6+
7+ src = fetchFromGitHub {
8+ owner = "Proxmark";
9+ repo = pname;
10+ rev = "v${version}";
11+ sha256 = "1qw28n1bhhl91ix77lv50qcr919fq3hjc8zhhqphwxal2svgx2jf";
12+ };
13+
14+ nativeBuildInputs = [ pkgconfig ];
15+ buildInputs = [ ncurses readline ];
16+
17+ postPatch = ''
18+ substituteInPlace client/Makefile --replace '-ltermcap' ' '
19+ substituteInPlace liblua/Makefile --replace '-ltermcap' ' '
20+ '';
21+
22+ preBuild = ''
23+ cd client
24+ '';
25+
26+ installPhase = ''
27+ mkdir -p $out/bin
28+ cp proxmark3 $out/bin
29+ '';
30+
31+ meta = with stdenv.lib; {
32+ description = "Client for proxmark3, powerful general purpose RFID tool";
33+ homepage = http://www.proxmark.org;
34+ license = licenses.gpl2Plus;
35+ maintainers = with maintainers; [ fpletz ];
36+ };
37+}