From 724986068f084c9b58f0bb33684e1df78c96c895 Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Mon, 18 Mar 2024 13:23:31 +0000 Subject: [PATCH] fixed builds --- flake.lock | 61 +++++++++++++++++++++++++++++++++++++-- flake.nix | 6 +++- modules/args.nix | 1 + modules/packages.nix | 12 ++++++++ packages/centauri-oci.nix | 10 +++++++ packages/gaia-oci.nix | 10 +++++++ packages/osmosis-oci.nix | 10 +++++++ 7 files changed, 106 insertions(+), 4 deletions(-) create mode 100644 packages/centauri-oci.nix create mode 100644 packages/gaia-oci.nix create mode 100644 packages/osmosis-oci.nix diff --git a/flake.lock b/flake.lock index 7b0517f7..7a34a779 100644 --- a/flake.lock +++ b/flake.lock @@ -351,6 +351,24 @@ "inputs": { "systems": "systems_4" }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "inputs": { + "systems": "systems_5" + }, "locked": { "lastModified": 1705309234, "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", @@ -365,7 +383,7 @@ "type": "github" } }, - "flake-utils_5": { + "flake-utils_6": { "locked": { "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "owner": "numtide", @@ -1031,6 +1049,27 @@ "type": "github" } }, + "nix2container": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1708764364, + "narHash": "sha256-+pOtDvmuVTg0Gi58hKDUyrNla5NbyUvt3Xs3gLR0Fws=", + "owner": "nlewo", + "repo": "nix2container", + "rev": "c891f90d2e3c48a6b33466c96e4851e0fc0cf455", + "type": "github" + }, + "original": { + "owner": "nlewo", + "repo": "nix2container", + "type": "github" + } + }, "nixpkgs": { "locked": { "narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=", @@ -1329,6 +1368,7 @@ "namada-src": "namada-src", "neutron-src": "neutron-src", "nix-std": "nix-std", + "nix2container": "nix2container", "nixpkgs": "nixpkgs_3", "osmosis-src": "osmosis-src", "provenance-src": "provenance-src", @@ -1361,7 +1401,7 @@ }, "rust-overlay": { "inputs": { - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_5", "nixpkgs": "nixpkgs_4" }, "locked": { @@ -1380,7 +1420,7 @@ }, "sbt-derivation": { "inputs": { - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_6", "nixpkgs": "nixpkgs_5" }, "locked": { @@ -1579,6 +1619,21 @@ "type": "github" } }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "umee-src": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index afcce557..3fc52b18 100644 --- a/flake.nix +++ b/flake.nix @@ -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; diff --git a/modules/args.nix b/modules/args.nix index 1f97d1ca..f146ab90 100644 --- a/modules/args.nix +++ b/modules/args.nix @@ -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 = {}; diff --git a/modules/packages.nix b/modules/packages.nix index 6f24c4fd..4080744f 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -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; @@ -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; @@ -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; diff --git a/packages/centauri-oci.nix b/packages/centauri-oci.nix new file mode 100644 index 00000000..40d84092 --- /dev/null +++ b/packages/centauri-oci.nix @@ -0,0 +1,10 @@ +{ + centauri, + nix2container, +}: +nix2container.buildImage { + name = "centauri"; + config = { + entrypoint = ["${centauri}/bin/centaurid"]; + }; +} diff --git a/packages/gaia-oci.nix b/packages/gaia-oci.nix new file mode 100644 index 00000000..ddd960a5 --- /dev/null +++ b/packages/gaia-oci.nix @@ -0,0 +1,10 @@ +{ + gaia, + nix2container, +}: +nix2container.buildImage { + name = "gaia"; + config = { + entrypoint = ["${gaia}/bin/gaiad"]; + }; +} diff --git a/packages/osmosis-oci.nix b/packages/osmosis-oci.nix new file mode 100644 index 00000000..03f94059 --- /dev/null +++ b/packages/osmosis-oci.nix @@ -0,0 +1,10 @@ +{ + osmosis, + nix2container, +}: +nix2container.buildImage { + name = "osmosis"; + config = { + entrypoint = ["${osmosis}/bin/osmosisd"]; + }; +}