cabal2nix: update to version 2.6

- Add support for the 01-index tarball of cabal-install 2.x.
 - Add shell completions for fish and zsh.
This commit is contained in:
Peter Simons 2017-09-24 20:48:27 +02:00
parent 88bef1c019
commit 2a1c656c54
2 changed files with 10 additions and 1 deletions

View File

@ -957,4 +957,11 @@ self: super: {
protolude = super.protolude_0_2;
};
# This tool needs the latest hackage-db version. Using the latest version of
# optparse-applicative allows us to generate completions for fish and zsh.
cabal2nix = super.cabal2nix.overrideScope (self: super: {
hackage-db = self.hackage-db_2_0;
optparse-applicative = self.optparse-applicative_0_14_0_0;
});
}

View File

@ -808,8 +808,10 @@ with pkgs;
makeWrapper $exe $out/bin/${drv.pname} \
--prefix PATH ":" "${nix}/bin" \
--prefix PATH ":" "${nix-prefetch-scripts}/bin"
mkdir -p $out/share/bash-completion/completions
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
'';
});