1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00

gitlab: 11.4.4 -> 11.5.0, add data.json, make default.nix use it

This commit is contained in:
Florian Klink 2018-11-23 15:03:02 +01:00
parent 6d4643243c
commit 625e66d879
2 changed files with 46 additions and 20 deletions

View file

@ -0,0 +1,32 @@
{
"ce": {
"version": "11.5.0",
"repo_hash": "0cjkkap3n9g9zahrxk99a330ahyb6cvx97dsnrxcdsn0cbrsxsrb",
"deb_hash": "0kn7mg1lk4gvc3x76z4rbh0j03b0wk6x1p5938wx8sc50k0bgrcp",
"deb_url": "https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/stretch/gitlab-ce_11.5.0-ce.0_amd64.deb/download.deb",
"owner": "gitlab-org",
"repo": "gitlab-ce",
"rev": "v11.5.0",
"passthru": {
"GITALY_SERVER_VERSION": "0.129.0",
"GITLAB_PAGES_VERSION": "1.3.0",
"GITLAB_SHELL_VERSION": "8.4.1",
"GITLAB_WORKHORSE_VERSION": "7.1.0"
}
},
"ee": {
"version": "11.5.0",
"repo_hash": "1s2jr7vhbpklpcfjxgxnmq0zq14hh2aa6akdsb7ld7fj5lmzp00z",
"deb_hash": "108mgmlf947h200qrwg71ilhq5ihr4awxns6lqs2wa90ph9yq25c",
"deb_url": "https://packages.gitlab.com/gitlab/gitlab-ee/packages/debian/stretch/gitlab-ee_11.5.0-ee.0_amd64.deb/download.deb",
"owner": "gitlab-org",
"repo": "gitlab-ee",
"rev": "v11.5.0-ee",
"passthru": {
"GITALY_SERVER_VERSION": "0.129.0",
"GITLAB_PAGES_VERSION": "1.3.0",
"GITLAB_SHELL_VERSION": "8.4.1",
"GITLAB_WORKHORSE_VERSION": "7.1.0"
}
}
}

View file

@ -11,32 +11,22 @@ let
groups = [ "default" "unicorn" "ed25519" "metrics" ];
};
version = "11.4.4";
flavour = if gitlabEnterprise then "ee" else "ce";
data = (builtins.fromJSON (builtins.readFile ./data.json)).${flavour};
sources = if gitlabEnterprise then {
gitlabDeb = fetchurl {
url = "https://packages.gitlab.com/gitlab/gitlab-ee/packages/debian/stretch/gitlab-ee_${version}-ee.0_amd64.deb/download.deb";
sha256 = "15lpcdjcw6lpmzlhqnpd6pgaxh7wvx2mldjd1vqr414r4bcnhgy4";
};
version = data.version;
sources = {
gitlab = fetchFromGitLab {
owner = "gitlab-org";
repo = "gitlab-ee";
rev = "v${version}-ee";
sha256 = "046hchr7q4jnx3j4yxg3rdixfzlva35al3ci26pf9vxrbbl5y8cg";
owner = data.owner;
repo = data.repo;
rev = data.rev;
sha256 = data.repo_hash;
};
} else {
gitlabDeb = fetchurl {
url = "https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/stretch/gitlab-ce_${version}-ce.0_amd64.deb/download.deb";
sha256 = "02p7azyjgb984bk491q6f4zk1mikbcd38rif08kl07bjjzzkir81";
};
gitlab = fetchFromGitLab {
owner = "gitlab-org";
repo = "gitlab-ce";
rev = "v${version}";
sha256 = "1hq9iyp0xrxwmncn61ja3pdj9h2hmdy1l63d1ic3r1dyacybaf2g";
url = data.deb_url;
sha256 = data.deb_hash;
};
};
in
stdenv.mkDerivation rec {
@ -101,6 +91,10 @@ stdenv.mkDerivation rec {
passthru = {
inherit rubyEnv;
ruby = rubyEnv.wrappedRuby;
GITALY_SERVER_VERSION = data.passthru.GITALY_SERVER_VERSION;
GITLAB_PAGES_VERSION = data.passthru.GITLAB_PAGES_VERSION;
GITLAB_SHELL_VERSION = data.passthru.GITLAB_SHELL_VERSION;
GITLAB_WORKHORSE_VERSION = data.passthru.GITLAB_WORKHORSE_VERSION;
};
meta = with lib; {