gitstatus: move scripts to $out/share/gitstatus, fix a bug when loading from home-manager

+12 -7
+12 -7
pkgs/applications/version-management/git-and-tools/gitstatus/default.nix
··· 21 21 22 22 installPhase = '' 23 23 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" 28 33 ''; 29 34 30 35 # Don't install the "install" and "build.info" files, which the end user 31 36 # should not need to worry about. 32 37 pathsToLink = [ 33 38 "/bin/gitstatusd" 34 - "/gitstatus.plugin.sh" 35 - "/gitstatus.plugin.zsh" 39 + "/share/gitstatus/gitstatus.plugin.sh" 40 + "/share/gitstatus/gitstatus.plugin.zsh" 36 41 ]; 37 42 38 43 # The install check sets up an empty Git repository and a minimal zshrc that ··· 50 55 51 56 echo ' 52 57 GITSTATUS_LOG_LEVEL=DEBUG 53 - . $out/gitstatus.plugin.zsh || exit 1 58 + . $out/share/gitstatus/gitstatus.plugin.zsh || exit 1 54 59 55 60 gitstatus_stop NIX_TEST && gitstatus_start NIX_TEST 56 61 gitstatus_query NIX_TEST