From e5b87d549620a0745eef41afe665218c4c153442 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 13 Apr 2024 13:43:41 +0300 Subject: feat(3p/nixpkgs): add additionalOverlays optional arg This allows applying additional overlays to nixpkgs before instantiating it. Change-Id: Iee486086e13bb73e6bd20a817b1106c3cd99c935 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11407 Autosubmit: flokli Reviewed-by: raitobezarius Tested-by: BuildkiteCI --- third_party/nixpkgs/default.nix | 5 ++++- tvix/shell.nix | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/third_party/nixpkgs/default.nix b/third_party/nixpkgs/default.nix index ae379a90fa..b79a963e5c 100644 --- a/third_party/nixpkgs/default.nix +++ b/third_party/nixpkgs/default.nix @@ -13,6 +13,9 @@ , depotOverlays ? true , localSystem ? externalArgs.localSystem or builtins.currentSystem , crossSystem ? externalArgs.crossSystem or localSystem + # additional overlays to be applied. + # Useful when calling this file in a view exported from depot. +, additionalOverlays ? [ ] , ... }: @@ -69,5 +72,5 @@ import nixpkgsSrc (commonNixpkgsArgs // { depot.third_party.overlays.ecl-static depot.third_party.overlays.dhall (import depot.third_party.sources.rust-overlay) - ] else [ ]); + ] else [ ] ++ additionalOverlays); }) diff --git a/tvix/shell.nix b/tvix/shell.nix index bba20496a7..75e64b88b2 100644 --- a/tvix/shell.nix +++ b/tvix/shell.nix @@ -8,6 +8,7 @@ pkgs ? (import ./nixpkgs { depotOverlays = false; depot.third_party.sources = import ./sources { }; + additionalOverlays = [ ]; }) , ... }: -- cgit 1.4.1