about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/version-management/gitlab/update.py
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/version-management/gitlab/update.py')
-rwxr-xr-xnixpkgs/pkgs/applications/version-management/gitlab/update.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/applications/version-management/gitlab/update.py b/nixpkgs/pkgs/applications/version-management/gitlab/update.py
index 3df024b2c043..195fce350c28 100755
--- a/nixpkgs/pkgs/applications/version-management/gitlab/update.py
+++ b/nixpkgs/pkgs/applications/version-management/gitlab/update.py
@@ -187,7 +187,7 @@ def update_rubyenv():
     )
 
     # Fetch vendored dependencies temporarily in order to build the gemset.nix
-    subprocess.check_output(["mkdir", "-p", "vendor/gems"], cwd=rubyenv_dir)
+    subprocess.check_output(["mkdir", "-p", "vendor/gems", "gems"], cwd=rubyenv_dir)
     subprocess.check_output(
         [
             "sh",
@@ -196,6 +196,14 @@ def update_rubyenv():
         ],
         cwd=f"{rubyenv_dir}/vendor/gems",
     )
+    subprocess.check_output(
+        [
+            "sh",
+            "-c",
+            f"curl -L https://gitlab.com/gitlab-org/gitlab/-/archive/v{version}-ee/gitlab-v{version}-ee.tar.bz2?path=gems | tar -xj --strip-components=3",
+        ],
+        cwd=f"{rubyenv_dir}/gems",
+    )
 
     # Undo our gemset.nix patches so that bundix runs through
     subprocess.check_output(
@@ -213,11 +221,13 @@ def update_rubyenv():
             "1i\\src:",
             "-e",
             's:path = \\(vendor/[^;]*\\);:path = "${src}/\\1";:g',
+            "-e",
+            's:path = \\(gems/[^;]*\\);:path = "${src}/\\1";:g',
             "gemset.nix",
         ],
         cwd=rubyenv_dir,
     )
-    subprocess.check_output(["rm", "-rf", "vendor"], cwd=rubyenv_dir)
+    subprocess.check_output(["rm", "-rf", "vendor", "gems"], cwd=rubyenv_dir)
 
 
 @cli.command("update-gitaly")