From aa5f12a5a2365a35f17becc66cf7a67fa86a4440 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 8 Apr 2024 16:02:03 -0400 Subject: Reorganize and update nixpkgs upstreams This patch does a few things: 1. Switches from nixpkgs-unstable to nixos-unstable{,-small}, simply because nixpkgs-unstable is not in cache.nixos.org, but nixos-unstable is, and -small is the same but requires all tests to pass. So we should prefer nixos-unstable-small, whenever possible. 2. Reorganizes the nixpkgs import code such that Nixpkgs.nix returns an attrset of all the nixpkgs that I want to use, rather than putting other nixpkgs branches into the main one as an overlay. This is much simpler and explicit, but it meant I had to change a lot of usages throughtout the nix codebase. 3. As a consequence of 2, moves the overlays into separate files so they can be re-used across nixpkgs branches. --- Biz/Bild/Builder.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Biz/Bild/Builder.nix') diff --git a/Biz/Bild/Builder.nix b/Biz/Bild/Builder.nix index 4bef830..d1fc48b 100644 --- a/Biz/Bild/Builder.nix +++ b/Biz/Bild/Builder.nix @@ -3,9 +3,9 @@ wouldn't you? - Try to reuse as much upstream Nix as possible. */ -{ analysisJSON, nixpkgs ? import ../Bild.nix { } }: -with nixpkgs; +{ analysisJSON, bild ? import ../Bild.nix { } }: let + lib = bild.lib; analysis = builtins.fromJSON analysisJSON; build = _: target: let @@ -53,7 +53,7 @@ let sysdeps_ = if isEmpty target.sysdeps then [ ] else - lib.attrsets.attrVals target.sysdeps pkgs; + lib.attrsets.attrVals target.sysdeps bild.pkgs; rundeps_ = if isEmpty target.rundeps then [ ] @@ -63,16 +63,16 @@ let CODEROOT = "."; builders = { - base = stdenv.mkDerivation rec { + base = bild.stdenv.mkDerivation rec { inherit name src CODEROOT preBuild; buildInputs = langdeps_ ++ sysdeps_; installPhase = "install -D ${name} $out/bin/${name}"; buildPhase = compileLine; }; - haskell = stdenv.mkDerivation rec { + haskell = bild.stdenv.mkDerivation rec { inherit name src CODEROOT preBuild; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ bild.makeWrapper ]; buildInputs = sysdeps_ ++ [ (bild.haskell.ghcWith (p: (lib.attrsets.attrVals target.langdeps p))) @@ -85,7 +85,7 @@ let ''; }; - c = stdenv.mkDerivation rec { + c = bild.stdenv.mkDerivation rec { inherit name src CODEROOT preBuild; buildInputs = langdeps_ ++ sysdeps_; installPhase = "install -D ${name} $out/bin/${name}"; @@ -155,4 +155,4 @@ let # return a single drv, so just take the first one for now. ideally i would only # pass Target, one at a time, (perhaps parallelized in haskell land) and then i # wouldn't need all of this let nesting -in builtins.head (lib.attrsets.mapAttrsToList build analysis) +in builtins.head (bild.lib.attrsets.mapAttrsToList build analysis) -- cgit v1.2.3