chore: Nix: make the default flake.nix a bit easier to customize

This commit is contained in:
Sebastian Ullrich 2021-01-05 16:31:50 +01:00
parent b00f8ebeb7
commit d454d4d20c

View file

@ -5,14 +5,17 @@
inputs.flake-utils.url = github:numtide/flake-utils;
outputs = { self, lean, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
let leanPkgs = lean.packages.${system}; in rec {
packages = {
inherit (leanPkgs) lean;
} // leanPkgs.buildLeanPackage {
let
leanPkgs = lean.packages.${system};
pkg = leanPkgs.buildLeanPackage {
name = "MyPackage"; # must match the name of the top-level .lean file
src = ./.;
};
in {
packages = pkg // {
inherit (leanPkgs) lean;
};
defaultPackage = packages.modRoot;
defaultPackage = pkg.modRoot;
});
}