e0/flake.nix

30 lines
931 B
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 ];
};
# https://github.com/NixOS/nixpkgs/issues/148117
llvmPkgs = pkgs.pkgsStatic.llvmPackages_12;
myPkgs = rec { e0 = pkgs.callPackage ./. { inherit llvmPkgs; }; };
in rec {
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}";
};
packages = utils.lib.flattenTree myPkgs;
defaultPackage = packages.e0;
});
}