Provide nixpkgs.lib in bscpkgs outputs #14

Manually merged
abonerib merged 1 commits from abonerib/bscpkgs:bsckpgs-lib into master 2025-09-12 14:30:03 +02:00
Collaborator

Currently, we can use bscpkgs similarly to nixpkgs either through
the flake outputs or with import bscpkgs:

# 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 = "<...BSCpkgs url>").

We could also expose nixosConfigurations and other outputs from nixpkgs in the same fashion, but I don't think they are needed.

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 = "<...BSCpkgs url>"`). We could also expose `nixosConfigurations` and other outputs from nixpkgs in the same fashion, but I don't think they are needed.
abonerib added 1 commit 2025-08-29 12:17:22 +02:00
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 = "<...BSCpkgs url>").
abonerib requested review from rarias 2025-08-29 12:17:22 +02:00
rarias approved these changes 2025-08-29 12:33:35 +02:00
abonerib force-pushed bsckpgs-lib from 457ebcdeeb to cbb310d19f 2025-08-29 16:40:01 +02:00 Compare
abonerib force-pushed bsckpgs-lib from cbb310d19f to bba8ee181f 2025-09-12 14:20:56 +02:00 Compare
Author
Collaborator

Since this only adds a flake output, it is a noop on bsc-ci:

$ git checkout master && nix build -vL .#bsc-ci.all --no-link --print-out-paths # master @ 2c8d7ed8
/nix/store/hpcrj7x7yywy8ja321r0qbv0m6idbd3r-ci-all

$ git checkout bscpkgs-lib && nix build -vL .#bsc-ci.all --no-link --print-out-paths
/nix/store/hpcrj7x7yywy8ja321r0qbv0m6idbd3r-ci-all
Since this only adds a flake output, it is a noop on bsc-ci: ``` $ git checkout master && nix build -vL .#bsc-ci.all --no-link --print-out-paths # master @ 2c8d7ed8 /nix/store/hpcrj7x7yywy8ja321r0qbv0m6idbd3r-ci-all $ git checkout bscpkgs-lib && nix build -vL .#bsc-ci.all --no-link --print-out-paths /nix/store/hpcrj7x7yywy8ja321r0qbv0m6idbd3r-ci-all ```
rarias force-pushed bsckpgs-lib from bba8ee181f to c7b5ec13b8 2025-09-12 14:29:35 +02:00 Compare
abonerib manually merged commit c7b5ec13b8 into master 2025-09-12 14:30:03 +02:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
2 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rarias/bscpkgs#14
No description provided.