rpi-imager: 2.0.2 -> 2.0.6 (#487062)

This commit is contained in:
Marcin Serwin 2026-03-06 18:45:04 +00:00 committed by GitHub
commit d553f8f2f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,29 +4,31 @@
cmake,
curl,
fetchFromGitHub,
gnutls,
libarchive,
libtasn1,
liburing,
nix-update-script,
pkg-config,
qt6,
wrapGAppsHook4,
testers,
wrapGAppsHook4,
writeShellScriptBin,
xz,
gnutls,
zstd,
libtasn1,
enableTelemetry ? false,
enableUring ? stdenv.hostPlatform.isLinux,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rpi-imager";
version = "2.0.2";
version = "2.0.6";
src = fetchFromGitHub {
owner = "raspberrypi";
repo = "rpi-imager";
tag = "v${finalAttrs.version}";
hash = "sha256-dfzWVmRthoLzI//jfeY6P1W/sfT0cNjhp5EiNQQy8zA=";
hash = "sha256-YbPGxc6EWE3B+7MWgtwTDRdjin9FM7KpWfw38FqKXYA=";
};
patches = [ ./remove-vendoring.patch ];
@ -43,34 +45,41 @@ stdenv.mkDerivation (finalAttrs: {
cd src
'';
nativeBuildInputs = [
cmake
pkg-config
qt6.wrapQtAppsHook
wrapGAppsHook4
# Fool upstream's cmake lsblk check a bit
(writeShellScriptBin "lsblk" ''
echo "our lsblk has --json support but it doesn't work in our sandbox"
'')
# Upstream uses `git describe` to define a `IMAGER_VERSION` CMake variable,
# and we fool it to take a version from a fake `git` executable.
(writeShellScriptBin "git" ''
echo "v${finalAttrs.version}"
'')
];
nativeBuildInputs =
let
# Fool upstream's cmake lsblk check a bit
fake-lsblk = writeShellScriptBin "lsblk" ''
echo "our lsblk has --json support but it doesn't work in our sandbox"
'';
# Upstream uses `git describe` to define a `IMAGER_VERSION` CMake variable,
# and we fool it to take a version from a fake `git` executable.
fake-git = writeShellScriptBin "git" ''
echo "v${finalAttrs.version}"
'';
in
[
cmake
fake-git
fake-lsblk
pkg-config
qt6.wrapQtAppsHook
wrapGAppsHook4
];
buildInputs = [
curl
gnutls
libarchive
libtasn1
qt6.qtbase
qt6.qtdeclarative
qt6.qtsvg
qt6.qttools
xz
gnutls
zstd
libtasn1
]
++ lib.optional enableUring liburing
++ lib.optionals stdenv.hostPlatform.isLinux [
qt6.qtwayland
];
@ -79,21 +88,30 @@ stdenv.mkDerivation (finalAttrs: {
# Isn't relevant for Nix
(lib.cmakeBool "ENABLE_CHECK_VERSION" false)
(lib.cmakeBool "ENABLE_TELEMETRY" enableTelemetry)
# Disable fetching external data files
(lib.cmakeBool "GENERATE_CAPITAL_CITIES" false)
(lib.cmakeBool "GENERATE_COUNTRIES_FROM_REGDB" false)
(lib.cmakeBool "GENERATE_TIMEZONES_FROM_IANA" false)
];
qtWrapperArgs = [
"--unset QT_QPA_PLATFORMTHEME"
"--unset QT_STYLE_OVERRIDE"
];
dontWrapGApps = true;
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
env.LANG = "C.UTF-8";
passthru = {
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "QT_QPA_PLATFORM=offscreen rpi-imager --version";
version = "v${finalAttrs.version}";
};
updateScript = nix-update-script { };
};