Merge pull request #107085 from zowoq/go-mod-packagepath

buildGoModule: disallow goPackagePath
This commit is contained in:
Maximilian Bosch 2020-12-17 22:44:00 +01:00 committed by GitHub
commit 821ed09f38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 6 additions and 15 deletions

View file

@ -7,10 +7,8 @@ buildGoModule rec {
pname = "sonobuoy";
version = "0.19.0";
goPackagePath = "github.com/vmware-tanzu/sonobuoy";
buildFlagsArray =
let t = goPackagePath;
let t = "github.com/vmware-tanzu/sonobuoy";
in ''
-ldflags=
-s -X ${t}/pkg/buildinfo.Version=v${version}

View file

@ -36,6 +36,9 @@
, meta ? {}
# Not needed with buildGoModule
, goPackagePath ? null
, ... }@args':
with builtins;
@ -242,5 +245,7 @@ let
});
in if disabled then
throw "${package.name} not supported for go ${go.meta.branch}"
else if (goPackagePath != null) then
throw "`goPackagePath` not needed with `buildGoModule`"
else
package

View file

@ -4,8 +4,6 @@ buildGoModule rec {
name = "buildkite-agent-${version}";
version = "3.26.0";
goPackagePath = "github.com/buildkite/agent";
src = fetchFromGitHub {
owner = "buildkite";
repo = "agent";

View file

@ -13,8 +13,6 @@ buildGoModule rec {
vendorSha256 = "Gw+cR5sA5MGuclcvur8olmRtK04LDP5vKJ5k7yZO3B0=";
goPackagePath = "github.com/cloudposse/${pname}";
meta = with lib; {
description = "Command line utility for creating GitHub comments on Commits, Pull Request Reviews or Issues";
license = licenses.asl20;

View file

@ -12,8 +12,6 @@ buildGoModule rec {
};
vendorSha256 = "8NdeCD558r0tV+ZR4MvLl5CzeNj8cUGtqwvJ2ZhS7mI=";
goPackagePath = "github.com/hashicorp/terraform-ls";
# tests fail in sandbox mode because of trying to download stuff from releases.hashicorp.com
doCheck = false;

View file

@ -4,7 +4,6 @@ buildGoModule rec {
pname = "wally-cli";
version = "2.0.0";
goPackagePath = "github.com/zsa/wally-cli";
subPackages = [ "." ];
nativeBuildInputs = [ pkg-config ];

View file

@ -10,8 +10,6 @@ buildGoModule rec {
sha256 = "0v9wp15aj4r7wif8i897zwj3c6bg41b95kk7vi3a3bzin814qn6l";
};
goPackagePath = "github.com/vmware-tanzu/carvel-ytt";
vendorSha256 = null;
subPackages = [ "cmd/ytt" ];

View file

@ -6,7 +6,6 @@
buildGoModule {
pname = "demoit";
version = "unstable-2020-06-11";
goPackagePath = "github.com/dgageot/demoit";
src = fetchFromGitHub {
owner = "dgageot";

View file

@ -4,8 +4,6 @@ buildGoModule rec {
pname = "cod";
version = "unstable-2020-09-10";
goPackagePath = "cod";
src = fetchFromGitHub {
owner = "dim-an";
repo = pname;