From 2351224340999dc21997a19db094f644c240318b Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sun, 26 Jul 2020 10:19:54 -0700 Subject: dev: move _{bild,keep,skey} to _/{bild,keep,skey} --- .gitignore | 4 +--- Biz/Bild.hs | 18 +++++++++--------- Biz/Bild.scm | 4 ++-- Biz/Ibb/Server.hs | 2 +- Hero/Host.hs | 2 +- nix/shellHook.sh | 10 +++++----- 6 files changed, 19 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 8cf3e44..10194ae 100644 --- a/.gitignore +++ b/.gitignore @@ -6,12 +6,10 @@ *.exe *.hi result* -_bild +_ TAGS tags .tex .pdf -_keep -_skey *~ dist* diff --git a/Biz/Bild.hs b/Biz/Bild.hs index 7e67b8d..983f778 100644 --- a/Biz/Bild.hs +++ b/Biz/Bild.hs @@ -5,8 +5,8 @@ -- | A general purpose build tool. -- --- - with a nix build, results are linked in _bild/nix/ --- - for a dev build, results are stored in _bild/dev/ +-- - with a nix build, results are linked in _/bild/nix/ +-- - for a dev build, results are stored in _/bild/dev/ module Biz.Bild where import Alpha hiding ((<.>), sym) @@ -84,16 +84,16 @@ build Target {..} = do case compiler of Ghc -> do putText <| "bild: ghc: " <> Text.pack namespace - let out = root "_bild/dev/bin" + let out = root "_/bild/dev/bin" Dir.createDirectoryIfMissing True out Process.callProcess "ghc" [ "-Werror", "-i" <> root, "-odir", - root "_bild/int", + root "_/bild/int", "-hidir", - root "_bild/int", + root "_/bild/int", "--make", path, "-main-is", @@ -103,16 +103,16 @@ build Target {..} = do ] Ghcjs -> do putText <| "bild: ghcjs: " <> Text.pack namespace - let out = root "_bild/dev/static" + let out = root "_/bild/dev/static" Dir.createDirectoryIfMissing True out Process.callProcess "ghcjs" [ "-Werror", "-i" <> root, "-odir", - root "_bild/int", + root "_/bild/int", "-hidir", - root "_bild/int", + root "_/bild/int", "--make", path, "-main-is", @@ -127,7 +127,7 @@ build Target {..} = do Process.callProcess "nix-build" [ "-o", - root "_bild/nix" qualifiedTarget, + root "_/bild/nix" qualifiedTarget, root "default.nix", "--attr", qualifiedTarget diff --git a/Biz/Bild.scm b/Biz/Bild.scm index 1fcae96..5a769de 100755 --- a/Biz/Bild.scm +++ b/Biz/Bild.scm @@ -40,7 +40,7 @@ ;; The general scheme is to build the things described by the targets. A target ;; is a namespace. You can list as many as you want, but you must list at least ;; one. It could just be `.` for the current directory. Build outputs will go -;; into the _bild directory in the root of the project. +;; into the _/bild directory in the root of the project. ;; ;; bild biz.web ;; @@ -69,7 +69,7 @@ ;; invocation to compile the namespace 'com.simatime.bild' which depends on ;; 'com.simatime.lib': ;; -;; ghc com/simatime/bild.hs -i com/simatime/lib.hs -o _bild/bild -v \ +;; ghc com/simatime/bild.hs -i com/simatime/lib.hs -o _/bild -v \ ;; -main-is Biz.Bild.main ;; ;; The general template of which is: diff --git a/Biz/Ibb/Server.hs b/Biz/Ibb/Server.hs index e87c55a..d7b4969 100644 --- a/Biz/Ibb/Server.hs +++ b/Biz/Ibb/Server.hs @@ -57,7 +57,7 @@ main = do say "rise: ibb" staticDir <- fromMaybe "static" <$> lookupEnv "STATIC_DIR" :: IO String port <- (read . fromMaybe "3000" <$> lookupEnv "PORT") :: IO Int - keep <- Keep.openLocal "_keep/" + keep <- Keep.openLocal "_/keep/" say "port: 3000" run port $ logStdout $ compress $ app staticDir keep where diff --git a/Hero/Host.hs b/Hero/Host.hs index 7b6911f..5341cc6 100644 --- a/Hero/Host.hs +++ b/Hero/Host.hs @@ -159,7 +159,7 @@ data Config deriving (Generic, Show) instance Envy.DefConfig Config where - defConfig = Config 3000 "_bild/Hero.Node/static" "_keep" "/run/hero/skey" + defConfig = Config 3000 "_/bild/dev/Hero.Node/static" "_/keep" "/run/hero/skey" instance Envy.FromEnv Config diff --git a/nix/shellHook.sh b/nix/shellHook.sh index 981f86e..d1cfaf1 100644 --- a/nix/shellHook.sh +++ b/nix/shellHook.sh @@ -24,18 +24,18 @@ alias ghci="ghci -i$BIZ_ROOT -ghci-script $BIZ_ROOT/.ghci" function hero() { export HERO_PORT=3000 - export HERO_KEEP=$BIZ_ROOT/_keep - export HERO_SKEY=$BIZ_ROOT/_skey + export HERO_KEEP=$BIZ_ROOT/_/keep + export HERO_SKEY=$BIZ_ROOT/_/skey bild="runghc Biz.Bild" if [[ -z "${IN_NIX_SHELL}" ]] then - out="_bild/dev" + out="_/bild/dev" export HERO_NODE=$BIZ_ROOT/$out/static/mmc.js/all.js rg --files \ | entr -rcs \ "$bild Hero.Host && $bild Hero.Node && $out/bin/mmc" else - out="_bild/nix" + out="_/bild/nix" export HERO_NODE=$BIZ_ROOT/$out/Hero.Node/static rg --files \ | entr -rcs \ @@ -56,7 +56,7 @@ function push() { else target="$prefix.$1" fi - what=$(realpath "$BIZ_ROOT/_bild/$target") + what=$(realpath "$BIZ_ROOT/_/bild/$target") # hack: get the domain from the activation script. there does not seem # to be a way to get it from nix-instantiate where=$(rg -r '$2' -e '(domainname ")(.*)(")' "$what/activate") -- cgit v1.2.3