From 998d4e4e2c2c71034b9232453d33d8a2c9fdbdb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Th=C3=B8mt=20Ravneberg?= Date: Mon, 8 Oct 2018 14:56:52 +0200 Subject: [PATCH] gitlab-workhorse: 6.1.0 -> 6.1.1, make build deterministic --- .../version-management/gitlab-workhorse/default.nix | 6 +++--- .../gitlab-workhorse/deterministic-build.patch | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 pkgs/applications/version-management/gitlab-workhorse/deterministic-build.patch diff --git a/pkgs/applications/version-management/gitlab-workhorse/default.nix b/pkgs/applications/version-management/gitlab-workhorse/default.nix index 1fe8c844ebf0..16acf2a91d70 100644 --- a/pkgs/applications/version-management/gitlab-workhorse/default.nix +++ b/pkgs/applications/version-management/gitlab-workhorse/default.nix @@ -2,18 +2,18 @@ stdenv.mkDerivation rec { name = "gitlab-workhorse-${version}"; - version = "6.1.0"; + version = "6.1.1"; srcs = fetchFromGitLab { owner = "gitlab-org"; repo = "gitlab-workhorse"; rev = "v${version}"; - sha256 = "0h0mqalia4ldb2icr2h6x75pnr5jb5y23pi4kv4ri3w3ddnl74bq"; + sha256 = "1dwvk86bfsqgkp0mwz71yis3i7aypjf96r3hsjkgpd27hwbjgxbr"; }; buildInputs = [ git go ]; - patches = [ ./remove-hardcoded-paths.patch ]; + patches = [ ./remove-hardcoded-paths.patch ./deterministic-build.patch ]; makeFlags = [ "PREFIX=$(out)" "VERSION=${version}" ]; diff --git a/pkgs/applications/version-management/gitlab-workhorse/deterministic-build.patch b/pkgs/applications/version-management/gitlab-workhorse/deterministic-build.patch new file mode 100644 index 000000000000..da6dc5493ac5 --- /dev/null +++ b/pkgs/applications/version-management/gitlab-workhorse/deterministic-build.patch @@ -0,0 +1,11 @@ +--- a/Makefile 2018-10-08 12:45:15.206269937 +0200 ++++ b/Makefile 2018-10-08 12:45:24.435366307 +0200 +@@ -6,7 +6,7 @@ + BIN_BUILD_DIR := $(TARGET_DIR)/bin + PKG_BUILD_DIR := $(TARGET_DIR)/src/$(PKG) + COVERAGE_DIR := $(TARGET_DIR)/cover +-VERSION := $(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S) ++VERSION := 6.1.1 + GOBUILD := go build -ldflags "-X main.Version=$(VERSION)" + EXE_ALL := gitlab-zip-cat gitlab-zip-metadata gitlab-workhorse + INSTALL := install