From fbdc10572dd5054b4ce9f5315ccd623a83807acc Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Thu, 14 May 2020 17:36:02 +1000 Subject: [PATCH] buildah: switch to buildGoModule --- pkgs/development/tools/buildah/default.nix | 9 ++---- .../buildah/disable-go-module-mode.patch | 32 ------------------- 2 files changed, 3 insertions(+), 38 deletions(-) delete mode 100644 pkgs/development/tools/buildah/disable-go-module-mode.patch diff --git a/pkgs/development/tools/buildah/default.nix b/pkgs/development/tools/buildah/default.nix index 3aab8f24da1e..0171dfc0543c 100644 --- a/pkgs/development/tools/buildah/default.nix +++ b/pkgs/development/tools/buildah/default.nix @@ -1,5 +1,5 @@ { stdenv -, buildGoPackage +, buildGoModule , fetchFromGitHub , installShellFiles , pkg-config @@ -11,7 +11,7 @@ , libseccomp }: -buildGoPackage rec { +buildGoModule rec { pname = "buildah"; version = "1.14.9"; @@ -24,15 +24,12 @@ buildGoPackage rec { outputs = [ "out" "man" ]; - goPackagePath = "github.com/containers/buildah"; + vendorSha256 = null; nativeBuildInputs = [ installShellFiles pkg-config ]; buildInputs = [ gpgme libgpgerror lvm2 btrfs-progs libselinux libseccomp ]; - patches = [ ./disable-go-module-mode.patch ]; - buildPhase = '' - pushd go/src/${goPackagePath} make GIT_COMMIT="unknown" make -C docs ''; diff --git a/pkgs/development/tools/buildah/disable-go-module-mode.patch b/pkgs/development/tools/buildah/disable-go-module-mode.patch deleted file mode 100644 index 86ca9132529f..000000000000 --- a/pkgs/development/tools/buildah/disable-go-module-mode.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e2d12e52b3638a320a8d69ea4b392b60f44ea57f Mon Sep 17 00:00:00 2001 -From: Mario Rodas -Date: Wed, 4 Dec 2019 21:07:33 -0500 -Subject: [PATCH] Do not check Go module-mode availability - -Since buildah vendorizes its dependencies we use buildGoPackage which -does not uses Go module-mode. The module-mode check will be true -because nixpkgs uses Go 1.13 by default, and building go modules with -buildGoPackage may lead to inconsistencies. ---- - Makefile | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/Makefile b/Makefile -index 07724ce4..6383646e 100644 ---- a/Makefile -+++ b/Makefile -@@ -15,14 +15,8 @@ BUILDAH := buildah - GO := go - GO110 := 1.10 - GOVERSION := $(findstring $(GO110),$(shell go version)) --# test for go module support --ifeq ($(shell go help mod >/dev/null 2>&1 && echo true), true) --export GO_BUILD=GO111MODULE=on $(GO) build -mod=vendor --export GO_TEST=GO111MODULE=on $(GO) test -mod=vendor --else - export GO_BUILD=$(GO) build - export GO_TEST=$(GO) test --endif - - GIT_COMMIT ?= $(if $(shell git rev-parse --short HEAD),$(shell git rev-parse --short HEAD),$(error "git failed")) - SOURCE_DATE_EPOCH ?= $(if $(shell date +%s),$(shell date +%s),$(error "date failed"))