2023-07-25 17:08:41 +03:00
|
|
|
{ lib, fetchFromGitHub, python3 }:
|
2020-07-06 16:21:27 +03:00
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
|
|
|
|
pname = "ubidump";
|
|
|
|
version = "unstable-2019-09-11";
|
2022-09-17 04:04:53 +03:00
|
|
|
format = "other";
|
2020-07-06 16:21:27 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nlitsme";
|
|
|
|
repo = pname;
|
|
|
|
rev = "0691f1a9a38604c2baf8c9af6b826eb2632af74a";
|
|
|
|
sha256 = "1hiivlgni4r3nd5n2rzl5qzw6y2wpjpmyls5lybrc8imd6rmj3w2";
|
|
|
|
};
|
|
|
|
|
2022-09-17 04:04:53 +03:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [ crcmod python-lzo setuptools ];
|
2020-07-06 16:21:27 +03:00
|
|
|
|
2021-07-20 13:10:39 +03:00
|
|
|
dontBuild = true;
|
2020-07-06 16:21:27 +03:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2020-07-06 16:21:27 +03:00
|
|
|
description = "View or extract the contents of UBIFS images";
|
|
|
|
homepage = "https://github.com/nlitsme/ubidump";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ sgo ];
|
2023-11-24 00:09:35 +03:00
|
|
|
mainProgram = "ubidump";
|
2020-07-06 16:21:27 +03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|