1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00

proxmark3: refactor & init unstable at 2019-12-28

This commit is contained in:
Franz Pletz 2020-01-01 20:11:38 +01:00
parent 3c974c71cd
commit f197a51583
No known key found for this signature in database
GPG key ID: 846FDED7792617B4
2 changed files with 53 additions and 30 deletions
pkgs
tools/security/proxmark3
top-level

View file

@ -1,37 +1,59 @@
{ stdenv, fetchFromGitHub, pkgconfig, ncurses, readline }: { stdenv, fetchFromGitHub, pkgconfig, ncurses, readline, pcsclite, qt5
, gcc-arm-embedded }:
stdenv.mkDerivation rec { let
pname = "proxmark3"; generic = { pname, version, rev, sha256 }:
version = "3.1.0"; stdenv.mkDerivation rec {
inherit pname version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Proxmark"; owner = "Proxmark";
repo = pname; repo = "proxmark3";
inherit rev sha256;
};
nativeBuildInputs = [ pkgconfig gcc-arm-embedded ];
buildInputs = [ ncurses readline pcsclite qt5.qtbase ];
postPatch = ''
substituteInPlace client/Makefile --replace '-ltermcap' ' '
substituteInPlace liblua/Makefile --replace '-ltermcap' ' '
substituteInPlace client/flasher.c \
--replace 'armsrc/obj/fullimage.elf' \
'${placeholder "out"}/firmware/fullimage.elf'
'';
buildPhase = ''
make bootrom/obj/bootrom.elf armsrc/obj/fullimage.elf client
'';
installPhase = ''
install -Dt $out/bin client/proxmark3
install -T client/flasher $out/bin/proxmark3-flasher
install -Dt $out/firmware bootrom/obj/bootrom.elf armsrc/obj/fullimage.elf
'';
meta = with stdenv.lib; {
description = "Client for proxmark3, powerful general purpose RFID tool";
homepage = http://www.proxmark.org;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ fpletz ];
};
};
in
{
proxmark3 = generic rec {
pname = "proxmark3";
version = "3.1.0";
rev = "v${version}"; rev = "v${version}";
sha256 = "1qw28n1bhhl91ix77lv50qcr919fq3hjc8zhhqphwxal2svgx2jf"; sha256 = "1qw28n1bhhl91ix77lv50qcr919fq3hjc8zhhqphwxal2svgx2jf";
}; };
nativeBuildInputs = [ pkgconfig ]; proxmark3-unstable = generic {
buildInputs = [ ncurses readline ]; pname = "proxmark3-unstable";
version = "2019-12-28";
postPatch = '' rev = "a4ff62be63ca2a81071e9aa2b882bd3ff57f13ad";
substituteInPlace client/Makefile --replace '-ltermcap' ' ' sha256 = "067lp28xqx61n3i2a2fy489r5frwxqrcfj8cpv3xdzi3gb3vk5c3";
substituteInPlace liblua/Makefile --replace '-ltermcap' ' '
'';
preBuild = ''
cd client
'';
installPhase = ''
mkdir -p $out/bin
cp proxmark3 $out/bin
'';
meta = with stdenv.lib; {
description = "Client for proxmark3, powerful general purpose RFID tool";
homepage = http://www.proxmark.org;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ fpletz ];
}; };
} }

View file

@ -5820,7 +5820,8 @@ in
prototypejs = callPackage ../development/libraries/prototypejs { }; prototypejs = callPackage ../development/libraries/prototypejs { };
proxmark3 = callPackage ../tools/security/proxmark3 { }; inherit (callPackages ../tools/security/proxmark3 { gcc-arm-embedded = gcc-arm-embedded-8; })
proxmark3 proxmark3-unstable;
proxychains = callPackage ../tools/networking/proxychains { }; proxychains = callPackage ../tools/networking/proxychains { };