45 lines
1.2 KiB
Nix
45 lines
1.2 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; };
|
|
e0-vim = pkgs.callPackage ./ext/e0-vim { };
|
|
};
|
|
|
|
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 e0-vim ];
|
|
|
|
CARGO_UNSTABLE_SPARSE_REGISTRY = "true";
|
|
};
|
|
|
|
packages = utils.lib.flattenTree myPkgs;
|
|
defaultPackage = packages.e0;
|
|
});
|
|
}
|