about summary refs log tree commit diff
path: root/pkgs/development/embedded
diff options
context:
space:
mode:
authorLorenz Brun <lorenz@brun.one>2023-02-16 23:22:01 +0100
committerLorenz Brun <lorenz@brun.one>2023-03-16 00:17:20 +0100
commit76c796628de6e7150942a6e7d739f011d56da1cb (patch)
tree684155f87aaa0dc07fb262fb596ec3e9a4ecd310 /pkgs/development/embedded
parent52aba652e36aaae00b4fbda4abf142d73f7e4699 (diff)
edl: init at unstable-2022-09-07
This adds edl, a tool for interfacing with the low-level flashing and
recovery interface embedded in the Boot ROM of a lot of Qualcomm SoCs.

An unreleased version is used as the last released version is very old
and does not properly install itself.
Diffstat (limited to 'pkgs/development/embedded')
-rw-r--r--pkgs/development/embedded/edl/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/embedded/edl/default.nix b/pkgs/development/embedded/edl/default.nix
new file mode 100644
index 0000000000000..2e1f09ffd2089
--- /dev/null
+++ b/pkgs/development/embedded/edl/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonPackage rec {
+  pname = "edl";
+  version = "unstable-2022-09-07";
+
+  src = fetchFromGitHub rec {
+    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
+    docopt
+    pylzma
+    pycryptodome
+    lxml
+    colorama
+    # usb
+    capstone
+    keystone-engine
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/bkerler/edl";
+    description = "Qualcomm EDL tool (Sahara / Firehose / Diag)";
+    license = licenses.mit;
+    maintainers = with maintainers; [ lorenz ];
+    # Case-sensitive files in 'Loader' submodule
+    broken = stdenv.isDarwin;
+  };
+}
+