Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/generic/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ let
, copyToRoot ? null
, maxLayers ? 100
, config ? { }
, arch ? pkgs.go.GOARCH
}:
nix2containerPkgs.nix2container.buildImage {
inherit name tag created copyToRoot fromImage maxLayers config;
inherit name tag created copyToRoot fromImage maxLayers config arch;
};
in
{
Expand All @@ -22,10 +23,11 @@ in
, copyToRoot ? null
, maxLayers ? 100
, config ? { }
, arch ? pkgs.go.GOARCH
}:
pkgs.runCommand "image-as-dir" { } ''
${(dockerImageFn {
inherit name tag created fromImage copyToRoot maxLayers config;
inherit name tag created fromImage copyToRoot maxLayers config arch;
}).copyTo}/bin/copy-to dir:$out
'';
}
6 changes: 4 additions & 2 deletions lib/go/go.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ let
, package
, buildInputs
, maxLayers
, arch ? pkgs.go.GOARCH
, contents ? [ ]
, config ? { }
}:
nix2containerPkgs.nix2container.buildImage {
inherit name created maxLayers;
inherit name created maxLayers arch;
tag = version;

copyToRoot = pkgs.buildEnv {
Expand Down Expand Up @@ -168,12 +169,13 @@ in
, package
, buildInputs
, maxLayers ? 100
, arch ? pkgs.go.GOARCH
, contents ? [ ]
, config ? { }
}:
pkgs.runCommand "image-as-dir" { } ''
${(dockerImageFn {
inherit name version created package buildInputs maxLayers contents config;
inherit name version created package buildInputs maxLayers arch contents config;
}).copyTo}/bin/copy-to dir:$out
'';
}
Expand Down