Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
fix shell completion installation for nix
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAShelf committed Aug 26, 2023
1 parent 019ec8f commit 0dac4d6
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,36 @@
buildGoModule,
nix-filter,
lib,
installShellFiles,
...
}:
buildGoModule {
buildGoModule rec {
pname = "Hyprkeys";
version = "1.0.2";
src = nix-filter.lib {
root = ./.;
exclude = [
./README.md
./out.md
./out.json
./.github
];
exclude =
[
./README.md
./out.md
./out.json
./.github
]
++ lib.optional (!doCheck) [./test];
};

ldflags = ["-s" "-w"];
vendorHash = "sha256-JFvC9V0xS8SZSdLsOtpyTrFzXjYAOaPQaJHdcnJzK3s=";

doCheck = true;

nativeBuildInputs = [installShellFiles];

preFixup = ''
mkdir -p completions
$out/bin/hyprkeys completions zsh > completions/hyprkeys.zsh
$out/bin/hyprkeys completions bash > completions/hyprkeys.bash
$out/bin/hyprkeys completions fish > completions/hyprkeys.fish
$out/bin/hyprkeys completion zsh > completions/_hyprkeys
$out/bin/hyprkeys completion bash > completions/hyprkeys.bash
$out/bin/hyprkeys completion fish > completions/hyprkeys.fish
installShellCompletion completions/*
'';
Expand Down

0 comments on commit 0dac4d6

Please sign in to comment.