From e5a6175e044d69b8f598a2c2acb9bcfd77b9001c Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 21 Aug 2023 20:36:12 -0400 Subject: Refactor the build system for readability Lots of changes here but the code is much improved. The nix code is clearer and structured better. The Haskell code improved in response to the nix changes. I needed to use a qualified path instead of the abspath because the BIZ_ROOT changes based on whether bild runs in nix or runs in the user environment. Rather than passing every argument into Builder.nix, now I just pass the json from bild and deconstruct it in nix. This is obviously a much better design and it only came to be after sleeping on it the other night. --- Biz/Dev.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Biz/Dev.nix') diff --git a/Biz/Dev.nix b/Biz/Dev.nix index 6be4856..245e58c 100644 --- a/Biz/Dev.nix +++ b/Biz/Dev.nix @@ -1,5 +1,5 @@ -{ bild ? import ./Bild.nix {} }: - +{ nixpkgs ? import ./Bild.nix {} }: +with nixpkgs; # Dev machine for work and building stuff. bild.os { @@ -21,7 +21,7 @@ bild.os { services.dragons = { enable = true; port = 8095; - package = bild.ghc ./Dragons.hs; + package = bild.run ./Dragons.hs; keep = "/var/dragons/keep"; depo = "/var/dragons/depo"; }; -- cgit v1.2.3