mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
snagboot: init at 1.0
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
This commit is contained in:
parent
281deb5e89
commit
4c1fb21f84
76
pkgs/applications/misc/snagboot/default.nix
Normal file
76
pkgs/applications/misc/snagboot/default.nix
Normal file
|
@ -0,0 +1,76 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchPypi
|
||||
, pythonRelaxDepsHook
|
||||
, python3
|
||||
, snagboot
|
||||
, testers
|
||||
, gitUpdater
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "snagboot";
|
||||
version = "1.0";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-wtIcrd3s/ZfdYqi2a2+IvVYnJie5txJy6d2m+GjuhxU=";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
updateScript = gitUpdater {
|
||||
rev-prefix = "v";
|
||||
ignoredVersions = ".(rc|beta).*";
|
||||
};
|
||||
|
||||
tests.version = testers.testVersion {
|
||||
package = snagboot;
|
||||
command = "snagrecover --version";
|
||||
version = "v${version}";
|
||||
};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
pythonRemoveDeps = [
|
||||
"pylibfdt"
|
||||
"swig"
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
setuptools
|
||||
pyusb
|
||||
pyserial
|
||||
hid
|
||||
crccheck
|
||||
six
|
||||
xmodem
|
||||
pyyaml
|
||||
libfdt
|
||||
tftpy
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString stdenv.isLinux ''
|
||||
rules="src/snagrecover/80-snagboot.rules"
|
||||
if [ ! -f "$rules" ]; then
|
||||
echo "$rules is missing, must update the Nix file."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$out/lib/udev/rules.d"
|
||||
cp "$rules" "$out/lib/udev/rules.d/80-snagboot.rules"
|
||||
'';
|
||||
|
||||
# There are no tests
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/bootlin/snagboot";
|
||||
description = "Generic recovery and reflashing tool for embedded platforms";
|
||||
license = lib.licenses.gpl2;
|
||||
maintainers = with lib.maintainers; [ otavio ];
|
||||
};
|
||||
}
|
|
@ -1705,6 +1705,8 @@ with pkgs;
|
|||
|
||||
shell-genie = callPackage ../applications/misc/shell-genie { };
|
||||
|
||||
snagboot = python3.pkgs.callPackage ../applications/misc/snagboot { };
|
||||
|
||||
simple-dlna-browser = callPackage ../tools/networking/simple-dlna-browser { };
|
||||
|
||||
sorted-grep = callPackage ../tools/text/sorted-grep { };
|
||||
|
|
Loading…
Reference in a new issue