diff --git a/nix/bootstrap.nix b/nix/bootstrap.nix index c714e9c43d..e49e98a149 100644 --- a/nix/bootstrap.nix +++ b/nix/bootstrap.nix @@ -88,6 +88,7 @@ rec { leanFlags = [ "-DwarningAsError=true" ]; } ({ src = ../src; + roots = [ { mod = args.name; glob = "andSubmodules"; } ]; fullSrc = ../.; srcPrefix = "src"; inherit debug; @@ -108,7 +109,7 @@ rec { modDepsFiles = symlinkJoin { name = "modDepsFiles"; paths = map (l: l.modDepsFile) (stdlib ++ [ Leanc ]); }; iTree = symlinkJoin { name = "ileans"; paths = map (l: l.iTree) stdlib; }; extlib = stdlib; # TODO: add Lake - Leanc = build { name = "Leanc"; src = lean-bin-tools-unwrapped.leanc_src; deps = stdlib; }; + Leanc = build { name = "Leanc"; src = lean-bin-tools-unwrapped.leanc_src; deps = stdlib; roots = [ "Leanc" ]; }; stdlibLinkFlags = "-L${Init.staticLib} -L${Std.staticLib} -L${Lean.staticLib} -L${leancpp}/lib/lean"; leanshared = runCommand "leanshared" { buildInputs = [ stdenv.cc ]; libName = "libleanshared${stdenv.hostPlatform.extensions.sharedLibrary}"; } '' mkdir $out diff --git a/nix/buildLeanPackage.nix b/nix/buildLeanPackage.nix index fd0494d645..e6090b41bd 100644 --- a/nix/buildLeanPackage.nix +++ b/nix/buildLeanPackage.nix @@ -208,7 +208,7 @@ with builtins; let if typeOf g == "string" then [g] else if g.glob == "one" then [g.mod] else if g.glob == "submodules" then submodules g.mod - else if g.glob == "andSubmodules" then [g] ++ submodules g.mod + else if g.glob == "andSubmodules" then [g.mod] ++ submodules g.mod else throw "unknown glob kind '${g}'"; mods' = lib.foldr buildModAndDeps {} (concatMap expandGlob roots); allLinkFlags = lib.foldr (shared: acc: acc ++ [ "-L${shared}" "-l${shared.linkName or shared.name}" ]) linkFlags allNativeSharedLibs;