From 4b72e3cf0c6b6561f6b3c600c2d6c46370cceb8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 24 Jun 2024 15:54:36 +0200 Subject: [PATCH] gitlab: replace universal-prefetch-url with nix-prefetch-url It's even less code... Co-Authored-By: Yaya --- .../version-management/gitlab/update.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/version-management/gitlab/update.py b/pkgs/applications/version-management/gitlab/update.py index 195fce350c28a..bb46af27c690c 100755 --- a/pkgs/applications/version-management/gitlab/update.py +++ b/pkgs/applications/version-management/gitlab/update.py @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#! nix-shell -I nixpkgs=../../../.. -i python3 -p bundix bundler nix-update nix nix-universal-prefetch python3 python3Packages.requests python3Packages.click python3Packages.click-log python3Packages.packaging prefetch-yarn-deps git +#! nix-shell -I nixpkgs=../../../.. -i python3 -p bundix bundler nix-update nix python3 python3Packages.requests python3Packages.click python3Packages.click-log python3Packages.packaging prefetch-yarn-deps git import click import click_log @@ -49,19 +49,13 @@ def tags(self) -> Iterable[str]: reverse=True, ) return versions - def get_git_hash(self, rev: str): return ( subprocess.check_output( [ - "nix-universal-prefetch", - "fetchFromGitLab", - "--owner", - self.owner, - "--repo", - self.repo, - "--rev", - rev, + "nix-prefetch-url", + "--unpack", + f"https://gitlab.com/{self.owner}/{self.repo}/-/archive/{rev}/{self.repo}-{rev}.tar.gz", ] ) .decode("utf-8")