use git version of regclient for compressed tar support
This commit is contained in:
parent
c5402555a4
commit
d944f3e18e
2 changed files with 36 additions and 4 deletions
32
flake.nix
32
flake.nix
|
@ -19,6 +19,38 @@
|
||||||
config.permittedInsecurePackages = [
|
config.permittedInsecurePackages = [
|
||||||
"nodejs-16.20.2"
|
"nodejs-16.20.2"
|
||||||
];
|
];
|
||||||
|
overlays = [
|
||||||
|
(
|
||||||
|
self: super: {
|
||||||
|
regclient =
|
||||||
|
let
|
||||||
|
pname = "regclient";
|
||||||
|
version = "0.5.1+";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "regclient";
|
||||||
|
repo = "regclient";
|
||||||
|
rev = "72df49963a17092138854c5d9d7943deac1dde6b";
|
||||||
|
hash = "sha256-9k1VXtaHTF1GMIDs5qGzJkqPZa+ZKrWes+LakVKaQ38=";
|
||||||
|
};
|
||||||
|
vendorHash = "sha256-j+XidIgjJ5uw1d4OXRl3pjiW5Hvy7WqNM0KdVWMvWls=";
|
||||||
|
in
|
||||||
|
super.buildGoModule {
|
||||||
|
inherit pname version src vendorHash;
|
||||||
|
inherit (super.regclient) meta outputs postInstall;
|
||||||
|
ldflags = [
|
||||||
|
"-s"
|
||||||
|
"-w"
|
||||||
|
"-X main.VCSTag=v${version}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# super.regclient.overrideAttrs (
|
||||||
|
# old: {
|
||||||
|
# inherit pname version src vendorHash;
|
||||||
|
# }
|
||||||
|
# );
|
||||||
|
}
|
||||||
|
)
|
||||||
|
];
|
||||||
};
|
};
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
docker-client = pkgs.docker_24.override {
|
docker-client = pkgs.docker_24.override {
|
||||||
|
|
|
@ -125,11 +125,11 @@ def main [
|
||||||
|
|
||||||
regctl registry login $registry --user $auth.username --pass $auth.password
|
regctl registry login $registry --user $auth.username --pass $auth.password
|
||||||
|
|
||||||
print "decompressing image: start"
|
# print "decompressing image: start"
|
||||||
|
|
||||||
open $input | gzip --decompress | save --force --progress $"($input).tar"
|
# open $input | gzip --decompress | save --force --progress $"($input).tar"
|
||||||
|
|
||||||
print "decompressing image: stop"
|
# print "decompressing image: stop"
|
||||||
|
|
||||||
# let load_result = (do { regctl load --input $input } | complete)
|
# let load_result = (do { regctl load --input $input } | complete)
|
||||||
# if $load_result.exit_code != 0 {
|
# if $load_result.exit_code != 0 {
|
||||||
|
@ -144,7 +144,7 @@ def main [
|
||||||
if $item.index == 0 {
|
if $item.index == 0 {
|
||||||
let new_image = $"($registry)/($repository):($item.item)"
|
let new_image = $"($registry)/($repository):($item.item)"
|
||||||
print $"Pushing ($new_image)"
|
print $"Pushing ($new_image)"
|
||||||
regctl image import $new_image $"($input).tar"
|
regctl image import $new_image $input
|
||||||
# let tag_result = (do { regctl image import $new_image $"($input).tar" } | complete)
|
# let tag_result = (do { regctl image import $new_image $"($input).tar" } | complete)
|
||||||
# if $tag_result.exit_code != 0 {
|
# if $tag_result.exit_code != 0 {
|
||||||
# print $tag_result.stderr
|
# print $tag_result.stderr
|
||||||
|
|
Loading…
Reference in a new issue