From 147a5bb2ded2d2a93247c3cc9cf3fdb3c156fedc Mon Sep 17 00:00:00 2001 From: zendo Date: Tue, 4 Oct 2022 17:25:54 +0800 Subject: [PATCH] shotman: init at 0.2.0 --- pkgs/tools/wayland/shotman/default.nix | 39 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/tools/wayland/shotman/default.nix diff --git a/pkgs/tools/wayland/shotman/default.nix b/pkgs/tools/wayland/shotman/default.nix new file mode 100644 index 00000000000..91742a7c1c2 --- /dev/null +++ b/pkgs/tools/wayland/shotman/default.nix @@ -0,0 +1,39 @@ +{ lib +, fetchFromSourcehut +, rustPlatform +, pkg-config +, libxkbcommon +, makeWrapper +, slurp +}: + +rustPlatform.buildRustPackage rec { + pname = "shotman"; + version = "0.2.0"; + + src = fetchFromSourcehut { + owner = "~whynothugo"; + repo = pname; + rev = "v${version}"; + hash = "sha256-QNRQInFZcB1nqzESTAqYWwqJ0oiJa6UMCpjY3aHBiyA="; + }; + + cargoHash = "sha256-BfH1HhBbgdCA1IqKNdl4/FEzZxHgJmoSKNVMJUrSHCA="; + + nativeBuildInputs = [ pkg-config makeWrapper ]; + + buildInputs = [ libxkbcommon ]; + + preFixup = '' + wrapProgram $out/bin/shotman \ + --prefix PATH ":" "${lib.makeBinPath [ slurp ]}"; + ''; + + meta = with lib; { + description = "The uncompromising screenshot GUI for Wayland compositors"; + homepage = "https://git.sr.ht/~whynothugo/shotman"; + license = licenses.isc; + platforms = platforms.linux; + maintainers = with maintainers; [ zendo ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aff90833705..12f14bcd1b3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3444,6 +3444,8 @@ with pkgs; oguri = callPackage ../tools/wayland/oguri { }; + shotman = callPackage ../tools/wayland/shotman { }; + slurp = callPackage ../tools/wayland/slurp { }; sov = callPackage ../tools/wayland/sov { };