42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
{
|
|
inputs = {
|
|
utils.url = "github:numtide/flake-utils";
|
|
fenix.url = "github:nix-community/fenix";
|
|
fenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, utils, fenix }:
|
|
utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ fenix.overlay ];
|
|
};
|
|
toolchain = pkgs.fenix.complete;
|
|
myPkgs = rec { e0 = pkgs.callPackage ./. { inherit toolchain; }; };
|
|
|
|
in rec {
|
|
devShell = pkgs.mkShell {
|
|
packages = with pkgs;
|
|
with pkgs.llvmPackages_12; [
|
|
cargo-edit
|
|
cargo-watch
|
|
clangUseLLVM
|
|
mdbook
|
|
(toolchain.withComponents [
|
|
"cargo"
|
|
"clippy"
|
|
"rustc"
|
|
"rust-src"
|
|
"rustfmt"
|
|
])
|
|
];
|
|
inputsFrom = with myPkgs; [ e0 ];
|
|
|
|
CARGO_UNSTABLE_SPARSE_REGISTRY = "true";
|
|
};
|
|
|
|
packages = utils.lib.flattenTree myPkgs;
|
|
defaultPackage = packages.e0;
|
|
});
|
|
}
|