Skip to content
Closed
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
38 changes: 38 additions & 0 deletions .github/workflows/nix-dev-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Nix developer enviroment
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Opens a PR with an updated flake.lock file
update_flake_lock:
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v30
- uses: actions/checkout@v4
- uses: DeterminateSystems/update-flake-lock@main
with:
pr-title: "Update flake.lock"
pr-labels: |
L-ignore
A-dependencies

nix-dev-env:
strategy:
matrix:
runs-on: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.runs-on }}
steps:
- uses: cachix/install-nix-action@v30
- uses: actions/checkout@v4

- name: Activate nix env
run: nix develop -c echo Ok

- name: Check that we can compile all crates
run: nix develop -c cargo check --all-targets
57 changes: 10 additions & 47 deletions flake.lock

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

20 changes: 9 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,14 @@
nixpkgs.follows = "nixpkgs";
};
};
solc = {
url = "github:hellwolf/solc.nix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};

outputs = { self, nixpkgs, rust-overlay, flake-utils, solc }:
outputs = { self, nixpkgs, rust-overlay, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default solc.overlay ];
overlays = [ rust-overlay.overlays.default ];
};
lib = pkgs.lib;
toolchain = pkgs.rust-bin.stable.latest.default.override {
Expand All @@ -33,9 +26,14 @@
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
pkg-config
solc_0_8_23
(solc.mkDefault pkgs solc_0_8_23)
toolchain
rust-jemalloc-sys
cargo-nextest

# test dependencies
solc
vyper
nodejs
];
buildInputs = lib.optionals pkgs.stdenv.isDarwin [
pkgs.darwin.apple_sdk.frameworks.AppKit
Expand Down