From c19d62ad2265b16e2199c5feb4650fe459ca1c46 Mon Sep 17 00:00:00 2001 From: Alex Jackson Date: Sun, 21 Jul 2024 06:05:48 -0500 Subject: [PATCH] edl: add udev rules (#323878) --- pkgs/development/embedded/edl/default.nix | 31 ++++++++++++++--------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/pkgs/development/embedded/edl/default.nix b/pkgs/development/embedded/edl/default.nix index 2e1f09ffd208..23fbc7310ce0 100644 --- a/pkgs/development/embedded/edl/default.nix +++ b/pkgs/development/embedded/edl/default.nix @@ -1,25 +1,17 @@ { lib, stdenv, fetchFromGitHub, python3Packages }: -python3Packages.buildPythonPackage rec { +python3Packages.buildPythonPackage { pname = "edl"; version = "unstable-2022-09-07"; - src = fetchFromGitHub rec { + src = fetchFromGitHub { owner = "bkerler"; repo = "edl"; rev = "f6b94da5faa003b48d24a5f4a8f0b8495626fd5b"; fetchSubmodules = true; hash = "sha256-bxnRy+inWNArE2gUA/qDPy7NKvqBm43sbxdIaTc9N28="; }; - # edl has a spurious dependency on "usb" which has nothing to do with the - # project and was probably added by accident trying to add pyusb - postPatch = '' - sed -i '/'usb'/d' setup.py - ''; - # No tests set up - doCheck = false; - # EDL loaders are ELFs but shouldn't be touched, rest is Python anyways - dontStrip = true; + propagatedBuildInputs = with python3Packages; [ pyusb pyserial @@ -28,11 +20,26 @@ python3Packages.buildPythonPackage rec { pycryptodome lxml colorama - # usb capstone keystone-engine ]; + # No tests set up + doCheck = false; + # EDL loaders are ELFs but shouldn't be touched, rest is Python anyways + dontStrip = true; + + # edl has a spurious dependency on "usb" which has nothing to do with the + # project and was probably added by accident trying to add pyusb + postPatch = '' + sed -i '/'usb'/d' setup.py + ''; + + postInstall = '' + mkdir -p $out/etc/udev/rules.d + cp $src/Drivers/51-edl.rules $out/etc/udev/rules.d/51-edl.rules + ''; + meta = with lib; { homepage = "https://github.com/bkerler/edl"; description = "Qualcomm EDL tool (Sahara / Firehose / Diag)";