From c9d1a0d2520c73bd205a67efea7dc78529a65652 Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Tue, 7 May 2019 21:47:04 -0400 Subject: [PATCH] gitAndTools.gitstatus: init at unstable-2019-05-06 --- .../git-and-tools/default.nix | 2 ++ .../git-and-tools/gitstatus/default.nix | 30 +++++++++++++++++++ .../gitstatus/romkatv_libgit2.nix | 19 ++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 pkgs/applications/version-management/git-and-tools/gitstatus/default.nix create mode 100644 pkgs/applications/version-management/git-and-tools/gitstatus/romkatv_libgit2.nix diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix index 4f46fd556012..161bcf56b127 100644 --- a/pkgs/applications/version-management/git-and-tools/default.nix +++ b/pkgs/applications/version-management/git-and-tools/default.nix @@ -127,6 +127,8 @@ let gitflow = callPackage ./gitflow { }; + gitstatus = callPackage ./gitstatus { }; + grv = callPackage ./grv { }; hub = callPackage ./hub { diff --git a/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix b/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix new file mode 100644 index 000000000000..1de631e8b6ad --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix @@ -0,0 +1,30 @@ +{callPackage, stdenv, fetchFromGitHub, ...}: + +stdenv.mkDerivation rec { + pname = "gitstatus"; + version = "unstable-2019-05-06"; + + src = fetchFromGitHub { + owner = "romkatv"; + repo = "gitstatus"; + rev = "9c791f93c23c04dadfab8b4309a863b62a6ee424"; + sha256 = "0jbdrgl62x6j920h72n2q6304fb6gdgnmllpv4aa76m13b9qhgq6"; + }; + + buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ]; + patchPhase = '' + sed -i "s|local daemon.*|local daemon=$out/bin/gitstatusd|" gitstatus.plugin.zsh + ''; + installPhase = '' + install -Dm755 gitstatusd $out/bin/gitstatusd + install -Dm444 gitstatus.plugin.zsh $out + ''; + + meta = with stdenv.lib; { + description = "10x faster implementation of `git status` command"; + homepage = https://github.com/romkatv/gitstatus; + license = [ licenses.gpl3 ]; + + maintainers = [ maintainers.mmlb ]; + }; +} diff --git a/pkgs/applications/version-management/git-and-tools/gitstatus/romkatv_libgit2.nix b/pkgs/applications/version-management/git-and-tools/gitstatus/romkatv_libgit2.nix new file mode 100644 index 000000000000..f8aae5da0473 --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/gitstatus/romkatv_libgit2.nix @@ -0,0 +1,19 @@ +{fetchFromGitHub, libgit2_0_27, ...}: + +libgit2_0_27.overrideAttrs (oldAttrs: rec { + cmakeFlags = oldAttrs.cmakeFlags ++ [ + "-DUSE_BUNDLED_ZLIB=ON" + "-DUSE_ICONV=OFF" + "-DBUILD_CLAR=OFF" + "-DUSE_SSH=OFF" + "-DUSE_HTTPS=OFF" + "-DBUILD_SHARED_LIBS=OFF" + "-DUSE_EXT_HTTP_PARSER=OFF" + ]; + src = fetchFromGitHub { + owner = "romkatv"; + repo = "libgit2"; + rev = "aab6c56e6766fa752bef00c745067d875925fc89"; + sha256 = "1yqqhpi5xi6s86411sixw4yq5c6n2v8pdh447c8b7q5lfc089lvl"; + }; +})