Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / hy / hyprdim / package.nix
blob11afcf6daa3a3bec53ddbfb50ccbe76139bc6a19
2   lib,
3   rustPlatform,
4   fetchFromGitHub,
5   installShellFiles,
6   nix-update-script,
7 }:
9 rustPlatform.buildRustPackage rec {
10   pname = "hyprdim";
11   version = "2.2.5";
13   src = fetchFromGitHub {
14     owner = "donovanglover";
15     repo = "hyprdim";
16     rev = version;
17     hash = "sha256-EWZnimLLV879FiZUax1YK5ML/Qz4qt29rJWn5uoKtqw=";
18   };
20   cargoHash = "sha256-V4Z3PKavxfQm7zSoTyoWtxpc8yuuGPemO4OdadQEVdg=";
22   nativeBuildInputs = [ installShellFiles ];
24   postInstall = ''
25     installManPage target/man/hyprdim.1
27     installShellCompletion --cmd hyprdim \
28       --bash target/completions/hyprdim.bash \
29       --fish target/completions/hyprdim.fish \
30       --zsh target/completions/_hyprdim
31   '';
33   passthru.updateScript = nix-update-script { };
35   meta = with lib; {
36     description = "Automatically dim windows in Hyprland when switching between them";
37     homepage = "https://github.com/donovanglover/hyprdim";
38     license = licenses.gpl3Plus;
39     platforms = platforms.linux;
40     maintainers = with maintainers; [ donovanglover ];
41     mainProgram = "hyprdim";
42   };