From 8b6c0900d6d301eb2791a7300acfdf1cb7fcce8d Mon Sep 17 00:00:00 2001 From: Minijackson Date: Tue, 4 Sep 2018 19:30:02 +0200 Subject: Separate CLI + auto-generate completion at build time --- derivation.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'derivation.nix') diff --git a/derivation.nix b/derivation.nix index 329ef3b..b895bb8 100644 --- a/derivation.nix +++ b/derivation.nix @@ -9,6 +9,13 @@ rustPlatform.buildRustPackage rec { src = ./.; cargoSha256 = "0lknxqr1pfbj6z981rw5ppkklknryyafl5f552aaw4iqhq94slq4"; + preFixup = '' + mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions} + cp target/release/build/set_eq-*/out/set_eq.bash "$out/share/bash-completion/completions/" + cp target/release/build/set_eq-*/out/set_eq.fish "$out/share/fish/vendor_completions.d/" + cp target/release/build/set_eq-*/out/_set_eq "$out/share/zsh/site-functions/" + ''; + meta = with stdenv.lib; { description = "A command-line tool to manipulate PulseAudio's equalizer"; homepage = https://github.com/minijackson/set_eq; -- cgit v1.2.3