2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nix-update-script
|
|
|
|
|
|
|
|
, cmake
|
|
|
|
, installShellFiles
|
|
|
|
, pkg-config
|
|
|
|
|
|
|
|
, bzip2
|
|
|
|
, libusb1
|
|
|
|
, openssl
|
2024-04-21 15:54:59 +00:00
|
|
|
, tinyxml-2
|
2023-11-16 04:20:00 +00:00
|
|
|
, zlib
|
|
|
|
, zstd
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "uuu";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.5.179";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nxp-imx";
|
|
|
|
repo = "mfgtools";
|
|
|
|
rev = "uuu_${finalAttrs.version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-W0jFwivjD19SQmXz2G7cIvWh1zkyN4AXh3bfqF302MA=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru.updateScript = nix-update-script {
|
|
|
|
extraArgs = [ "--version-regex" "uuu_\([0-9.]+\)" ];
|
|
|
|
};
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
installShellFiles
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
bzip2
|
|
|
|
libusb1
|
|
|
|
openssl
|
2024-04-21 15:54:59 +00:00
|
|
|
tinyxml-2
|
2023-11-16 04:20:00 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
})
|