about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorRick van Schijndel <Mindavi@users.noreply.github.com>2023-06-21 07:21:47 +0200
committerGitHub <noreply@github.com>2023-06-21 07:21:47 +0200
commit5db8360846f15544b4fa82a7d7b06c68d78c192d (patch)
tree1703f0490f9f28d98bbd859d4001325e4dbbf423 /pkgs/applications
parent249a450670fe77fb1c3f4aca1ccde2e3ea51ac82 (diff)
parent26e8e6a6719a7bcfdddc5886019cac269cfc5dbb (diff)
Merge pull request #238680 from Lord-Valen/watershot
watershot: init at 0.1.2
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/watershot/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/applications/misc/watershot/default.nix b/pkgs/applications/misc/watershot/default.nix
new file mode 100644
index 0000000000000..406b4535f8991
--- /dev/null
+++ b/pkgs/applications/misc/watershot/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+, wayland
+, libxkbcommon
+, fontconfig
+, makeWrapper
+, grim
+}:
+rustPlatform.buildRustPackage rec {
+  pname = "watershot";
+  version = "0.1.2";
+
+  src = fetchFromGitHub {
+    owner = "Kirottu";
+    repo = "watershot";
+    rev = "v${version}";
+    hash = "sha256-8GqO7Y0d+AoYr3Us3FEfNobrQNSw7XyGwmZz5HkVvDg=";
+  };
+
+  cargoHash = "sha256-yJD7c/I3rwzczcrxbD8sinzP7bjMzhWWAVcCFCsTdeo=";
+
+  nativeBuildInputs = [ pkg-config wayland makeWrapper ];
+
+  buildInputs = [ wayland fontconfig libxkbcommon ];
+
+  postInstall = ''
+    wrapProgram $out/bin/watershot \
+      --prefix PATH : ${lib.makeBinPath [ grim ]}
+  '';
+
+  meta = with lib; {
+    platforms = with platforms; linux;
+    description = "A simple wayland native screenshot tool";
+    homepage = "https://github.com/Kirottu/watershot";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ lord-valen ];
+  };
+}