diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2016-01-30 14:47:04 +0100 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2016-02-26 07:08:31 +0100 |
commit | bcfa59bf822dc696e963d7abccfdff2e58e70525 (patch) | |
tree | b57383fd52e6ac6112f100ca04040c23efa87fa3 /pkgs/applications/version-management/gitlab-workhorse | |
parent | 30891166be9156c65a50c52cd08f3c7a0f5492da (diff) | |
download | nixlib-bcfa59bf822dc696e963d7abccfdff2e58e70525.tar nixlib-bcfa59bf822dc696e963d7abccfdff2e58e70525.tar.gz nixlib-bcfa59bf822dc696e963d7abccfdff2e58e70525.tar.bz2 nixlib-bcfa59bf822dc696e963d7abccfdff2e58e70525.tar.lz nixlib-bcfa59bf822dc696e963d7abccfdff2e58e70525.tar.xz nixlib-bcfa59bf822dc696e963d7abccfdff2e58e70525.tar.zst nixlib-bcfa59bf822dc696e963d7abccfdff2e58e70525.zip |
gitlab: 8.0.5 -> 8.5.0, service improvements
Updates gitlab to the current stable version and fixes a lot of features that were broken, at least with the current version and our configuration. Quite a lot of sweat and tears has gone into testing nearly all features and reading/patching the Gitlab source as we're about to deploy gitlab for our whole company. Things to note: * The gitlab config is now written as a nix attribute set and will be converted to JSON. Gitlab uses YAML but JSON is a subset of YAML. The `extraConfig` opition is also an attribute set that will be merged with the default config. This way *all* Gitlab options are supported. * Some paths like uploads and configs are hardcoded in rails (at least after my study of the Gitlab source). This is why they are linked from the Gitlab root to /run/gitlab and then linked to the configurable `statePath`. * Backup & restore should work out of the box from another Gitlab instance. * gitlab-git-http-server has been replaced by gitlab-workhorse upstream. Push & pull over HTTPS works perfectly. Communication to gitlab is done over unix sockets. An HTTP server is required to proxy requests to gitlab-workhorse over another unix socket at `/run/gitlab/gitlab-workhorse.socket`. * The user & group running gitlab are now configurable. These can even be changed for live instances. * The initial email address & password of the root user can be configured. Fixes #8598.
Diffstat (limited to 'pkgs/applications/version-management/gitlab-workhorse')
-rw-r--r-- | pkgs/applications/version-management/gitlab-workhorse/default.nix | 26 | ||||
-rw-r--r-- | pkgs/applications/version-management/gitlab-workhorse/remove-hardcoded-paths.patch | 12 |
2 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/gitlab-workhorse/default.nix b/pkgs/applications/version-management/gitlab-workhorse/default.nix new file mode 100644 index 000000000000..06c05d9f3b3b --- /dev/null +++ b/pkgs/applications/version-management/gitlab-workhorse/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitLab, git, go }: + +stdenv.mkDerivation rec { + version = "0.6.4"; + name = "gitlab-workhorse-${version}"; + + srcs = fetchFromGitLab { + owner = "gitlab-org"; + repo = "gitlab-workhorse"; + rev = version; + sha256 = "09bs3kdmqi6avdak2nqma141y4fhfv050zwqqx7qh9a9hgkgwjxw"; + }; + + buildInputs = [ git go ]; + + patches = [ ./remove-hardcoded-paths.patch ]; + + buildPhase = '' + make PREFIX=$out + ''; + + installPhase = '' + mkdir -p $out/bin + make install PREFIX=$out + ''; +} diff --git a/pkgs/applications/version-management/gitlab-workhorse/remove-hardcoded-paths.patch b/pkgs/applications/version-management/gitlab-workhorse/remove-hardcoded-paths.patch new file mode 100644 index 000000000000..37f3d2deef54 --- /dev/null +++ b/pkgs/applications/version-management/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 +@@ -16,6 +16,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_ID=%s", gl_id), + } |