git.iko.soy/typeable/nixpkgs
on master help sign in
gitstatus: move scripts to $out/share/gitstatus, fix a bug when loading from home-manager
commit52cab6b8951fb5e69ee932852f36640dc7b5182f authorSandro Jäckel <sandro.jaeckel@gmail.com> dateFri 6 Aug 2021, 17:22 (5 years ago) parente3bb39d
1 file changed+12−7
pkgs/applications/version-management/git-and-tools/gitstatus/default.nix+12−7
pkgs/applications/version-management/git-and-tools/gitstatus/default.nix+12−7
@@ -21,18 +21,23 @@ stdenv.mkDerivation rec {
2121
2222 installPhase = ''
2323 install -Dm755 usrbin/gitstatusd $out/bin/gitstatusd
24− install -Dm444 gitstatus.plugin.sh $out
25− install -Dm444 gitstatus.plugin.zsh $out
26− install -Dm555 install $out
27− install -Dm444 build.info $out
24+ install -Dm444 gitstatus.plugin.sh -t $out/share/gitstatus/
25+ install -Dm444 gitstatus.plugin.zsh -t $out/share/gitstatus/
26+ install -Dm555 install -t $out/share/gitstatus/
27+ install -Dm444 build.info -t $out/share/gitstatus/
28+
29+ # the fallback path is wrong in the case of home-manager
30+ # because the FHS directories don't start at /
31+ substituteInPlace install \
32+ --replace "_gitstatus_install_main ." "_gitstatus_install_main $out"
2833 '';
2934
3035 # Don't install the "install" and "build.info" files, which the end user
3136 # should not need to worry about.
3237 pathsToLink = [
3338 "/bin/gitstatusd"
34− "/gitstatus.plugin.sh"
35− "/gitstatus.plugin.zsh"
39+ "/share/gitstatus/gitstatus.plugin.sh"
40+ "/share/gitstatus/gitstatus.plugin.zsh"
3641 ];
3742
3843 # The install check sets up an empty Git repository and a minimal zshrc that
@@ -50,7 +55,7 @@ stdenv.mkDerivation rec {
5055
5156 echo '
5257 GITSTATUS_LOG_LEVEL=DEBUG
53− . $out/gitstatus.plugin.zsh || exit 1
58+ . $out/share/gitstatus/gitstatus.plugin.zsh || exit 1
5459
5560 gitstatus_stop NIX_TEST && gitstatus_start NIX_TEST
5661 gitstatus_query NIX_TEST