Skip to content

Instantly share code, notes, and snippets.

@onsails
Last active January 2, 2023 15:56
Show Gist options
  • Save onsails/d2d33a63d88a5e7d656048bd5fa5a6b9 to your computer and use it in GitHub Desktop.
Save onsails/d2d33a63d88a5e7d656048bd5fa5a6b9 to your computer and use it in GitHub Desktop.
[package]
name = "test"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
ethers = "1.0.2"
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/release-22.11";
devenv.url = "github:cachix/devenv";
flake-utils.url = "github:numtide/flake-utils";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, fenix, devenv }@inputs:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; overlays = [ fenix.overlays.default ]; };
in {
devShell = devenv.lib.mkShell {
inherit inputs pkgs;
modules = with pkgs; [
{
packages = [
pkg-config
openssl
darwin.apple_sdk.frameworks.Security
];
# attempted to fix with this, doesn't work
# env.LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath ([pkg-config openssl darwin.apple_sdk.frameworks.Security])}";
languages.rust = {
enable = true;
version = "stable";
};
}
];
};
}
);
}
// should be put to src/main.rs
fn main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment