From 4566c39b2e18d1106f05b59e0808580a12a566eb Mon Sep 17 00:00:00 2001 From: Goeran Heinemann <{ID}+{username}@users.noreply.github.com> Date: Fri, 29 Nov 2024 13:13:17 +0100 Subject: [PATCH] proxmark package in the correct versionwq --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..9a06f64 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1732521221, + "narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..8c89377 --- /dev/null +++ b/flake.nix @@ -0,0 +1,50 @@ +{ + description = "A very basic flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { self, nixpkgs }: { + packages.x86_64-linux = let + archpkgs = nixpkgs.legacyPackages.x86_64-linux; + lib = nixpkgs.lib; + in { + proxmark = archpkgs.stdenv.mkDerivation rec { + pname = "proxmark3-rrg"; + version = "4.19552"; + + src = archpkgs.fetchFromGitHub { + owner = "RfidResearchGroup"; + repo = "proxmark3"; + rev = "v${version}"; + sha256 = "sha256-5Rlw5QlceQGiIuVFNZhyrszCdG+idFo8Vvps46VJSlE="; + }; + + nativeBuildInputs = with archpkgs; [ pkg-config gcc-arm-embedded ]; + buildInputs = with archpkgs; [ lz4 zlib bluez5 readline bzip2 openssl ]; + + makeFlags = [ + "PLATFORM=PM3GENERIC" + "PLATFORM_EXTRAS=" + ]; + + installPhase = '' + mkdir -p $out/misc + cp -r * $out/misc + install -Dt $out/bin client/proxmark3 + install -Dt $out/firmware bootrom/obj/bootrom.elf armsrc/obj/fullimage.elf + ''; + + meta = with lib; { + description = "Client for proxmark3, powerful general purpose RFID tool"; + homepage = "https://rfidresearchgroup.com/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ nyanotech ]; + }; + }; + + }; + formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; + }; +}