Skip to content

Commit

Permalink
feat: Added shell completions directly to the nix package
Browse files Browse the repository at this point in the history
  • Loading branch information
uttarayan21 committed Feb 9, 2025
1 parent 1787bda commit 1de1ac3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,19 @@
};

packages = rec {
ddcbacklight = craneLib.buildPackage (commonArgs // {inherit cargoArtifacts;});
ddcbacklight = craneLib.buildPackage (commonArgs
// {inherit cargoArtifacts;}
// {
postInstall = ''
mkdir -p $out/bin
mkdir -p $out/share/bash-completions
mkdir -p $out/share/fish/vendor_completions.d
mkdir -p $out/share/zsh/site-functions
$out/bin/xbacklight completions bash > $out/share/bash-completions/xbacklight.bash
$out/bin/xbacklight completions fish > $out/share/fish/vendor_completions.d/xbacklight.fish
$out/bin/xbacklight completions zsh > $out/share/zsh/site-functions/_xbacklight
'';
});
default = ddcbacklight;
};

Expand Down

0 comments on commit 1de1ac3

Please sign in to comment.