commit
293026e7ca
2 changed files with 21 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
|||
{ callPackage, lib, stdenv, fetchFromGitHub, git, zsh, ...}:
|
||||
{ callPackage, lib, stdenv, fetchFromGitHub, git, zsh }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gitstatus";
|
||||
|
@ -11,25 +11,33 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "sha256-MQG4thW73gDqY68bKP2FO8z5uc2R/tED+/X9qas/GOA=";
|
||||
};
|
||||
|
||||
buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];
|
||||
patchPhase = ''
|
||||
buildInputs = [ (callPackage ./romkatv_libgit2.nix { }) ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i '1i GITSTATUS_AUTO_INSTALL=''${GITSTATUS_AUTO_INSTALL-0}' gitstatus.plugin.sh
|
||||
sed -i '1i GITSTATUS_AUTO_INSTALL=''${GITSTATUS_AUTO_INSTALL-0}' gitstatus.plugin.zsh
|
||||
sed -i "1a GITSTATUS_DAEMON=$out/bin/gitstatusd" install
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 usrbin/gitstatusd $out/bin/gitstatusd
|
||||
install -Dm444 gitstatus.plugin.sh $out
|
||||
install -Dm444 gitstatus.plugin.zsh $out
|
||||
install -Dm555 install $out
|
||||
install -Dm444 build.info $out
|
||||
install -Dm444 gitstatus.plugin.sh -t $out/share/gitstatus/
|
||||
install -Dm444 gitstatus.plugin.zsh -t $out/share/gitstatus/
|
||||
install -Dm555 install -t $out/share/gitstatus/
|
||||
install -Dm444 build.info -t $out/share/gitstatus/
|
||||
|
||||
# the fallback path is wrong in the case of home-manager
|
||||
# because the FHS directories don't start at /
|
||||
substituteInPlace install \
|
||||
--replace "_gitstatus_install_main ." "_gitstatus_install_main $out"
|
||||
'';
|
||||
|
||||
# Don't install the "install" and "build.info" files, which the end user
|
||||
# should not need to worry about.
|
||||
pathsToLink = [
|
||||
"/bin/gitstatusd"
|
||||
"/gitstatus.plugin.sh"
|
||||
"/gitstatus.plugin.zsh"
|
||||
"/share/gitstatus/gitstatus.plugin.sh"
|
||||
"/share/gitstatus/gitstatus.plugin.zsh"
|
||||
];
|
||||
|
||||
# The install check sets up an empty Git repository and a minimal zshrc that
|
||||
|
@ -47,7 +55,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
echo '
|
||||
GITSTATUS_LOG_LEVEL=DEBUG
|
||||
. $out/gitstatus.plugin.zsh || exit 1
|
||||
. $out/share/gitstatus/gitstatus.plugin.zsh || exit 1
|
||||
|
||||
gitstatus_stop NIX_TEST && gitstatus_start NIX_TEST
|
||||
gitstatus_query NIX_TEST
|
||||
|
@ -77,6 +85,6 @@ stdenv.mkDerivation rec {
|
|||
description = "10x faster implementation of `git status` command";
|
||||
homepage = "https://github.com/romkatv/gitstatus";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ mmlb hexa ];
|
||||
maintainers = with maintainers; [ mmlb hexa SuperSandro2000 ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ libgit2.overrideAttrs (oldAttrs: {
|
|||
src = fetchFromGitHub {
|
||||
owner = "romkatv";
|
||||
repo = "libgit2";
|
||||
rev = "tag-82cefe2b42300224ad3c148f8b1a569757cc617a";
|
||||
sha256 = "1vhnqynqyxizzkq1h5dfjm75f0jm5637jh0gypwqqz2yjqrscza0";
|
||||
rev = "tag-5860a42d19bcd226cb6eff2dcbfcbf155d570c73";
|
||||
sha256 = "sha256-OdGLNGOzXbWQGqw5zYM1RhU4Z2yRXi9cpAt7Vn9+j5I=";
|
||||
};
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue