From d9971b39c50134c8936ff946a429d8b659912f03 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 12 Mar 2023 14:42:30 +0000 Subject: [PATCH] 3p/tvl: more refactoring to plumb system through --- third_party/tvl/third_party/bat_syntaxes/default.nix | 6 ++++-- third_party/tvl/third_party/nixpkgs/default.nix | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/third_party/tvl/third_party/bat_syntaxes/default.nix b/third_party/tvl/third_party/bat_syntaxes/default.nix index 15af130916..457c3fb124 100644 --- a/third_party/tvl/third_party/bat_syntaxes/default.nix +++ b/third_party/tvl/third_party/bat_syntaxes/default.nix @@ -9,10 +9,12 @@ let inherit (pkgs) bat runCommand; in -runCommand "bat-syntaxes.bin" { } '' +runCommand "bat-syntaxes.bin" { + nativeBuildInputs = [ bat ]; +} '' export HOME=$PWD mkdir -p .config/bat/syntaxes cp ${./Prolog.sublime-syntax} .config/bat/syntaxes - ${bat}/bin/bat cache --build + bat cache --build mv .cache/bat/syntaxes.bin $out '' diff --git a/third_party/tvl/third_party/nixpkgs/default.nix b/third_party/tvl/third_party/nixpkgs/default.nix index 50bdcb8afe..6f91d31e7a 100644 --- a/third_party/tvl/third_party/nixpkgs/default.nix +++ b/third_party/tvl/third_party/nixpkgs/default.nix @@ -11,6 +11,8 @@ { depot ? { }, externalArgs ? { }, depotOverlays ? true, ... }: let + system = if externalArgs ? nixpkgsSystem then externalArgs.nixpkgsSystem else builtins.currentSystem; + # import the nixos-unstable package set, or optionally use the # source (e.g. a path) specified by the `nixpkgsBisectPath` # argument. This is intended for use-cases where the depot is @@ -20,7 +22,7 @@ let # Stable package set is imported, but not exposed, to overlay # required packages into the unstable set. - stableNixpkgs = import depot.third_party.sources.nixpkgs-stable { }; + stableNixpkgs = import depot.third_party.sources.nixpkgs-stable { inherit system; }; # Overlay for packages that should come from the stable channel # instead (e.g. because something is broken in unstable). @@ -47,7 +49,7 @@ import nixpkgsSrc { allowUnfree = true; allowBroken = true; }; - system = if externalArgs ? nixpkgsSystem then externalArgs.nixpkgsSystem else builtins.currentSystem; + inherit system; overlays = [ commitsOverlay