From c7b5ec13b8d596a79942e5bd18ea7049472613b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Bon=C3=A9?= Date: Fri, 29 Aug 2025 12:01:45 +0200 Subject: [PATCH] Provide nixpkgs.lib in bscpkgs outputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, we can use bscpkgs similarly to nixpkgs either through the flake outputs or with import bscpkgs: ```nix # currently supported: bscpkgs.legacyPackages.x86_64-linux.hello let pkgs = import bscpkgs { system = "x86_64-linux"; }; in pkgs.hello ``` The missing piece is nixpkgs.lib (not pkgs.lib, the system agnostic one). The workaround is to do bscpkgs.inputs.nixpkgs.lib instead. We can simplify this by forwarding the lib to our outputs. This enables us to use bscpkgs as a drop-in replacing the inputs to our flake from nixpkgs to bscpkgs. (inputs.nixpkgs.url = "<*BSC*pkgs url>"). Reviewed-by: Rodrigo Arias Mallo Tested-by: Aleix Boné --- flake.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flake.nix b/flake.nix index 73e3697..dc03735 100644 --- a/flake.nix +++ b/flake.nix @@ -13,5 +13,8 @@ bscOverlay = import ./overlay.nix; overlays.default = self.bscOverlay; legacyPackages.x86_64-linux = pkgs; + + # propagate nixpkgs lib, so we can do bscpkgs.lib + inherit (nixpkgs) lib; }; }