planify: 4.11.6 -> 4.12.0 (#379469)
[NixPkgs.git] / pkgs / by-name / hy / hyprshot / package.nix
blob98666e17b84e7f407ad6de0c8bf16e2e706dcc42
2   stdenvNoCC,
3   lib,
4   fetchFromGitHub,
5   hyprland,
6   jq,
7   grim,
8   slurp,
9   wl-clipboard,
10   libnotify,
11   withFreeze ? true,
12   hyprpicker,
13   makeWrapper,
16 stdenvNoCC.mkDerivation (finalAttrs: {
17   pname = "hyprshot";
18   version = "1.3.0";
20   src = fetchFromGitHub {
21     owner = "Gustash";
22     repo = "hyprshot";
23     rev = finalAttrs.version;
24     hash = "sha256-9taTmV357cWglMGuN3NLq3bfNneFthwV6y+Ml4qEeHA=";
25   };
27   nativeBuildInputs = [ makeWrapper ];
29   installPhase = ''
30     runHook preInstall
32     install -Dm755 hyprshot -t "$out/bin"
33     wrapProgram "$out/bin/hyprshot" \
34       --prefix PATH ":" ${
35         lib.makeBinPath (
36           [
37             hyprland
38             jq
39             grim
40             slurp
41             wl-clipboard
42             libnotify
43           ]
44           ++ lib.optionals withFreeze [ hyprpicker ]
45         )
46       }
48     runHook postInstall
49   '';
51   meta = with lib; {
52     homepage = "https://github.com/Gustash/hyprshot";
53     description = "Hyprshot is an utility to easily take screenshots in Hyprland using your mouse";
54     license = licenses.gpl3Only;
55     maintainers = with maintainers; [ Cryolitia ];
56     mainProgram = "hyprshot";
57     platforms = hyprland.meta.platforms;
58   };