Skip to content

Commit

Permalink
Merge pull request #64 from CosmWasm/aw/nix-flake
Browse files Browse the repository at this point in the history
Add Nix flake
aumetra authored Jun 21, 2024
2 parents e6e9e44 + 98d4ed0 commit fb035bf
Showing 2 changed files with 105 additions and 0 deletions.
61 changes: 61 additions & 0 deletions flake.lock

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

44 changes: 44 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
description = "Dependencies for development";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};

outputs = { self, nixpkgs, flake-utils } @ imports: (
flake-utils.lib.eachDefaultSystem (
system: (
let
overlays = [
];
pkgs = import nixpkgs { inherit overlays system; };
baseDependencies = with pkgs; [
python3
];
in
{
formatter = pkgs.nixpkgs-fmt;
devShells = rec {
default = docs;
docs = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
]
++ baseDependencies;
};
doc-tests = pkgs.mkShell {
buildInputs = with pkgs; [
cargo
rustc
rustfmt
]
++ lib.optionals stdenv.isDarwin [libiconv]
++ baseDependencies;
};
};
}
)
)
);
}

0 comments on commit fb035bf

Please sign in to comment.