2024-03-15 18:38:33 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
installShellFiles,
|
|
|
|
nix-update-script,
|
2023-07-26 06:42:08 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "hyprdim";
|
2024-05-05 19:57:15 +02:00
|
|
|
version = "2.2.5";
|
2023-07-26 06:42:08 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "donovanglover";
|
2023-10-29 23:39:49 +01:00
|
|
|
repo = "hyprdim";
|
2023-07-26 06:42:08 +02:00
|
|
|
rev = version;
|
2024-05-05 19:57:15 +02:00
|
|
|
hash = "sha256-EWZnimLLV879FiZUax1YK5ML/Qz4qt29rJWn5uoKtqw=";
|
2023-07-26 06:42:08 +02:00
|
|
|
};
|
|
|
|
|
2024-05-05 19:57:15 +02:00
|
|
|
cargoHash = "sha256-V4Z3PKavxfQm7zSoTyoWtxpc8yuuGPemO4OdadQEVdg=";
|
2023-07-26 06:42:08 +02:00
|
|
|
|
2024-03-15 18:38:33 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2023-07-26 06:42:08 +02:00
|
|
|
|
|
|
|
postInstall = ''
|
2023-10-29 23:39:49 +01:00
|
|
|
installManPage target/man/hyprdim.1
|
2023-07-26 06:42:08 +02:00
|
|
|
|
|
|
|
installShellCompletion --cmd hyprdim \
|
2024-03-15 18:38:33 +01:00
|
|
|
--bash target/completions/hyprdim.bash \
|
|
|
|
--fish target/completions/hyprdim.fish \
|
|
|
|
--zsh target/completions/_hyprdim
|
2023-07-26 06:42:08 +02:00
|
|
|
'';
|
|
|
|
|
2023-10-29 23:39:49 +01:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2023-07-26 06:42:08 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Automatically dim windows in Hyprland when switching between them";
|
|
|
|
homepage = "https://github.com/donovanglover/hyprdim";
|
2023-10-29 23:39:49 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2023-07-26 06:42:08 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ donovanglover ];
|
2023-08-06 20:13:50 +02:00
|
|
|
mainProgram = "hyprdim";
|
2023-07-26 06:42:08 +02:00
|
|
|
};
|
|
|
|
}
|