summary refs log tree commit diff
path: root/pkgs/applications/misc/hyprdim/default.nix
blob: f7cf680ad0d1bdc4a1b14c9d1b3771aa83096008 (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
, installShellFiles
}:

rustPlatform.buildRustPackage rec {
  pname = "hyprdim";
  version = "2.2.1";

  src = fetchFromGitHub {
    owner = "donovanglover";
    repo = pname;
    rev = version;
    hash = "sha256-6HeVLgEJDPy4cWL5td3Xl7+a6WUFZWUFynvBzPhItcg=";
  };

  cargoHash = "sha256-qYX5o64X8PsFcTYuZ82lIShyUN69oTzQIHrQH4B7iIw=";

  nativeBuildInputs = [
    installShellFiles
  ];

  postInstall = ''
    installManPage man/hyprdim.1

    installShellCompletion --cmd hyprdim \
      --bash <(cat completions/hyprdim.bash) \
      --fish <(cat completions/hyprdim.fish) \
      --zsh <(cat completions/_hyprdim)
  '';

  meta = with lib; {
    description = "Automatically dim windows in Hyprland when switching between them";
    homepage = "https://github.com/donovanglover/hyprdim";
    license = licenses.mit;
    platforms = platforms.linux;
    maintainers = with maintainers; [ donovanglover ];
    mainProgram = "hyprdim";
  };
}