Created
July 27, 2023 00:01
-
-
Save insipx/9e898b4587f9df3d37d142927fe081a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Dev Env"; | |
inputs = { | |
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | |
utils.url = "github:numtide/flake-utils"; | |
fenix = { | |
url = "github:nix-community/fenix"; | |
# The `follows` keyword in inputs is used for inheritance. | |
# Here, `inputs.nixpkgs` of sops-nix is kept consistent with the `inputs.nixpkgs` of | |
# the current flake, to avoid problems caused by different versions of nixpkgs. | |
inputs = { nixpkgs.follows = "nixpkgs"; }; | |
}; | |
}; | |
outputs = { self, nixpkgs, fenix, utils }: | |
utils.lib.eachDefaultSystem (system: | |
let | |
overlays = [ (fenix.overlays.default) ]; | |
pkgs = import nixpkgs { inherit system overlays; }; | |
default = fenix.packages.${system}.default; | |
complete = fenix.packages.${system}.complete; | |
in with pkgs; { | |
devShells.default = mkShell { | |
buildInputs = [ | |
(fenix.packages.${system}.fromToolchainFile { | |
dir = ./relaychain; | |
sha256 = "sha256-2eFldKtzWbd8S3AU9pgqR/6wRQS4OHPW2bqtznu/X/Q="; | |
}) | |
# (with fenix.packages.${system}; combine [ complete.rust-src ]) | |
rust-analyzer-nightly | |
gcc | |
zlib | |
libgit2 | |
protobuf | |
# rust-wasm | |
pkg-config | |
llvmPackages_15.libcxxClang | |
zstd | |
]; | |
shellHook = " echo \"hello\"\n"; | |
LIBCLANG_PATH = "${llvmPackages_15.clang-unwrapped.lib}/lib"; | |
}; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment