Skip to content

Commit

Permalink
gitlab: replace universal-prefetch-url with nix-prefetch-url
Browse files Browse the repository at this point in the history
It's even less code...

Co-Authored-By: Yaya <[email protected]>
  • Loading branch information
Mic92 and yayayayaka committed Jun 26, 2024
1 parent 1ecc3cd commit 4b72e3c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions pkgs/applications/version-management/gitlab/update.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 4b72e3c

Please sign in to comment.