From 5f31ac17c5f8e174caf935a9e3a2d7d6ef70d2b4 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Mon, 6 Jul 2020 15:21:27 +0200 Subject: [PATCH] ubidump: init at unstable-2019-09-11 --- pkgs/tools/filesystems/ubidump/default.nix | 40 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/tools/filesystems/ubidump/default.nix diff --git a/pkgs/tools/filesystems/ubidump/default.nix b/pkgs/tools/filesystems/ubidump/default.nix new file mode 100644 index 000000000000..4feca6a040b4 --- /dev/null +++ b/pkgs/tools/filesystems/ubidump/default.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchFromGitHub, python3, makeWrapper }: + +python3.pkgs.buildPythonApplication rec { + + pname = "ubidump"; + version = "unstable-2019-09-11"; + + src = fetchFromGitHub { + owner = "nlitsme"; + repo = pname; + rev = "0691f1a9a38604c2baf8c9af6b826eb2632af74a"; + sha256 = "1hiivlgni4r3nd5n2rzl5qzw6y2wpjpmyls5lybrc8imd6rmj3w2"; + }; + + propagatedBuildInputs = with python3.pkgs; [ crcmod python-lzo ]; + + phases = [ "unpackPhase" "patchPhase" "installPhase" "installCheckPhase" ]; + + patchPhase = '' + sed -i '1s;^;#!${python3.interpreter}\n;' ubidump.py + patchShebangs ubidump.py + ''; + + installPhase = '' + install -D -m755 ubidump.py $out/bin/ubidump + wrapProgram $out/bin/ubidump --set PYTHONPATH $PYTHONPATH + ''; + + installCheckPhase = '' + $out/bin/ubidump -h > /dev/null + ''; + + meta = with stdenv.lib; { + description = "View or extract the contents of UBIFS images"; + homepage = "https://github.com/nlitsme/ubidump"; + license = licenses.mit; + maintainers = with maintainers; [ sgo ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f69cc670dc48..9c9403ea3ff7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7597,6 +7597,8 @@ in ua = callPackage ../tools/networking/ua { }; + ubidump = python3Packages.callPackage ../tools/filesystems/ubidump { }; + ubridge = callPackage ../tools/networking/ubridge { }; ucl = callPackage ../development/libraries/ucl { };