about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/buildah
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-01-11 23:37:02 +0000
committerAlyssa Ross <hi@alyssa.is>2020-01-11 23:41:30 +0000
commit6c557e3f1c28cf87e9fba232811d6875dd1399c1 (patch)
tree035a071d5d8980df6de0fa42e2ef8fc0cce7055e /nixpkgs/pkgs/development/tools/buildah
parentda7500bc026e937ac7fce7b50f67a0e1765737a7 (diff)
parente4134747f5666bcab8680aff67fa3b63384f9a0f (diff)
downloadnixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.gz
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.bz2
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.lz
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.xz
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.zst
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.zip
Merge commit 'e4134747f5666bcab8680aff67fa3b63384f9a0f'
Diffstat (limited to 'nixpkgs/pkgs/development/tools/buildah')
-rw-r--r--nixpkgs/pkgs/development/tools/buildah/default.nix12
-rw-r--r--nixpkgs/pkgs/development/tools/buildah/disable-go-module-mode.patch33
2 files changed, 42 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/tools/buildah/default.nix b/nixpkgs/pkgs/development/tools/buildah/default.nix
index 9e7856c9e3a9..db01a068c00c 100644
--- a/nixpkgs/pkgs/development/tools/buildah/default.nix
+++ b/nixpkgs/pkgs/development/tools/buildah/default.nix
@@ -4,13 +4,13 @@
 
 buildGoPackage rec {
   pname = "buildah";
-  version = "1.11.1";
+  version = "1.12.0";
 
   src = fetchFromGitHub {
     owner  = "containers";
     repo   = "buildah";
     rev    = "v${version}";
-    sha256 = "0mbmb7994dcv8i41zgiqmb6qp5hawgygzam7mi4pmdygkx4ckkxw";
+    sha256 = "0lsjsfp6ls38vlgibbnsyd1m7jvmjwdmpyrd0qigp4aa2abwi4dg";
   };
 
   outputs = [ "bin" "man" "out" ];
@@ -18,9 +18,15 @@ buildGoPackage rec {
   goPackagePath = "github.com/containers/buildah";
   excludedPackages = [ "tests" ];
 
+  # Disable module-mode, because Go 1.13 automatically enables it if there is
+  # go.mod file. Remove after https://github.com/NixOS/nixpkgs/pull/73380
+  GO111MODULE = "off";
+
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ gpgme libgpgerror lvm2 btrfs-progs ostree libselinux libseccomp ];
 
+  patches = [ ./disable-go-module-mode.patch ];
+
   buildPhase = ''
     pushd go/src/${goPackagePath}
     make GIT_COMMIT="unknown"
@@ -35,6 +41,6 @@ buildGoPackage rec {
     description = "A tool which facilitates building OCI images";
     homepage = "https://github.com/containers/buildah";
     license = licenses.asl20;
-    maintainers = with maintainers; [ Profpatsch vdemeester ];
+    maintainers = with maintainers; [ Profpatsch vdemeester saschagrunert ];
   };
 }
diff --git a/nixpkgs/pkgs/development/tools/buildah/disable-go-module-mode.patch b/nixpkgs/pkgs/development/tools/buildah/disable-go-module-mode.patch
new file mode 100644
index 000000000000..a6f211412ea1
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/buildah/disable-go-module-mode.patch
@@ -0,0 +1,33 @@
+From e2d12e52b3638a320a8d69ea4b392b60f44ea57f Mon Sep 17 00:00:00 2001
+From: Mario Rodas <marsam@users.noreply.github.com>
+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 9d04177d..4cf9b6a2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,12 +15,7 @@ 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
+-else
+ export GO_BUILD=$(GO) build
+-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"))
+-- 
+2.24.0
+