From 26e8e6a6719a7bcfdddc5886019cac269cfc5dbb Mon Sep 17 00:00:00 2001 From: Lord-Valen Date: Mon, 19 Jun 2023 22:43:47 -0400 Subject: [PATCH] watershot: init at 0.1.2 --- pkgs/applications/misc/watershot/default.nix | 40 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/applications/misc/watershot/default.nix diff --git a/pkgs/applications/misc/watershot/default.nix b/pkgs/applications/misc/watershot/default.nix new file mode 100644 index 000000000000..406b4535f899 --- /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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 119a086fc789..f790866bbbd1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35386,6 +35386,8 @@ with pkgs; warpd = callPackage ../applications/misc/warpd { }; + watershot = callPackage ../applications/misc/watershot { }; + w3m = callPackage ../applications/networking/browsers/w3m { }; # Should always be the version with the most features