Skip to content

Commit

Permalink
rpi-imager: migrate to pkgs/by-name, reformat with nixfmt-rfc-style, …
Browse files Browse the repository at this point in the history
…migrate to qt6 (#341427)
  • Loading branch information
Artturin authored Sep 14, 2024
2 parents d65ed95 + fc61ce1 commit 8345adb
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -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: {
Expand All @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8345adb

Please sign in to comment.