about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/watershot/default.nix
blob: 6d29fab825277dbe7bd13f8b4fe5bf8d99ab1975 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ 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 = "A simple wayland native screenshot tool";
    mainProgram = "watershot";
    homepage = "https://github.com/Kirottu/watershot";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ lord-valen ];
  };
}