summary refs log tree commit diff
path: root/pkgs/tools/misc/rpi-imager/default.nix
diff options
context:
space:
mode:
authorYannick Markus <ym@ymarkus.dev>2021-01-18 12:00:17 +0100
committerYannick Markus <ym@ymarkus.dev>2021-01-19 14:35:45 +0100
commit956f1a8e711d1991c87202961e9e2ec568523877 (patch)
treecffd14c22f087ef7360124e48869da5cace0d8a8 /pkgs/tools/misc/rpi-imager/default.nix
parent2b014ef903e62145157f3f0a15bd311a40ce7ab6 (diff)
downloadnixpkgs-956f1a8e711d1991c87202961e9e2ec568523877.tar
nixpkgs-956f1a8e711d1991c87202961e9e2ec568523877.tar.gz
nixpkgs-956f1a8e711d1991c87202961e9e2ec568523877.tar.bz2
nixpkgs-956f1a8e711d1991c87202961e9e2ec568523877.tar.lz
nixpkgs-956f1a8e711d1991c87202961e9e2ec568523877.tar.xz
nixpkgs-956f1a8e711d1991c87202961e9e2ec568523877.tar.zst
nixpkgs-956f1a8e711d1991c87202961e9e2ec568523877.zip
rpi-imager: init at 1.5
Diffstat (limited to 'pkgs/tools/misc/rpi-imager/default.nix')
-rw-r--r--pkgs/tools/misc/rpi-imager/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/tools/misc/rpi-imager/default.nix b/pkgs/tools/misc/rpi-imager/default.nix
new file mode 100644
index 00000000000..a18a8d6d38d
--- /dev/null
+++ b/pkgs/tools/misc/rpi-imager/default.nix
@@ -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;
+  };
+}