btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / hd / hdrop / package.nix
blob74f9f0e03e57d4f3fbed067180e5839ccc95c63f
2   coreutils,
3   fetchFromGitHub,
4   gawk,
5   hyprland,
6   jq,
7   lib,
8   libnotify,
9   makeWrapper,
10   scdoc,
11   stdenvNoCC,
12   util-linux,
13   withHyprland ? true,
16 stdenvNoCC.mkDerivation rec {
17   pname = "hdrop";
18   version = "0.6.0";
20   src = fetchFromGitHub {
21     owner = "Schweber";
22     repo = "hdrop";
23     rev = "v${version}";
24     hash = "sha256-0GkZBqpORJqhhC19bsJHvkbHKOno1ZyBBA7nhzfqLZw=";
25   };
27   nativeBuildInputs = [
28     makeWrapper
29     scdoc
30   ];
32   makeFlags = [ "PREFIX=$(out)" ];
34   postInstall = ''
35     wrapProgram $out/bin/hdrop --prefix PATH ':' \
36       "${
37         lib.makeBinPath (
38           [
39             coreutils
40             util-linux
41             jq
42             libnotify
43             gawk
44           ]
45           ++ lib.optional withHyprland hyprland
46         )
47       }"
48   '';
50   meta = with lib; {
51     description = "Emulate 'tdrop' in Hyprland (run, show and hide specific programs per keybind)";
52     homepage = "https://github.com/Schweber/hdrop";
53     changelog = "https://github.com/Schweber/hdrop/releases/tag/v${version}";
54     license = licenses.agpl3Only;
55     platforms = platforms.linux;
56     maintainers = with maintainers; [ Schweber ];
57     mainProgram = "hdrop";
58   };