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

Update Injective to v1.13.1 #263

Merged
merged 7 commits into from
Aug 14, 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
112 changes: 36 additions & 76 deletions flake.lock

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

8 changes: 6 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@
sbt-derivation.url = "github:zaninime/sbt-derivation";
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";
};
gomod2nix = {
url = "github:nix-community/gomod2nix";
# 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 Expand Up @@ -149,7 +153,7 @@
andromeda-src.url = "github:andromedaprotocol/andromedad/andromeda-1";
andromeda-src.flake = false;

injective-src.url = "github:OpenDeFiFoundation/injective-core/v1.12.1";
injective-src.url = "github:OpenDeFiFoundation/injective-core/v1.13.1";
injective-src.flake = false;

iris-src.url = "github:irisnet/irishub/v1.1.1";
Expand Down
14 changes: 9 additions & 5 deletions modules/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@
inherit (self'.packages) libwasmvm_1_3_0;
inherit cosmosLib;
};
injective = import ../packages/injective.nix {
inherit (inputs) injective-src;
inherit (self'.packages) libwasmvm_1_5_0;
inherit cosmosLib;
};
osmosis = import ../packages/osmosis.nix {
inherit (inputs) osmosis-src;
inherit (self'.packages) libwasmvm_1_5_2;
Expand Down Expand Up @@ -204,6 +199,15 @@
inherit (inputs) evmos-src;
inherit (cosmosLib) mkGenerator;
})
# Injective
(import ../packages/injective {
inherit pkgs;
inherit system;
inherit (inputs) injective-src;
inherit (cosmosLib) mkGenerator;
inherit cosmosLib;
inherit (self'.packages) libwasmvm_2_0_0;
})
]
## Linux only packages
++ (lists.optionals pkgs.stdenv.isLinux
Expand Down
3 changes: 2 additions & 1 deletion packages/evmos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
pname = "evmos";
version = "v16.0.0-rc4";
src = evmos-src;
goVersion = "1.21";
go = pkgs.go_1_21;
pwd = ./.;
modules = ./gomod2nix.toml;
doCheck = false;
};
Expand Down
18 changes: 0 additions & 18 deletions packages/injective.nix

This file was deleted.

28 changes: 28 additions & 0 deletions packages/injective/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
pkgs,
injective-src,
system,
cosmosLib,
libwasmvm_2_0_0,
mkGenerator,
}: {
injective = pkgs.gomod2nix.buildGoApplication {
# NOTE: this uses `buildGoApplication` from `gomod2nix`. Which requires that you pre-generate
# the go.mod dependency hashes. Therefore you need to run `nix run .#gen-injective` which is below
pname = "injective";
version = "v1.13.1";
src = injective-src;
go = pkgs.go_1_22;
modules = ./gomod2nix.toml;
doCheck = false;
pwd = ./.;

engine = "cometbft/cometbft";
preFixup = ''
${cosmosLib.wasmdPreFixupPhase libwasmvm_2_0_0 "injectived"}
${cosmosLib.wasmdPreFixupPhase libwasmvm_2_0_0 "client"}
'';
buildInputs = with pkgs; [libwasmvm_2_0_0 libiconv];
};
gen-injective = mkGenerator "gen-injective" injective-src;
}
Loading