From 4226cbd8020253b010fb44d395db12efe68e1272 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 21 Sep 2023 22:30:17 -0400 Subject: Rename BIZ_ROOT to CODEROOT BIZ_ROOT was too specific. CODEROOT allows for other (non-biz) projects to live in the root of the repo. I didn't want to call it GIT_ROOT because maybe someday I won't want to use git. But I'll never not use code. --- Biz/Bild/Builder.nix | 12 ++++++------ Biz/Bild/Deps.hs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Biz/Bild') diff --git a/Biz/Bild/Builder.nix b/Biz/Bild/Builder.nix index f9eb31d..2ed3dd1 100644 --- a/Biz/Bild/Builder.nix +++ b/Biz/Bild/Builder.nix @@ -10,7 +10,7 @@ let analysis = builtins.fromJSON analysisJSON; build = _: target: let name = target.out; - root = builtins.getEnv "BIZ_ROOT"; + root = builtins.getEnv "CODEROOT"; mainModule = target.mainModule; compileLine = lib.strings.concatStringsSep " " ([target.compiler] ++ target.compilerFlags); @@ -51,18 +51,18 @@ let else lib.attrsets.attrVals target.sysdeps pkgs; - BIZ_ROOT = "."; + CODEROOT = "."; builders = { base = stdenv.mkDerivation rec { - inherit name src BIZ_ROOT preBuild; + inherit name src CODEROOT preBuild; buildInputs = langdeps_ ++ sysdeps_; installPhase = "install -D ${name} $out/bin/${name}"; buildPhase = compileLine; }; haskell = stdenv.mkDerivation rec { - inherit name src BIZ_ROOT preBuild; + inherit name src CODEROOT preBuild; nativeBuildInputs = [ makeWrapper ]; buildInputs = sysdeps_ ++ [ (bild.haskell.ghcWith (p: @@ -78,7 +78,7 @@ let }; c = stdenv.mkDerivation rec { - inherit name src BIZ_ROOT preBuild; + inherit name src CODEROOT preBuild; buildInputs = langdeps_ ++ sysdeps_; installPhase = "install -D ${name} $out/bin/${name}"; buildPhase = lib.strings.concatStringsSep " " [ @@ -91,7 +91,7 @@ let }; python = bild.python.buildPythonApplication rec { - inherit name src BIZ_ROOT; + inherit name src CODEROOT; propagatedBuildInputs = langdeps_ ++ sysdeps_; buildInputs = sysdeps_; nativeCheckInputs = [ black mypy ruff ]; diff --git a/Biz/Bild/Deps.hs b/Biz/Bild/Deps.hs index 17aae0d..08e3ee6 100644 --- a/Biz/Bild/Deps.hs +++ b/Biz/Bild/Deps.hs @@ -47,7 +47,7 @@ instance MonadUnliftIO NIO where getFindSourcesJson :: NIO FindSourcesJson -- getFindSourcesJson = ask getFindSourcesJson = do - root <- li <| getEnv "BIZ_ROOT" + root <- li <| getEnv "CODEROOT" pure <| AtPath <| root "Biz/Bild/Sources.json" li :: MonadIO io => IO a -> io a -- cgit v1.2.3