diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2023-10-30 13:56:03 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2023-10-31 15:09:00 -0300 |
commit | c3d5929b802aa58f811f5e94e0a5614e306416dc (patch) | |
tree | f6d3c723adc061f846d15a4b550a6d9b69a80714 /pkgs/by-name/uu/uuu | |
parent | 8fc9bb20e48ad01bd837726f48e1575aedbee9a5 (diff) |
uuu: init at 1.5.125
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'pkgs/by-name/uu/uuu')
-rw-r--r-- | pkgs/by-name/uu/uuu/completion.bash | 4 | ||||
-rwxr-xr-x | pkgs/by-name/uu/uuu/package.nix | 64 |
2 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/by-name/uu/uuu/completion.bash b/pkgs/by-name/uu/uuu/completion.bash new file mode 100644 index 0000000000000..702fe98333cf4 --- /dev/null +++ b/pkgs/by-name/uu/uuu/completion.bash @@ -0,0 +1,4 @@ +_uuu_autocomplete() { + COMPREPLY=($(uuu $1 $2 $3)) +} +complete -o nospace -F _uuu_autocomplete uuu diff --git a/pkgs/by-name/uu/uuu/package.nix b/pkgs/by-name/uu/uuu/package.nix new file mode 100755 index 0000000000000..831119e1d4710 --- /dev/null +++ b/pkgs/by-name/uu/uuu/package.nix @@ -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; + }; +}) |