summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-and-tools/grv/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/version-management/git-and-tools/grv/default.nix')
-rw-r--r--pkgs/applications/version-management/git-and-tools/grv/default.nix29
1 files changed, 22 insertions, 7 deletions
diff --git a/pkgs/applications/version-management/git-and-tools/grv/default.nix b/pkgs/applications/version-management/git-and-tools/grv/default.nix
index e6b746233fe..8c915762b6e 100644
--- a/pkgs/applications/version-management/git-and-tools/grv/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/grv/default.nix
@@ -1,13 +1,14 @@
-{ stdenv, buildGoPackage, fetchFromGitHub, curl, libgit2, ncurses, pkgconfig, readline }:
+{ stdenv, buildGoPackage, fetchFromGitHub, curl, ncurses, pkgconfig, readline
+, cmake }:
 let
-  version = "0.3.1";
+  version = "0.3.2";
 in
 buildGoPackage {
   pname = "grv";
   inherit version;
 
-  buildInputs = [ ncurses readline curl libgit2 ];
-  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ ncurses readline curl ];
+  nativeBuildInputs = [ pkgconfig cmake ];
 
   goPackagePath = "github.com/rgburke/grv";
 
@@ -15,7 +16,7 @@ buildGoPackage {
     owner = "rgburke";
     repo = "grv";
     rev = "v${version}";
-    sha256 = "16ylapsibqrqwx45l4ypr3av07rd1haf10v838mjqsakf8l1xc0b";
+    sha256 = "0bpjsk35rlp56z8149z890adnhmxyh743vsls3q86j4682b83kyf";
     fetchSubmodules = true;
   };
 
@@ -23,11 +24,25 @@ buildGoPackage {
     rm util/update_latest_release.go
   '';
 
-  buildFlagsArray = [ "-ldflags=" "-X main.version=${version}" ];
+  postConfigure = ''
+    cd $NIX_BUILD_TOP/go/src/$goPackagePath
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+    make build-only
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    install -D grv $bin/bin/grv
+    runHook postInstall
+  '';
 
   meta = with stdenv.lib; {
     description = "GRV is a terminal interface for viewing Git repositories";
-    homepage = https://github.com/rgburke/grv;
+    homepage = "https://github.com/rgburke/grv";
     license = licenses.gpl3;
     platforms = platforms.unix;
     maintainers = with maintainers; [ andir ];