diff options
author | Donovan Glover <donovan@dglover.co> | 2024-03-15 13:27:25 -0400 |
---|---|---|
committer | Donovan Glover <donovan@dglover.co> | 2024-03-15 13:27:25 -0400 |
commit | d7b558dd23c249a3dbcd86cf76940ac33b014c67 (patch) | |
tree | 49c866a4ff27d5f044af6cde0dede6eb0b1104f1 /pkgs/by-name/hy/hyprdim/package.nix | |
parent | 6bea063d09c7ff3b1524cf39289e943a8f1d6d1d (diff) |
hyprdim: migrate to by-name
Diffstat (limited to 'pkgs/by-name/hy/hyprdim/package.nix')
-rw-r--r-- | pkgs/by-name/hy/hyprdim/package.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/by-name/hy/hyprdim/package.nix b/pkgs/by-name/hy/hyprdim/package.nix new file mode 100644 index 0000000000000..10938330196a0 --- /dev/null +++ b/pkgs/by-name/hy/hyprdim/package.nix @@ -0,0 +1,44 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, installShellFiles +, nix-update-script +}: + +rustPlatform.buildRustPackage rec { + pname = "hyprdim"; + version = "2.2.3"; + + src = fetchFromGitHub { + owner = "donovanglover"; + repo = "hyprdim"; + rev = version; + hash = "sha256-Eeh0D3DkC4ureDUE+BXTGcMFNmZ0hLSidlKlL4ZDgsQ="; + }; + + cargoHash = "sha256-hgcGzRLB1L3yxJjw1ECDJPmbl1W+2OS4KDojclyVYrc="; + + nativeBuildInputs = [ + installShellFiles + ]; + + postInstall = '' + installManPage target/man/hyprdim.1 + + installShellCompletion --cmd hyprdim \ + --bash <(cat target/completions/hyprdim.bash) \ + --fish <(cat target/completions/hyprdim.fish) \ + --zsh <(cat target/completions/_hyprdim) + ''; + + passthru.updateScript = nix-update-script { }; + + meta = with lib; { + description = "Automatically dim windows in Hyprland when switching between them"; + homepage = "https://github.com/donovanglover/hyprdim"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ donovanglover ]; + mainProgram = "hyprdim"; + }; +} |