rpi-imager: init at 1.5
This commit is contained in:
parent
2b014ef903
commit
956f1a8e71
55
pkgs/tools/misc/rpi-imager/default.nix
Normal file
55
pkgs/tools/misc/rpi-imager/default.nix
Normal file
@ -0,0 +1,55 @@
|
||||
{ mkDerivation,
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
curl,
|
||||
libarchive,
|
||||
util-linux,
|
||||
qtbase,
|
||||
qtdeclarative,
|
||||
qtsvg,
|
||||
qttools,
|
||||
qtquickcontrols2,
|
||||
qtgraphicaleffects
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "rpi-imager";
|
||||
version = "1.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0596c7rpkykmjr3gsz9yczqsj7fzq04kc97s0rqkygjnwiqh2rwz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [
|
||||
curl
|
||||
libarchive
|
||||
util-linux
|
||||
qtbase
|
||||
qtdeclarative
|
||||
qtsvg
|
||||
qttools
|
||||
qtquickcontrols2
|
||||
qtgraphicaleffects
|
||||
];
|
||||
|
||||
/* 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 ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Raspberry Pi Imaging Utility";
|
||||
homepage = "https://www.raspberrypi.org/software/";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ ymarkus ];
|
||||
platforms = platforms.all;
|
||||
# does not build on darwin
|
||||
broken = stdenv.isDarwin;
|
||||
};
|
||||
}
|
16
pkgs/tools/misc/rpi-imager/lsblkCheckFix.patch
Normal file
16
pkgs/tools/misc/rpi-imager/lsblkCheckFix.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3d7fc79..8ce72b9 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -229,11 +229,6 @@ else()
|
||||
if (NOT LSBLK)
|
||||
message(FATAL_ERROR "Unable to locate lsblk (used for disk enumeration)")
|
||||
endif()
|
||||
-
|
||||
- execute_process(COMMAND "${LSBLK}" "--json" RESULT_VARIABLE ret)
|
||||
- if (ret EQUAL "1")
|
||||
- message(FATAL_ERROR "util-linux package too old. lsblk does not support --json (used for disk enumeration)")
|
||||
- endif()
|
||||
endif()
|
||||
|
||||
configure_file(
|
@ -7439,6 +7439,8 @@ in
|
||||
|
||||
rpPPPoE = callPackage ../tools/networking/rp-pppoe { };
|
||||
|
||||
rpi-imager = libsForQt5.callPackage ../tools/misc/rpi-imager { };
|
||||
|
||||
rpiboot-unstable = callPackage ../development/misc/rpiboot/unstable.nix { };
|
||||
|
||||
rpm = callPackage ../tools/package-management/rpm {
|
||||
|
Loading…
Reference in New Issue
Block a user