diff --git a/nt/precursor/bootstrap/default.nix b/nt/precursor/bootstrap/default.nix index c044d28..b6e5900 100644 --- a/nt/precursor/bootstrap/default.nix +++ b/nt/precursor/bootstrap/default.nix @@ -43,6 +43,7 @@ in submods.prim submods.naive ./attrs.nix + ./nix.nix submods ] diff --git a/nt/precursor/bootstrap/nix.nix b/nt/precursor/bootstrap/nix.nix new file mode 100644 index 0000000..e8e9319 --- /dev/null +++ b/nt/precursor/bootstrap/nix.nix @@ -0,0 +1,13 @@ +{...}: let + inherit + (builtins) + pathExists + ; +in { + findImport = path: + if pathExists path + then path + else if pathExists (path + "default.nix") + then path + "/default.nix" + else path + ".nix"; +}