ghq: Migrate to buildGoModule, ensure go 1.13 compatibility
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
||||
{ stdenv, buildGoModule, fetchFromGitHub, fetchpatch }:
|
||||
|
||||
buildGoPackage rec {
|
||||
buildGoModule rec {
|
||||
pname = "ghq";
|
||||
version = "0.12.6";
|
||||
|
||||
goPackagePath = "github.com/motemen/ghq";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "motemen";
|
||||
repo = "ghq";
|
||||
@@ -13,7 +11,7 @@ buildGoPackage rec {
|
||||
sha256 = "14rm7fvphr7r9x0ys10vhzjwhfhhscgr574n1i1z4lzw551lrnp4";
|
||||
};
|
||||
|
||||
goDeps = ./deps.nix;
|
||||
modSha256 = "1y2v8ir7kc2avgri06nagfyaxqr3xrg4g5pxl9rwzq9dyzm6ci5z";
|
||||
|
||||
buildFlagsArray = ''
|
||||
-ldflags=
|
||||
@@ -21,9 +19,17 @@ buildGoPackage rec {
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -m 444 -D ${src}/zsh/_ghq $bin/share/zsh/site-functions/_ghq
|
||||
install -m 444 -D ${src}/zsh/_ghq $out/share/zsh/site-functions/_ghq
|
||||
'';
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# remove once the commit lands in a release.
|
||||
url = "https://github.com/motemen/ghq/commit/38ac89e60e60182b5870108f9753c9fe8d00e4a6.patch";
|
||||
sha256 = "1z8yvzmka3sh44my6jnwc39p8zs7mczxgvwc9z0pkqk4vgvaj8gj";
|
||||
})
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Remote repository management made easy";
|
||||
homepage = https://github.com/motemen/ghq;
|
||||
|
||||
Reference in New Issue
Block a user