From f909e502877b91cdb25ea147fa700cb4d732ed9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 28 Mar 2020 07:28:52 +0000 Subject: [PATCH] gitAndTools.grv: fix build by using vendored libgit --- .../git-and-tools/grv/default.nix | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 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 8ccee2d720a2..c1839b591a7e 100644 --- a/pkgs/applications/version-management/git-and-tools/grv/default.nix +++ b/pkgs/applications/version-management/git-and-tools/grv/default.nix @@ -1,4 +1,5 @@ -{ stdenv, buildGoPackage, fetchFromGitHub, curl, libgit2, ncurses, pkgconfig, readline }: +{ stdenv, buildGoPackage, fetchFromGitHub, curl, ncurses, pkgconfig, readline +, cmake }: let version = "0.3.2"; in @@ -6,8 +7,8 @@ buildGoPackage { pname = "grv"; inherit version; - buildInputs = [ ncurses readline curl libgit2 ]; - nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ncurses readline curl ]; + nativeBuildInputs = [ pkgconfig cmake ]; goPackagePath = "github.com/rgburke/grv"; @@ -23,7 +24,21 @@ 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";