e0/flake.nix

31 lines
931 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 ];
};
# https://github.com/NixOS/nixpkgs/issues/148117
llvmPkgs = pkgs.pkgsStatic.llvmPackages_12;
2022-06-17 14:50:06 +00:00
myPkgs = rec { e0 = pkgs.callPackage ./. { inherit llvmPkgs; }; };
2022-04-06 03:07:34 +00:00
in rec {
2022-06-17 14:50:06 +00:00
devShell = pkgs.mkShell {
packages = with pkgs; [ llvmPkgs.clangUseLLVM cargo-watch ];
inputsFrom = with myPkgs; [ e0 ];
CARGO_UNSTABLE_SPARSE_REGISTRY = "true";
LLVM_SYS_120_PREFIX = "${llvmPkgs.llvm.dev}";
2022-06-17 14:50:06 +00:00
};
2022-04-06 03:07:34 +00:00
packages = utils.lib.flattenTree myPkgs;
defaultPackage = packages.e0;
});
}