diff --git a/pkgs/tools/misc/rpi-imager/lsblkCheckFix.patch b/pkgs/by-name/rp/rpi-imager/lsblkCheckFix.patch similarity index 100% rename from pkgs/tools/misc/rpi-imager/lsblkCheckFix.patch rename to pkgs/by-name/rp/rpi-imager/lsblkCheckFix.patch diff --git a/pkgs/tools/misc/rpi-imager/default.nix b/pkgs/by-name/rp/rpi-imager/package.nix similarity index 62% rename from pkgs/tools/misc/rpi-imager/default.nix rename to pkgs/by-name/rp/rpi-imager/package.nix index 2a68d92b9c134..ad04c817d5ebd 100644 --- a/pkgs/tools/misc/rpi-imager/default.nix +++ b/pkgs/by-name/rp/rpi-imager/package.nix @@ -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; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b68dc22b3481b..fdb9a12185f05 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {