@@ -1001,10 +1001,10 @@ with pkgs;
10011001
10021002 cue2pops = callPackage ../tools/cd-dvd/cue2pops { };
10031003
1004− cabal2nix = haskell.lib.overrideCabal haskellPackages.cabal2nix (drv: {
1004+ cabal2nix = haskell.lib.overrideCabal (haskell.lib.addOptparseApplicativeCompletionScripts "cabal2nix" haskellPackages.cabal2nix) (drv: {
10051005 isLibrary = false;
10061006 enableSharedExecutables = false;
1007− executableToolDepends = [ makeWrapper ];
1007+ executableToolDepends = (drv.executableToolDepends or []) ++ [ makeWrapper ];
10081008 postInstall = ''
10091009 exe=$out/libexec/${drv.pname}-${drv.version}/${drv.pname}
10101010 install -D $out/bin/${drv.pname} $exe
@@ -1012,11 +1012,7 @@ with pkgs;
10121012 makeWrapper $exe $out/bin/${drv.pname} \
10131013 --prefix PATH ":" "${nix}/bin" \
10141014 --prefix PATH ":" "${nix-prefetch-scripts}/bin"
1015− mkdir -p $out/share/{bash-completion/completions,zsh/vendor-completions,fish/completions}
1016− $exe --bash-completion-script $exe >$out/share/bash-completion/completions/${drv.pname}
1017− $exe --zsh-completion-script $exe >$out/share/zsh/vendor-completions/_${drv.pname}
1018− $exe --fish-completion-script $exe >$out/share/fish/completions/${drv.pname}.fish
1019− '';
1015+ '' + (drv.postInstall or "");
10201016 });
10211017
10221018 stack2nix = with haskell.lib; overrideCabal (justStaticExecutables haskellPackages.stack2nix) (drv: {