14 enableTelemetry ? false,
17 stdenv.mkDerivation (finalAttrs: {
21 src = fetchFromGitHub {
22 owner = "raspberrypi";
24 tag = "v${finalAttrs.version}";
25 hash = "sha256-JrotKMyAgQO3Y5RsFAar9N5/wDpWiBcy8RfvBWDiJMs=";
28 sourceRoot = "${finalAttrs.src.name}/src";
30 # By default, the builder checks for JSON support in lsblk by running "lsblk --json",
31 # but that throws an error, as /sys/dev doesn't exist in the sandbox.
32 # This patch removes the check.
33 patches = [ ./lsblkCheckFix.patch ];
48 qt5.qtgraphicaleffects
54 ++ lib.optionals stdenv.hostPlatform.isLinux [
58 # Disable telemetry and update check.
59 cmakeFlags = lib.optionals (!enableTelemetry) [
60 "-DENABLE_CHECK_VERSION=OFF"
61 "-DENABLE_TELEMETRY=OFF"
65 tests.version = testers.testVersion {
66 package = finalAttrs.finalPackage;
67 command = "QT_QPA_PLATFORM=offscreen rpi-imager --version";
69 updateScript = nix-update-script { };
73 description = "Raspberry Pi Imaging Utility";
74 homepage = "https://github.com/raspberrypi/rpi-imager/";
75 changelog = "https://github.com/raspberrypi/rpi-imager/releases/tag/v${finalAttrs.version}";
76 license = licenses.asl20;
77 mainProgram = "rpi-imager";
78 maintainers = with maintainers; [
82 platforms = platforms.all;
83 # does not build on darwin
84 broken = stdenv.hostPlatform.isDarwin;