Can't change bash-completion file install directory with bash-completion version < 2.10
MR !61 (merged) made it so that -Ddatadir
needs to be specified in order to override the bash-completion file installation directory. However this only works with bash-completion version 2.10. completionsdir
is hard-coded in version 2.9 and depends on prefix
in version 2.8. Here are the pkg-config file contents across the three versions on my system (I built 2.9 and 2.10 manually):
[nix-shell:~/repos/fgl/waffle]$ cat /nix/store/ph4zwnig83vad53gw7xpz754jmby1rjw-bash-completion-2.10/share/pkgconfig/bash-completion.pc
prefix=/nix/store/ph4zwnig83vad53gw7xpz754jmby1rjw-bash-completion-2.10
datadir=/nix/store/ph4zwnig83vad53gw7xpz754jmby1rjw-bash-completion-2.10/share
sysconfdir=/nix/store/ph4zwnig83vad53gw7xpz754jmby1rjw-bash-completion-2.10/etc
compatdir=${sysconfdir}/bash_completion.d
completionsdir=${datadir}/bash-completion/completions
helpersdir=${datadir}/bash-completion/helpers
Name: bash-completion
Description: programmable completion for the bash shell
URL: https://github.com/scop/bash-completion
Version: 2.10
[nix-shell:~/repos/fgl/waffle]$ cat /nix/store/36v8gb9a4zjxnp3f3lckr0d0kq1l90r3-bash-completion-2.9/share/pkgconfig/bash-completion.pc
prefix=/nix/store/36v8gb9a4zjxnp3f3lckr0d0kq1l90r3-bash-completion-2.9
compatdir=/nix/store/36v8gb9a4zjxnp3f3lckr0d0kq1l90r3-bash-completion-2.9/etc/bash_completion.d
completionsdir=/nix/store/36v8gb9a4zjxnp3f3lckr0d0kq1l90r3-bash-completion-2.9/share/bash-completion/completions
helpersdir=/nix/store/36v8gb9a4zjxnp3f3lckr0d0kq1l90r3-bash-completion-2.9/share/bash-completion/helpers
Name: bash-completion
Description: programmable completion for the bash shell
URL: https://github.com/scop/bash-completion
Version: 2.9
[nix-shell:~/repos/fgl/waffle]$ cat /nix/store/55vm3jxvygw7qwm746zz3g7ym3sjrzcc-bash-completion-2.8/share/pkgconfig/bash-completion.pc
prefix=/nix/store/55vm3jxvygw7qwm746zz3g7ym3sjrzcc-bash-completion-2.8
compatdir=${prefix}/etc/bash_completion.d
completionsdir=${prefix}/share/bash-completion/completions
helpersdir=${prefix}/share/bash-completion/helpers
Name: bash-completion
Description: programmable completion for the bash shell
URL: https://github.com/scop/bash-completion
Version: 2.8
/cc @rantogno