diff --git a/pkgs/applications/misc/gammu/bashcomp-dir.patch b/pkgs/applications/misc/gammu/bashcomp-dir.patch index d41aa432cf35..de402595cd38 100644 --- a/pkgs/applications/misc/gammu/bashcomp-dir.patch +++ b/pkgs/applications/misc/gammu/bashcomp-dir.patch @@ -5,7 +5,7 @@ macro_optional_find_package (BashCompletion) if (NOT BASH_COMPLETION_FOUND) - set (BASH_COMPLETION_COMPLETIONSDIR "/etc/bash_completion.d" CACHE PATH "Location of bash_completion.d") -+ set (BASH_COMPLETION_COMPLETIONSDIR "${CMAKE_INSTALL_PREFIX}/etc/bash_completion.d" CACHE PATH "Location of bash_completion.d") ++ set (BASH_COMPLETION_COMPLETIONSDIR "${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions" CACHE PATH "Location of bash_completion.d") endif (NOT BASH_COMPLETION_FOUND) install ( FILES bash-completion/gammu diff --git a/pkgs/applications/misc/prevo/tools.nix b/pkgs/applications/misc/prevo/tools.nix index 6a85e73bf851..39c54b73b2fe 100644 --- a/pkgs/applications/misc/prevo/tools.nix +++ b/pkgs/applications/misc/prevo/tools.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ glib expat ]; postInstall = '' - installShellCompletion --bash $out/etc/bash_completion.d/prevo-completion + installShellCompletion --bash src/prevo-completion ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/office/todo.txt-cli/default.nix b/pkgs/applications/office/todo.txt-cli/default.nix index 489b759f48c4..8db5691ed84d 100644 --- a/pkgs/applications/office/todo.txt-cli/default.nix +++ b/pkgs/applications/office/todo.txt-cli/default.nix @@ -13,8 +13,8 @@ in stdenv.mkDerivation { installPhase = '' install -vd $out/bin install -vm 755 todo.sh $out/bin - install -vd $out/etc/bash_completion.d - install -vm 644 todo_completion $out/etc/bash_completion.d/todo + install -vd $out/share/bash-completion/completions + install -vm 644 todo_completion $out/share/bash-completion/completions/todo install -vd $out/etc/todo install -vm 644 todo.cfg $out/etc/todo/config ''; diff --git a/pkgs/applications/version-management/git-and-tools/git-bug/default.nix b/pkgs/applications/version-management/git-and-tools/git-bug/default.nix index 44eba8c4b39c..7c345639e9f8 100644 --- a/pkgs/applications/version-management/git-and-tools/git-bug/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-bug/default.nix @@ -24,7 +24,7 @@ buildGoModule rec { ''; postInstall = '' - install -D -m 0644 misc/bash_completion/git-bug "$out/etc/bash_completion.d/git-bug" + install -D -m 0644 misc/bash_completion/git-bug "$out/share/bash-completion/completions/git-bug" install -D -m 0644 misc/zsh_completion/git-bug "$out/share/zsh/site-functions/git-bug" install -D -m 0644 -t "$out/share/man/man1" doc/man/* ''; diff --git a/pkgs/applications/version-management/git-and-tools/git-stree/default.nix b/pkgs/applications/version-management/git-and-tools/git-stree/default.nix index dc636571acc0..aa53529933ff 100644 --- a/pkgs/applications/version-management/git-and-tools/git-stree/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-stree/default.nix @@ -12,9 +12,9 @@ stdenv.mkDerivation { }; installPhase = '' - mkdir -p $out/bin $out/etc/bash_completion.d + mkdir -p $out/bin $out/share/bash-completion/completions install -m 0755 git-stree $out/bin/ - install -m 0644 git-stree-completion.bash $out/etc/bash_completion.d/ + install -m 0644 git-stree-completion.bash $out/share/bash-completion/completions/ ''; meta = with lib; { diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index b6efb78513cd..8ab97127294a 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -153,8 +153,8 @@ stdenv.mkDerivation { cp -a contrib $out/share/git/ mkdir -p $out/share/bash-completion/completions ln -s $out/share/git/contrib/completion/git-completion.bash $out/share/bash-completion/completions/git - mkdir -p $out/etc/bash_completion.d - ln -s $out/share/git/contrib/completion/git-prompt.sh $out/etc/bash_completion.d/ + mkdir -p $out/share/bash-completion/completions + ln -s $out/share/git/contrib/completion/git-prompt.sh $out/share/bash-completion/completions/ # grep is a runtime dependency, need to patch so that it's found substituteInPlace $out/libexec/git-core/git-sh-setup \ diff --git a/pkgs/applications/version-management/git-and-tools/topgit/default.nix b/pkgs/applications/version-management/git-and-tools/topgit/default.nix index 0da0cfa02b63..9577b56b6c73 100644 --- a/pkgs/applications/version-management/git-and-tools/topgit/default.nix +++ b/pkgs/applications/version-management/git-and-tools/topgit/default.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ perl git ]; postInstall = '' - install -Dm644 README -t"$out/share/doc/${pname}-${version}/" - install -Dm755 contrib/tg-completion.bash -t "$out/etc/bash_completion.d/" + install -Dm644 README -t "$out/share/doc/${pname}-${version}/" + install -Dm755 contrib/tg-completion.bash -t "$out/share/bash-completion/completions/" ''; meta = with stdenv.lib; { diff --git a/pkgs/development/compilers/purescript/purescript/default.nix b/pkgs/development/compilers/purescript/purescript/default.nix index 8a7fb96723a7..8dd19ecf8586 100644 --- a/pkgs/development/compilers/purescript/purescript/default.nix +++ b/pkgs/development/compilers/purescript/purescript/default.nix @@ -47,8 +47,8 @@ in stdenv.mkDerivation rec { install -D -m555 -T purs $PURS ${patchelf libPath} - mkdir -p $out/etc/bash_completion.d/ - $PURS --bash-completion-script $PURS > $out/etc/bash_completion.d/purs-completion.bash + mkdir -p $out/share/bash-completion/completions + $PURS --bash-completion-script $PURS > $out/share/bash-completion/completions/purs-completion.bash ''; passthru.tests = { diff --git a/pkgs/development/tools/backblaze-b2/default.nix b/pkgs/development/tools/backblaze-b2/default.nix index 46e54465ab67..32161a437986 100644 --- a/pkgs/development/tools/backblaze-b2/default.nix +++ b/pkgs/development/tools/backblaze-b2/default.nix @@ -35,8 +35,8 @@ python3Packages.buildPythonApplication rec { sed 's/b2/backblaze-b2/' -i contrib/bash_completion/b2 - mkdir -p "$out/etc/bash_completion.d" - cp contrib/bash_completion/b2 "$out/etc/bash_completion.d/backblaze-b2" + mkdir -p "$out/share/bash-completion/completions" + cp contrib/bash_completion/b2 "$out/share/bash-completion/completions/backblaze-b2" ''; meta = with lib; { diff --git a/pkgs/os-specific/linux/trace-cmd/default.nix b/pkgs/os-specific/linux/trace-cmd/default.nix index a80635c53cef..ddd411702151 100644 --- a/pkgs/os-specific/linux/trace-cmd/default.nix +++ b/pkgs/os-specific/linux/trace-cmd/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { "man_dir=${placeholder "man"}/share/man" "libdir=${placeholder "lib"}/lib" "includedir=${placeholder "dev"}/include" - "BASH_COMPLETE_DIR=${placeholder "out"}/etc/bash_completion.d" + "BASH_COMPLETE_DIR=${placeholder "out"}/share/bash-completion/completions" ]; meta = with stdenv.lib; { diff --git a/pkgs/tools/admin/awscli/default.nix b/pkgs/tools/admin/awscli/default.nix index 79d6f42628f3..7c78587a05e5 100644 --- a/pkgs/tools/admin/awscli/default.nix +++ b/pkgs/tools/admin/awscli/default.nix @@ -47,10 +47,12 @@ in with py.pkgs; buildPythonApplication rec { ]; postInstall = '' - mkdir -p $out/etc/bash_completion.d - echo "complete -C $out/bin/aws_completer aws" > $out/etc/bash_completion.d/awscli + mkdir -p $out/share/bash-completion/completions + echo "complete -C $out/bin/aws_completer aws" > $out/share/bash-completion/completions/awscli + mkdir -p $out/share/zsh/site-functions mv $out/bin/aws_zsh_completer.sh $out/share/zsh/site-functions + rm $out/bin/aws.cmd ''; diff --git a/pkgs/tools/admin/awscli2/default.nix b/pkgs/tools/admin/awscli2/default.nix index e89df04e3bd1..b6844767e608 100644 --- a/pkgs/tools/admin/awscli2/default.nix +++ b/pkgs/tools/admin/awscli2/default.nix @@ -67,10 +67,12 @@ with py.pkgs; buildPythonApplication rec { ]; postInstall = '' - mkdir -p $out/etc/bash_completion.d - echo "complete -C $out/bin/aws_completer aws" > $out/etc/bash_completion.d/awscli + mkdir -p $out/share/bash-completion/completions + echo "complete -C $out/bin/aws_completer aws" > $out/share/bash-completion/completions/awscli + mkdir -p $out/share/zsh/site-functions mv $out/bin/aws_zsh_completer.sh $out/share/zsh/site-functions + rm $out/bin/aws.cmd ''; diff --git a/pkgs/tools/admin/bluemix-cli/default.nix b/pkgs/tools/admin/bluemix-cli/default.nix index f97a6e5df891..b0a5af35def5 100644 --- a/pkgs/tools/admin/bluemix-cli/default.nix +++ b/pkgs/tools/admin/bluemix-cli/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { install -m755 -D -t $out/bin/cfcli bin/cfcli/cf ln -sv $out/bin/ibmcloud $out/bin/bx ln -sv $out/bin/ibmcloud $out/bin/bluemix - install -D -t "$out/etc/bash_completion.d" bx/bash_autocomplete + install -D -t "$out/share/bash-completion/completions" bx/bash_autocomplete install -D -t "$out/share/zsh/site-functions" bx/zsh_autocomplete ''; diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix index 53cbaf1229aa..904cab312286 100644 --- a/pkgs/tools/admin/google-cloud-sdk/default.nix +++ b/pkgs/tools/admin/google-cloud-sdk/default.nix @@ -74,8 +74,8 @@ in stdenv.mkDerivation rec { disable_update_check = true" >> $out/google-cloud-sdk/properties # setup bash completion - mkdir -p $out/etc/bash_completion.d - mv $out/google-cloud-sdk/completion.bash.inc $out/etc/bash_completion.d/gcloud.inc + mkdir -p $out/share/bash-completion/completions + mv $out/google-cloud-sdk/completion.bash.inc $out/share/bash-completion/completions/gcloud.inc # This directory contains compiled mac binaries. We used crcmod from # nixpkgs instead. diff --git a/pkgs/tools/backup/tarsnap/default.nix b/pkgs/tools/backup/tarsnap/default.nix index 8d23e955095a..34955a979a41 100644 --- a/pkgs/tools/backup/tarsnap/default.nix +++ b/pkgs/tools/backup/tarsnap/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { }; preConfigure = '' - configureFlags="--with-bash-completion-dir=$out/etc/bash_completion.d" + configureFlags="--with-bash-completion-dir=$out/share/bash-completion/completions" ''; patchPhase = '' diff --git a/pkgs/tools/filesystems/btrfs-progs/default.nix b/pkgs/tools/filesystems/btrfs-progs/default.nix index 3358d1c02776..03db1d913e2b 100644 --- a/pkgs/tools/filesystems/btrfs-progs/default.nix +++ b/pkgs/tools/filesystems/btrfs-progs/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { postPatch = "sed -i s/-O1/-O2/ configure"; postInstall = '' - install -v -m 444 -D btrfs-completion $out/etc/bash_completion.d/btrfs + install -v -m 444 -D btrfs-completion $out/share/bash-completion/completions/btrfs ''; configureFlags = stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-backtrace"; diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index b221025f85b8..7ada070aba68 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -208,12 +208,12 @@ in rec { ceph-client = runCommand "ceph-client-${version}" { meta = getMeta "Tools needed to mount Ceph's RADOS Block Devices"; } '' - mkdir -p $out/{bin,etc,${sitePackages}} + mkdir -p $out/{bin,etc,${sitePackages},share/bash-completion/completions} cp -r ${ceph}/bin/{ceph,.ceph-wrapped,rados,rbd,rbdmap} $out/bin cp -r ${ceph}/bin/ceph-{authtool,conf,dencoder,rbdnamer,syn} $out/bin cp -r ${ceph}/bin/rbd-replay* $out/bin cp -r ${ceph}/${sitePackages} $out/${sitePackages} - cp -r ${ceph}/etc/bash_completion.d $out/etc + cp -r ${ceph}/etc/bash_completion.d $out/share/bash-completion/completions # wrapPythonPrograms modifies .ceph-wrapped, so lets just update its paths substituteInPlace $out/bin/ceph --replace ${ceph} $out substituteInPlace $out/bin/.ceph-wrapped --replace ${ceph} $out diff --git a/pkgs/tools/filesystems/yandex-disk/default.nix b/pkgs/tools/filesystems/yandex-disk/default.nix index 334aa6ad9c60..152fd1d7a71e 100644 --- a/pkgs/tools/filesystems/yandex-disk/default.nix +++ b/pkgs/tools/filesystems/yandex-disk/default.nix @@ -32,12 +32,13 @@ stdenv.mkDerivation rec { cd unpacked ${rpmextract}/bin/rpmextract $src + mkdir -p $out/share/bash-completion/completions cp -r -t $out/bin usr/bin/* cp -r -t $out/share usr/share/* - cp -r -t $out/etc etc/* + cp -r -t $out/share/bash-completion/completions etc/bash_completion.d/* sed -i 's@have@${which}/bin/which >/dev/null 2>\&1@' \ - $out/etc/bash_completion.d/yandex-disk-completion.bash + $out/share/bash-completion/completions/yandex-disk-completion.bash ${patchelf}/bin/patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ diff --git a/pkgs/tools/misc/gibo/default.nix b/pkgs/tools/misc/gibo/default.nix index abee4950d879..1357ab5196d7 100644 --- a/pkgs/tools/misc/gibo/default.nix +++ b/pkgs/tools/misc/gibo/default.nix @@ -14,15 +14,15 @@ stdenv.mkDerivation rec { phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; installPhase = '' - mkdir -p $out/bin $out/etc/bash_completion.d + mkdir -p $out/bin $out/share/bash-completion/completions cp gibo $out/bin - cp gibo-completion.bash $out/etc/bash_completion.d + cp gibo-completion.bash $out/share/bash-completion/completions sed -e 's|\