summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/lib.nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2020-12-10 20:45:08 +0100
committerPeter Simons <simons@cryp.to>2020-12-18 20:27:53 +0100
commitae13cc9790d198065644eda8363f3e84a81f8932 (patch)
treed1307858b98d88e00a0becc273834c7247e16e23 /pkgs/development/haskell-modules/lib.nix
parent0d5600604089469b13f58139add16c58394e1bf8 (diff)
downloadnixpkgs-ae13cc9790d198065644eda8363f3e84a81f8932.tar
nixpkgs-ae13cc9790d198065644eda8363f3e84a81f8932.tar.gz
nixpkgs-ae13cc9790d198065644eda8363f3e84a81f8932.tar.bz2
nixpkgs-ae13cc9790d198065644eda8363f3e84a81f8932.tar.lz
nixpkgs-ae13cc9790d198065644eda8363f3e84a81f8932.tar.xz
nixpkgs-ae13cc9790d198065644eda8363f3e84a81f8932.tar.zst
nixpkgs-ae13cc9790d198065644eda8363f3e84a81f8932.zip
haskell.lib.generateOptparseApplicativeCompletion: support separate bin
Diffstat (limited to 'pkgs/development/haskell-modules/lib.nix')
-rw-r--r--pkgs/development/haskell-modules/lib.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/development/haskell-modules/lib.nix b/pkgs/development/haskell-modules/lib.nix
index 6bcc563164e..964c179fb65 100644
--- a/pkgs/development/haskell-modules/lib.nix
+++ b/pkgs/development/haskell-modules/lib.nix
@@ -414,13 +414,13 @@ rec {
   */
   generateOptparseApplicativeCompletion = exeName: pkg: overrideCabal pkg (drv: {
     postInstall = (drv.postInstall or "") + ''
-      bashCompDir="$out/share/bash-completion/completions"
-      zshCompDir="$out/share/zsh/vendor-completions"
-      fishCompDir="$out/share/fish/vendor_completions.d"
+      bashCompDir="''${!outputBin}/share/bash-completion/completions"
+      zshCompDir="''${!outputBin}/share/zsh/vendor-completions"
+      fishCompDir="''${!outputBin}/share/fish/vendor_completions.d"
       mkdir -p "$bashCompDir" "$zshCompDir" "$fishCompDir"
-      "$out/bin/${exeName}" --bash-completion-script "$out/bin/${exeName}" >"$bashCompDir/${exeName}"
-      "$out/bin/${exeName}" --zsh-completion-script "$out/bin/${exeName}" >"$zshCompDir/_${exeName}"
-      "$out/bin/${exeName}" --fish-completion-script "$out/bin/${exeName}" >"$fishCompDir/${exeName}.fish"
+      "''${!outputBin}/bin/${exeName}" --bash-completion-script "''${!outputBin}/bin/${exeName}" >"$bashCompDir/${exeName}"
+      "''${!outputBin}/bin/${exeName}" --zsh-completion-script "''${!outputBin}/bin/${exeName}" >"$zshCompDir/_${exeName}"
+      "''${!outputBin}/bin/${exeName}" --fish-completion-script "''${!outputBin}/bin/${exeName}" >"$fishCompDir/${exeName}.fish"
 
       # Sanity check
       grep -F ${exeName} <$bashCompDir/${exeName} >/dev/null || {