2021-01-18 11:00:17 +00:00
|
|
|
{ mkDerivation,
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cmake,
|
|
|
|
curl,
|
|
|
|
libarchive,
|
|
|
|
util-linux,
|
|
|
|
qtbase,
|
|
|
|
qtdeclarative,
|
|
|
|
qtsvg,
|
|
|
|
qttools,
|
|
|
|
qtquickcontrols2,
|
|
|
|
qtgraphicaleffects
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "rpi-imager";
|
2022-09-10 06:21:57 +00:00
|
|
|
version = "1.7.3";
|
2021-01-18 11:00:17 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "raspberrypi";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-09-10 06:21:57 +00:00
|
|
|
sha256 = "sha256-D2FNg8SEUDQA466jfxBFhK0t8/5WJHx1fBTaCH0N+UQ=";
|
2021-01-18 11:00:17 +00:00
|
|
|
};
|
|
|
|
|
2021-05-26 21:21:53 +00:00
|
|
|
nativeBuildInputs = [ cmake util-linux ];
|
|
|
|
|
2021-01-18 11:00:17 +00:00
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
libarchive
|
|
|
|
qtbase
|
|
|
|
qtdeclarative
|
|
|
|
qtsvg
|
|
|
|
qttools
|
|
|
|
qtquickcontrols2
|
|
|
|
qtgraphicaleffects
|
|
|
|
];
|
|
|
|
|
2022-03-30 15:26:31 +00:00
|
|
|
sourceRoot = "${src.name}/src";
|
|
|
|
|
2021-01-18 11:00:17 +00:00
|
|
|
/* 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/";
|
2021-05-26 21:21:53 +00:00
|
|
|
downloadPage = "https://github.com/raspberrypi/rpi-imager/";
|
2021-01-18 11:00:17 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ymarkus ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
# does not build on darwin
|
|
|
|
broken = stdenv.isDarwin;
|
|
|
|
};
|
|
|
|
}
|