rpi-imager: migrate to pkgs/by-name, reformat with nixfmt-rfc-style, migrate to qt6 (#341427)

This commit is contained in:
Artturin
2024-09-14 05:26:43 +03:00
committed by GitHub
3 changed files with 42 additions and 42 deletions
@@ -1,22 +1,17 @@
{ lib
, stdenv
, fetchFromGitHub
, wrapQtAppsHook
, cmake
, pkg-config
, util-linux
, curl
, libarchive
, qtbase
, qtdeclarative
, qtsvg
, qttools
, qtquickcontrols2
, qtgraphicaleffects
, xz
, testers
, nix-update-script
, enableTelemetry ? false
{
lib,
stdenv,
cmake,
curl,
fetchFromGitHub,
libarchive,
nix-update-script,
pkg-config,
qt5,
testers,
util-linux,
xz,
enableTelemetry ? false,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -30,38 +25,42 @@ stdenv.mkDerivation (finalAttrs: {
sha256 = "sha256-JrotKMyAgQO3Y5RsFAar9N5/wDpWiBcy8RfvBWDiJMs=";
};
sourceRoot = "${finalAttrs.src.name}/src";
# By default, the builder checks for JSON support in lsblk by running "lsblk --json",
# but that throws an error, as /sys/dev doesn't exist in the sandbox.
# This patch removes the check.
patches = [ ./lsblkCheckFix.patch ];
nativeBuildInputs = [
cmake
pkg-config
qt5.wrapQtAppsHook
util-linux
wrapQtAppsHook
];
buildInputs =
[
curl
libarchive
qt5.qtbase
qt5.qtdeclarative
qt5.qtgraphicaleffects
qt5.qtquickcontrols2
qt5.qtsvg
qt5.qttools
xz
]
++ lib.optionals stdenv.isLinux [
qt5.qtwayland
];
# Disable telemetry and update check.
cmakeFlags = lib.optionals (!enableTelemetry) [
"-DENABLE_CHECK_VERSION=OFF"
"-DENABLE_TELEMETRY=OFF"
];
buildInputs = [
curl
libarchive
qtbase
qtdeclarative
qtsvg
qttools
qtquickcontrols2
qtgraphicaleffects
xz
];
sourceRoot = "${finalAttrs.src.name}/src";
/* By default, the builder checks for JSON support in lsblk by running "lsblk --json",
but that throws an error, as /sys/dev doesn't exist in the sandbox.
This patch removes the check. */
patches = [ ./lsblkCheckFix.patch ];
passthru = {
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
@@ -76,7 +75,10 @@ stdenv.mkDerivation (finalAttrs: {
changelog = "https://github.com/raspberrypi/rpi-imager/releases/tag/v${finalAttrs.version}";
license = licenses.asl20;
mainProgram = "rpi-imager";
maintainers = with maintainers; [ ymarkus anthonyroussel ];
maintainers = with maintainers; [
ymarkus
anthonyroussel
];
platforms = platforms.all;
# does not build on darwin
broken = stdenv.isDarwin;
-2
View File
@@ -12141,8 +12141,6 @@ with pkgs;
rpPPPoE = callPackage ../tools/networking/rp-pppoe { };
rpi-imager = libsForQt5.callPackage ../tools/misc/rpi-imager { };
rpiboot = callPackage ../development/misc/rpiboot { };
rpm = callPackage ../tools/package-management/rpm {