diff options
author | Florian Klink <flokli@flokli.de> | 2018-11-23 13:18:43 +0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2018-11-23 13:18:43 +0100 |
commit | d768e3967fd02771e1c428bbd239cd3b344ff729 (patch) | |
tree | 28f107fe0084a8618ff522528af90d263ba3b527 /pkgs/applications/version-management/gitlab/gitlab-workhorse | |
parent | cb79c1e60bab5dca577d736a777d3758cec2ab15 (diff) | |
download | nixlib-d768e3967fd02771e1c428bbd239cd3b344ff729.tar nixlib-d768e3967fd02771e1c428bbd239cd3b344ff729.tar.gz nixlib-d768e3967fd02771e1c428bbd239cd3b344ff729.tar.bz2 nixlib-d768e3967fd02771e1c428bbd239cd3b344ff729.tar.lz nixlib-d768e3967fd02771e1c428bbd239cd3b344ff729.tar.xz nixlib-d768e3967fd02771e1c428bbd239cd3b344ff729.tar.zst nixlib-d768e3967fd02771e1c428bbd239cd3b344ff729.zip |
gitlab-workhorse: move to pkgs/applications/version-management/gitlab
Diffstat (limited to 'pkgs/applications/version-management/gitlab/gitlab-workhorse')
3 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/gitlab/gitlab-workhorse/default.nix b/pkgs/applications/version-management/gitlab/gitlab-workhorse/default.nix new file mode 100644 index 000000000000..3fab965bf547 --- /dev/null +++ b/pkgs/applications/version-management/gitlab/gitlab-workhorse/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitLab, git, go }: + +stdenv.mkDerivation rec { + name = "gitlab-workhorse-${version}"; + + version = "7.0.0"; + + srcs = fetchFromGitLab { + owner = "gitlab-org"; + repo = "gitlab-workhorse"; + rev = "v${version}"; + sha256 = "1mmfb7h5sbva2kv9h9cxfg7dyksxrwwikq7jwggfawqaadzwm677"; + }; + + buildInputs = [ git go ]; + + patches = [ ./remove-hardcoded-paths.patch ./deterministic-build.patch ]; + + makeFlags = [ "PREFIX=$(out)" "VERSION=${version}" ]; + + meta = with stdenv.lib; { + homepage = http://www.gitlab.com/; + platforms = platforms.unix; + maintainers = with maintainers; [ fpletz globin ]; + license = licenses.mit; + }; +} diff --git a/pkgs/applications/version-management/gitlab/gitlab-workhorse/deterministic-build.patch b/pkgs/applications/version-management/gitlab/gitlab-workhorse/deterministic-build.patch new file mode 100644 index 000000000000..da6dc5493ac5 --- /dev/null +++ b/pkgs/applications/version-management/gitlab/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 diff --git a/pkgs/applications/version-management/gitlab/gitlab-workhorse/remove-hardcoded-paths.patch b/pkgs/applications/version-management/gitlab/gitlab-workhorse/remove-hardcoded-paths.patch new file mode 100644 index 000000000000..d8313ecb433a --- /dev/null +++ b/pkgs/applications/version-management/gitlab/gitlab-workhorse/remove-hardcoded-paths.patch @@ -0,0 +1,12 @@ +diff --git a/internal/git/command.go b/internal/git/command.go +index 0e5496c..5778294 100644 +--- a/internal/git/command.go ++++ b/internal/git/command.go +@@ -19,6 +19,7 @@ func gitCommand(gl_id string, name string, args ...string) *exec.Cmd { + cmd.Env = []string{ + fmt.Sprintf("HOME=%s", os.Getenv("HOME")), + fmt.Sprintf("PATH=%s", os.Getenv("PATH")), ++ fmt.Sprintf("GITLAB_SHELL_CONFIG_PATH=%s", os.Getenv("GITLAB_SHELL_CONFIG_PATH")), + fmt.Sprintf("LD_LIBRARY_PATH=%s", os.Getenv("LD_LIBRARY_PATH")), + fmt.Sprintf("GL_PROTOCOL=http"), + } |