Skip to content

Commit

Permalink
fixed packages ref
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda committed Dec 19, 2023
1 parent 049ade5 commit 8f8e9cb
Show file tree
Hide file tree
Showing 5 changed files with 213 additions and 10 deletions.
174 changes: 168 additions & 6 deletions flake.lock

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

20 changes: 17 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
nix-std.url = "github:chessai/nix-std";
flake-parts.url = "github:hercules-ci/flake-parts";
gomod2nix.url = "github:JonathanLorimer/gomod2nix/jonathan/update-go";
poetry2nix.url = "github:nix-community/poetry2nix";

# Freshautomations inputs
stoml-src.url = "github:freshautomations/stoml";
Expand Down Expand Up @@ -227,16 +228,29 @@
neutron-src.url = "github:neutron-org/neutron/v2.0.0";
neutron-src.flake = false;

gex-src.url = "github:cosmos/gex/233d335dc9e8c89fb318d1081fae74435f6cac11";
gex-src.flake = false;

beaker-src.url = "github:osmosis-labs/beaker/v0.1.6";
beaker-src.flake = false;

provenance-src.url = "github:/provenance-io/provenance/v1.17.0";
provenance-src.flake = false;

# Contracts
cw-plus-src.url = "github:CosmWasm/cw-plus/v1.1.2";
cw-plus-src.flake = false;

# Tools
gex-src.url = "github:cosmos/gex/233d335dc9e8c89fb318d1081fae74435f6cac11";
gex-src.flake = false;

# Python supports (usually for MEV/Trading/AI/Indexing)
datamodel-code-generator-src = {
url = "github:koxudaxi/datamodel-code-generator";
flake = false;
};

cosmpy-src = {
url = "github:fetchai/cosmpy";
flake = false;
};
};
}
10 changes: 9 additions & 1 deletion lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ nix-std: {
buildCosmwasmContract = let
target = "wasm32-unknown-unknown";
# from https://github.com/CosmWasm/rust-optimizer/blob/main/Dockerfile
rust = pkgs.rust-bin.stable."1.70.0".default.override {
rust = pkgs.rust-bin.stable."1.73.0".default.override {
extensions = [];
targets = [
target
Expand Down Expand Up @@ -131,6 +131,14 @@ nix-std: {
in {
inherit buildCosmwasmContract;
mkCosmosGoApp = buildApp;
cosmpy-package = let
inherit (inputs.poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryPackages;
in
(mkPoetryPackages {
projectDir = inputs.cosmpy-src;
checkGroups = [];
})
.poetryPackages;

wasmdPreFixupPhase = libwasmvm: binName:
if pkgs.stdenv.hostPlatform.isLinux
Expand Down
7 changes: 7 additions & 0 deletions modules/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@
inherit pkgs;
inherit (inputs) cosmwasm-src;
};
datamodel-code-generator = let
inherit (inputs.poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryApplication;
in
import ../packages/datamodel-code-generator.nix {
inherit mkPoetryApplication;
inherit (inputs) datamodel-code-generator-src;
};
cosmovisor = import ../packages/cosmovisor.nix {
inherit (pkgs) buildGoModule;
inherit (inputs) cosmos-sdk-src;
Expand Down
12 changes: 12 additions & 0 deletions packages/datamodel-code-generator.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# must use for generating python model from CosmWasm JSONShemas, lacks nix support (I guess to be moved to nixpkgs)
{
mkPoetryApplication,
datamodel-code-generator-src,
}: {
mkPoetryApplication,
datamodel-code-generator-src,
}:
mkPoetryApplication {
projectDir = datamodel-code-generator-src;
checkGroups = [];
}

0 comments on commit 8f8e9cb

Please sign in to comment.