Skip to content

Commit

Permalink
ubidump: init at unstable-2019-09-11
Browse files Browse the repository at this point in the history
  • Loading branch information
stigtsp committed Sep 22, 2020
1 parent 807654c commit 5f31ac1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
40 changes: 40 additions & 0 deletions 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 ];
};
}

2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -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 { };
Expand Down

0 comments on commit 5f31ac1

Please sign in to comment.