depot/third_party/nixpkgs/pkgs/applications/misc/watershot/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

41 lines
958 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, wayland
, libxkbcommon
, fontconfig
, makeWrapper
, grim
}:
rustPlatform.buildRustPackage rec {
pname = "watershot";
version = "0.2.0";
src = fetchFromGitHub {
owner = "Kirottu";
repo = "watershot";
rev = "v${version}";
hash = "sha256-QX6BxK26kcrg0yKJA7M+Qlr3WwLaykBquI6UK8wVtX4=";
};
cargoHash = "sha256-481E5/mUeeoaZ0N//tRWCyV8/sRRP6VdB06gB1whgzU=";
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 = "Simple wayland native screenshot tool";
mainProgram = "watershot";
homepage = "https://github.com/Kirottu/watershot";
license = licenses.gpl3Only;
maintainers = with maintainers; [ lord-valen ];
};
}