From 7870a19fa4de5a478aec7e071f18cdaaefe7d5f4 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 15 Apr 2021 20:23:35 -0400 Subject: Remove required nix arguments This allows us to use nix-build as a check that bild is working. I think bild sometimes hangs because it doesn't get input from nix-build? I'm not sure, but one workaround is to run nix-build on the target, and then bild will just get the cached build. --- Biz/Bild.hs | 12 ------------ Biz/Bild/Rules.nix | 2 +- Biz/Cloud.nix | 2 +- Biz/Dev.nix | 2 +- Biz/Pie.nix | 3 ++- Biz/Que/Prod.nix | 6 ++++-- 6 files changed, 9 insertions(+), 18 deletions(-) (limited to 'Biz') diff --git a/Biz/Bild.hs b/Biz/Bild.hs index eee7eb4..cba6539 100644 --- a/Biz/Bild.hs +++ b/Biz/Bild.hs @@ -440,18 +440,6 @@ build andTest loud Target {..} = do [ path, "-o", outDir Namespace.toPath namespace, - -- Set default arguments to nix functions - "--arg", - "bild", - "import " <> root - "Biz/Bild/Rules.nix" - <> " { nixpkgs = import " - <> root - "Biz/Bild/Nixpkgs.nix" - <> "; }", - "--arg", - "lib", - "(import " <> root "Biz/Bild/Nixpkgs.nix).lib", "--builders", Text.unpack builder ] diff --git a/Biz/Bild/Rules.nix b/Biz/Bild/Rules.nix index 800f1df..afea746 100644 --- a/Biz/Bild/Rules.nix +++ b/Biz/Bild/Rules.nix @@ -1,4 +1,4 @@ -{ nixpkgs }: +{ nixpkgs ? import ./Nixpkgs.nix }: with nixpkgs; diff --git a/Biz/Cloud.nix b/Biz/Cloud.nix index c70c0ad..5bcb0a1 100644 --- a/Biz/Cloud.nix +++ b/Biz/Cloud.nix @@ -1,4 +1,4 @@ -{ bild }: +{ bild ? import ./Bild/Rules.nix {} }: # Cloud infrastructure, always online. Mostly for messaging-related stuff. diff --git a/Biz/Dev.nix b/Biz/Dev.nix index f372484..ab78b44 100644 --- a/Biz/Dev.nix +++ b/Biz/Dev.nix @@ -1,4 +1,4 @@ -{ bild }: +{ bild ? import ./Bild/Rules.nix {} }: # Dev machine for work and building stuff. diff --git a/Biz/Pie.nix b/Biz/Pie.nix index 70e2f23..de7cf20 100644 --- a/Biz/Pie.nix +++ b/Biz/Pie.nix @@ -1 +1,2 @@ -{ bild }: bild.ghc ./Pie.hs +{ bild ? import ./Bild/Rules.nix {} }: +bild.ghc ./Pie.hs diff --git a/Biz/Que/Prod.nix b/Biz/Que/Prod.nix index 12da1eb..70272ae 100644 --- a/Biz/Que/Prod.nix +++ b/Biz/Que/Prod.nix @@ -1,4 +1,6 @@ -{ bild, lib }: +{ bild ? import ../Bild/Rules.nix {} +, nixpkgs ? import ../Bild/Nixpkgs.nix +}: # The production server for que.run @@ -31,7 +33,7 @@ bild.os { defaultGateway = "157.245.224.1"; defaultGateway6 = "2604:a880:2:d1::1"; dhcpcd.enable = false; - usePredictableInterfaceNames = lib.mkForce true; + usePredictableInterfaceNames = nixpkgs.lib.mkForce true; interfaces = { eth0 = { ipv4.addresses = [ -- cgit v1.2.3