e0/flake.nix

35 lines
976 B
Nix
Raw 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;
myPkgs = rec { e0 = pkgs.callPackage ./. { inherit toolchain; }; };
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
2022-07-18 08:21:39 +00:00
(toolchain.withComponents [ "clippy" "rustc" "rust-src" ])
2022-07-18 02:00:19 +00:00
];
inputsFrom = with myPkgs; [ e0 ];
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;
});
}