-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
featureFeature request or proposalFeature request or proposal
Description
Is your feature request related to a problem?
It is overkill to pull in all of nixpkgs if you just want nixpkgs/lib. Currently we work around this by vendoring out lib out of the nixpkgs monorepo but I am proposing a more elegant solution:
Proposed solution
% sha=$(curl https://api.github.com/repos/NixOS/nixpkgs/git/trees/master:lib | jq -r .sha)
% curl -L https://github.com/NixOS/nixpkgs/archive/$sha.tar.gz -o $sha.tar.gz
% tar xzvf $sha.tar.gz
% ls nixpkgs-$sha
README.md deprecated generators.nix network tests
ascii-table.nix derivations.nix gvariant.nix options.nix trivial.nix
asserts.nix fetchers.nix kernel.nix path types.nix
attrsets.nix fileset licenses.nix source-types.nix versions.nix
cli.nix filesystem.nix lists.nix sources.nix
customisation.nix fixed-points.nix meta.nix strings-with-deps.nix
debug.nix flake-version-info.nix minfeatures.nix strings.nix
default.nix flake.nix modules.nix systems
We now have a tarball with just the lib subfolder!
Alternative solutions
The current solution is https://github.com/nix-community/nixpkgs.lib which is complex and complicated and doesn't work for arbitrary refs. It relies on github actions to keep things manually in sync
Additional context
Sparked out of Matrix discussions with @emilazy and @alyssais
Checklist
- checked latest Nix manual (source)
- checked open feature issues and pull requests for possible duplicates
Add 👍 to issues you find important.
acid-bong, roberth and Frontear
Metadata
Metadata
Assignees
Labels
featureFeature request or proposalFeature request or proposal