Skip to content

Commit

Permalink
cabal2nix: use generateOptparseApplicativeCompletions
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Jul 10, 2018
1 parent 7fc129f commit 75788c9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -946,17 +946,13 @@ with pkgs;
isLibrary = false;
enableSharedExecutables = false;
executableToolDepends = [ makeWrapper ];
postInstall = ''
postInstall = drv.postInstall or "" + ''
exe=$out/libexec/${drv.pname}-${drv.version}/${drv.pname}
install -D $out/bin/${drv.pname} $exe
rm -rf $out/{bin,lib,share}
rm -rf $out/{bin,lib}
makeWrapper $exe $out/bin/${drv.pname} \
--prefix PATH ":" "${nix}/bin" \
--prefix PATH ":" "${nix-prefetch-scripts}/bin"
mkdir -p $out/share/{bash-completion/completions,zsh/vendor-completions,fish/completions}
$exe --bash-completion-script $exe >$out/share/bash-completion/completions/${drv.pname}
$exe --zsh-completion-script $exe >$out/share/zsh/vendor-completions/_${drv.pname}
$exe --fish-completion-script $exe >$out/share/fish/completions/${drv.pname}.fish
'';
});

Expand Down

0 comments on commit 75788c9

Please sign in to comment.