summaryrefslogtreecommitdiff
path: root/Biz/Bild.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-07-27 14:57:55 -0400
committerBen Sima <ben@bsima.me>2022-07-27 14:57:55 -0400
commita988b5cc9d75ad23a23b0b34b35f00bdacc9a2e2 (patch)
treef32456fb34f4fc381f1352082dddf5bfcb3a0a58 /Biz/Bild.nix
parent2d753c6120ccf47734fba8fb1588408df1fdf5c0 (diff)
Upgrade nixpkgs
Diffstat (limited to 'Biz/Bild.nix')
-rw-r--r--Biz/Bild.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/Biz/Bild.nix b/Biz/Bild.nix
index ad56549..da0c6a8 100644
--- a/Biz/Bild.nix
+++ b/Biz/Bild.nix
@@ -2,6 +2,8 @@
rec {
constants = import ./Bild/Constants.nix;
+
+ # internal usage
private = {
inherit nixpkgs;
@@ -32,6 +34,8 @@ rec {
wai # can remove when removed from Biz.Log
]);
};
+
+ # generally-useful things from nixpkgs
inherit (nixpkgs) lib stdenv sources;
# a standard nix build for `bild` - this should be the only hand-written
@@ -83,10 +87,11 @@ rec {
# gather data needed for compiling by analyzing the main module
analyze = main:
- builtins.head
+ # builtins.head
(lib.trivial.importJSON
(runBildAnalyze main + "/analysis.json"));
+ # build a ghc executable
ghc = main:
let
data = analyze main;
@@ -131,10 +136,10 @@ rec {
];
};
+ # build an operating system. 'cfg' is the NixOS config
os = cfg: (nixpkgs.nixos (_args: cfg)).toplevel;
- pkgs = { inherit (nixpkgs) git; };
-
+ # build a rust executable
rust = main:
let
data = analyze main;
@@ -155,5 +160,6 @@ rec {
installPhase = "exit 0";
};
+ # build a docker image
image = nixpkgs.pkgs.dockerTools.buildImage;
}