about summary refs log tree commit diff
path: root/nixos/modules/programs/fish.nix
diff options
context:
space:
mode:
authorRobert Schütz <rschuetz17@gmail.com>2019-02-27 00:08:57 +0100
committerGitHub <noreply@github.com>2019-02-27 00:08:57 +0100
commit029adf961995c69fe929fa7dcf5e67582ff2c0f7 (patch)
tree7d1f61368fca90cd65fce666f0410d309784ff0b /nixos/modules/programs/fish.nix
parent8293ab8461444692051bae9027328328a76e0611 (diff)
downloadnixlib-029adf961995c69fe929fa7dcf5e67582ff2c0f7.tar
nixlib-029adf961995c69fe929fa7dcf5e67582ff2c0f7.tar.gz
nixlib-029adf961995c69fe929fa7dcf5e67582ff2c0f7.tar.bz2
nixlib-029adf961995c69fe929fa7dcf5e67582ff2c0f7.tar.lz
nixlib-029adf961995c69fe929fa7dcf5e67582ff2c0f7.tar.xz
nixlib-029adf961995c69fe929fa7dcf5e67582ff2c0f7.tar.zst
nixlib-029adf961995c69fe929fa7dcf5e67582ff2c0f7.zip
Revert "nixos/fish: generate autocompletions from man pages" (#56439)
System rebuilds currently fail due to collisions.
See also https://github.com/NixOS/nixpkgs/issues/56432.
Diffstat (limited to 'nixos/modules/programs/fish.nix')
-rw-r--r--nixos/modules/programs/fish.nix37
1 files changed, 0 insertions, 37 deletions
diff --git a/nixos/modules/programs/fish.nix b/nixos/modules/programs/fish.nix
index 03d6c26c8c87..b38af07b92c3 100644
--- a/nixos/modules/programs/fish.nix
+++ b/nixos/modules/programs/fish.nix
@@ -169,43 +169,6 @@ in
       end
     '';
 
-    programs.fish.interactiveShellInit = ''
-      # add completions generated by NixOS to $fish_complete_path
-      begin
-        # joins with null byte to acommodate all characters in paths, then respectively gets all paths before / after the first one including "generated_completions",
-        # splits by null byte, and then removes all empty lines produced by using 'string'
-        set -l prev (string join0 $fish_complete_path | string match --regex "^.*?(?=\x00[^\x00]*generated_completions.*)" | string split0 | string match -er ".")
-        set -l post (string join0 $fish_complete_path | string match --regex "[^\x00]*generated_completions.*" | string split0 | string match -er ".")
-        set fish_complete_path $prev "/etc/fish/generated_completions" $post
-      end
-    '';
-
-    environment.etc."fish/generated_completions".source =
-      let
-        generateCompletions = package: pkgs.runCommand
-          "${package.name}-fish-completions"
-          (
-            {
-              src = package;
-              nativeBuildInputs = [ pkgs.python3 ];
-              buildInputs = [ pkgs.fish ];
-              preferLocalBuild = true;
-              allowSubstitutes = false;
-            }
-            // optionalAttrs (package ? meta.priority) { meta.priority = package.meta.priority; }
-          )
-          ''
-            mkdir -p $out
-            if [ -d $src/share/man ]; then
-              find $src/share/man -type f | xargs python ${pkgs.fish}/share/fish/tools/create_manpage_completions.py --directory $out >/dev/null
-            fi
-          '';
-      in
-        pkgs.buildEnv {
-          name = "system-fish-completions";
-          paths = map generateCompletions config.environment.systemPackages;
-        };
-
     # include programs that bring their own completions
     environment.pathsToLink = []
       ++ optional cfg.vendor.config.enable "/share/fish/vendor_conf.d"