Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sub seconds oci image builds #231

Merged
merged 1 commit into from
Mar 18, 2024
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
61 changes: 58 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
nix-std.url = "github:chessai/nix-std";
flake-parts.url = "github:hercules-ci/flake-parts";
gomod2nix.url = "github:JonathanLorimer/gomod2nix/jonathan/update-go";

nix2container = {
url = "github:nlewo/nix2container";
# just to save size of this flake (assuming that currently containers are optional features)
inputs.nixpkgs.follows = "nixpkgs";
};
# Freshautomations inputs
stoml-src.url = "github:freshautomations/stoml";
stoml-src.flake = false;
Expand Down
1 change: 1 addition & 0 deletions modules/args.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
inputs.sbt-derivation.overlays.default
(prev: final: {
inherit (inputs.gomod2nix.legacyPackages.${system}) buildGoApplication gomod2nix;
inherit (inputs.nix2container.packages.${system}) nix2container;
})
];
config = {};
Expand Down
12 changes: 12 additions & 0 deletions modules/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
inherit (self'.packages) libwasmvm_1_2_6;
inherit cosmosLib;
};
centauri-oci = import ../packages/centauri-oci.nix {
inherit (pkgs) nix2container;
inherit (self'.packages) centauri;
};
cometbft = import ../packages/cometbft.nix {
inherit (pkgs) buildGoModule;
inherit (inputs) cometbft-src;
Expand Down Expand Up @@ -67,6 +71,10 @@
inherit (cosmosLib) mkCosmosGoApp;
inherit (inputs) dymension-src;
};
gaia-oci = import ../packages/gaia-oci.nix {
inherit (pkgs) nix2container;
gaia = self'.packages.gaia14;
};
gex = import ../packages/gex.nix {
inherit (pkgs) buildGoModule;
inherit (inputs) gex-src;
Expand Down Expand Up @@ -123,6 +131,10 @@
inherit (self'.packages) libwasmvm_1_5_0;
inherit cosmosLib;
};
osmosis-oci = import ../packages/osmosis-oci.nix {
inherit (pkgs) nix2container;
inherit (self'.packages) osmosis;
};
provenance = import ../packages/provenance.nix {
inherit (inputs) provenance-src;
inherit (self'.packages) libwasmvm_1_2_4;
Expand Down
10 changes: 10 additions & 0 deletions packages/centauri-oci.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
centauri,
nix2container,
}:
nix2container.buildImage {
name = "centauri";
config = {
entrypoint = ["${centauri}/bin/centaurid"];
};
}
10 changes: 10 additions & 0 deletions packages/gaia-oci.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
gaia,
nix2container,
}:
nix2container.buildImage {
name = "gaia";
config = {
entrypoint = ["${gaia}/bin/gaiad"];
};
}
10 changes: 10 additions & 0 deletions packages/osmosis-oci.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
osmosis,
nix2container,
}:
nix2container.buildImage {
name = "osmosis";
config = {
entrypoint = ["${osmosis}/bin/osmosisd"];
};
}