Merge pull request #264402 from otavio/init-uuu

uuu: init at 1.5.125
This commit is contained in:
Thiago Kenji Okada 2023-11-01 00:29:20 +00:00 committed by GitHub
commit 9a7ca05d01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,4 @@
_uuu_autocomplete() {
COMPREPLY=($(uuu $1 $2 $3))
}
complete -o nospace -F _uuu_autocomplete uuu

64
pkgs/by-name/uu/uuu/package.nix Executable file
View File

@ -0,0 +1,64 @@
{ lib
, stdenv
, fetchFromGitHub
, nix-update-script
, cmake
, installShellFiles
, pkg-config
, bzip2
, libusb1
, openssl
, zlib
, zstd
}:
stdenv.mkDerivation (finalAttrs: {
pname = "uuu";
version = "1.5.125";
src = fetchFromGitHub {
owner = "nxp-imx";
repo = "mfgtools";
rev = "uuu_${finalAttrs.version}";
hash = "sha256-f9Nt303xXZzLSu3GtOEpyaL91WVFUmKO7mxi8UNX3go=";
};
passthru.updateScript = nix-update-script { };
nativeBuildInputs = [
cmake
installShellFiles
pkg-config
];
buildInputs = [
bzip2
libusb1
openssl
zlib
zstd
];
postPatch = ''
# Avoid the need of calling Git during the build.
echo "uuu_${finalAttrs.version}" > .tarball-version
'';
postInstall = ''
installShellCompletion --bash --name uuu.bash ${./completion.bash}
mkdir -p $out/lib/udev/rules.d
cat <($out/bin/uuu -udev) > $out/lib/udev/rules.d/70-uuu.rules
'';
meta = with lib; {
description = "Freescale/NXP I.MX Chip image deploy tools";
homepage = "https://github.com/nxp-imx/mfgtools";
license = licenses.bsd3;
maintainers = with maintainers; [ otavio ];
mainProgram = "uuu";
platforms = platforms.all;
};
})