nixpkgs/pkgs/applications/misc/hyprdim/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.1 KiB
Nix
Raw Normal View History

2023-07-26 04:42:08 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
2023-10-29 22:39:49 +00:00
, nix-update-script
2023-07-26 04:42:08 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "hyprdim";
2023-10-29 22:39:49 +00:00
version = "2.2.2";
2023-07-26 04:42:08 +00:00
src = fetchFromGitHub {
owner = "donovanglover";
2023-10-29 22:39:49 +00:00
repo = "hyprdim";
2023-07-26 04:42:08 +00:00
rev = version;
2023-10-29 22:39:49 +00:00
hash = "sha256-b2T/ueinKiheuK+siV29vJfEsEodq6qT2J3XxvoD/14=";
2023-07-26 04:42:08 +00:00
};
2023-10-29 22:39:49 +00:00
cargoHash = "sha256-Sf32vaqcxVdg6/kDidxBSr5XDWg3aNEBpEl31do2ZJ8=";
2023-07-26 04:42:08 +00:00
nativeBuildInputs = [
installShellFiles
];
postInstall = ''
2023-10-29 22:39:49 +00:00
installManPage target/man/hyprdim.1
2023-07-26 04:42:08 +00:00
installShellCompletion --cmd hyprdim \
2023-10-29 22:39:49 +00:00
--bash <(cat target/completions/hyprdim.bash) \
--fish <(cat target/completions/hyprdim.fish) \
--zsh <(cat target/completions/_hyprdim)
2023-07-26 04:42:08 +00:00
'';
2023-10-29 22:39:49 +00:00
passthru.updateScript = nix-update-script { };
2023-07-26 04:42:08 +00:00
meta = with lib; {
description = "Automatically dim windows in Hyprland when switching between them";
homepage = "https://github.com/donovanglover/hyprdim";
2023-10-29 22:39:49 +00:00
license = licenses.gpl3Plus;
2023-07-26 04:42:08 +00:00
platforms = platforms.linux;
maintainers = with maintainers; [ donovanglover ];
2023-08-06 18:13:50 +00:00
mainProgram = "hyprdim";
2023-07-26 04:42:08 +00:00
};
}