e0/flake.nix

46 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2022-04-06 03:07:34 +00:00
{
inputs = {
utils.url = "github:numtide/flake-utils";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
};
2022-04-06 03:07:34 +00:00
outputs = { self, nixpkgs, utils, fenix }:
2022-04-06 03:07:34 +00:00
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ fenix.overlay ];
};
2022-07-18 08:21:39 +00:00
toolchain = pkgs.fenix.complete;
2022-07-19 06:41:30 +00:00
myPkgs = rec {
e0 = pkgs.callPackage ./. { inherit toolchain; };
e0-vim = pkgs.callPackage ./ext/e0-vim { };
};
2022-04-06 03:07:34 +00:00
in rec {
2022-06-17 14:50:06 +00:00
devShell = pkgs.mkShell {
2022-07-18 02:00:19 +00:00
packages = with pkgs;
with pkgs.llvmPackages_12; [
2022-07-18 08:21:39 +00:00
cargo-edit
2022-07-18 02:00:19 +00:00
cargo-watch
clangUseLLVM
mdbook
(toolchain.withComponents [
"cargo"
"clippy"
"rustc"
"rust-src"
"rustfmt"
])
2022-07-18 02:00:19 +00:00
];
2022-07-19 06:41:30 +00:00
inputsFrom = with myPkgs; [ e0 e0-vim ];
CARGO_UNSTABLE_SPARSE_REGISTRY = "true";
2022-06-17 14:50:06 +00:00
};
2022-04-06 03:07:34 +00:00
packages = utils.lib.flattenTree myPkgs;
defaultPackage = packages.e0;
});
}