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