@@ -19,8 +19,23 @@ let reflex-platform = import ./reflex-platform { inherit system; };
1919 });
2020
2121 # Dynamic linking with split objects dramatically increases startup time (about 0.5 seconds on a decent machine with SSD)
22− #TODO: Put zsh completions in $out/share/zsh/vendor-completions and other completions in similar places
23− obelisk-command = justStaticExecutables (self.callCabal2nix "obelisk-command" ./command {});
22+ obelisk-command = overrideCabal (justStaticExecutables (self.callCabal2nix "obelisk-command" ./command {})) (drv: {
23+ postInstall = (drv.postInstall or "") + ''
24+ OB="$out/bin/ob"
25+
26+ BASH_COMP="$out/share/bash-completion/completions"
27+ mkdir -p "$BASH_COMP"
28+ "$OB" --bash-completion-script "$OB" >"$BASH_COMP/ob"
29+
30+ ZSH_COMP="$out/share/zsh/vendor-completions"
31+ mkdir -p "$ZSH_COMP"
32+ "$OB" --zsh-completion-script "$OB" >"$ZSH_COMP/_ob"
33+
34+ FISH_COMP="$out/share/fish/vendor_completions.d"
35+ mkdir -p "$FISH_COMP"
36+ "$OB" --fish-completion-script "$OB" >"$FISH_COMP/ob.fish"
37+ '';
38+ });
2439
2540 optparse-applicative = self.callHackage "optparse-applicative" "0.14.0.0" {};
2641 };