Skip to content

feat: allow nixpkgs package definitions#135

Open
OsiPog wants to merge 3 commits intonumtide:mainfrom
OsiPog:feat/allow-nixpkgs-package-definitions
Open

feat: allow nixpkgs package definitions#135
OsiPog wants to merge 3 commits intonumtide:mainfrom
OsiPog:feat/allow-nixpkgs-package-definitions

Conversation

@OsiPog
Copy link
Contributor

@OsiPog OsiPog commented Nov 12, 2025

I found it quite annoying recently that it's not possible to copy a Nix package from nixpkgs directly into the packages/ directory because Blueprint only accepts the custom argument attributes.

Nixpkgs defines packages in a way that the function argument attrset is direct subset of nixpkgs which Blueprint currently doesn't support. I found the fix for this quite easy.

To test this you can add hello.nix to your packages/. And run git add packages/hello.nix && nix build .#hello

@OsiPog
Copy link
Contributor Author

OsiPog commented Nov 17, 2025

@zimbatm Can you review this, please? I think this is a great addition for compatibility with nixpkgs

@yajo
Copy link
Contributor

yajo commented Feb 17, 2026

FWIW this will still not be helpful if you're copying a pythonPackage definition, where the scope in nixpkgs is wider than just normal packages. Just an example; the same is true for other package sets in nixpkgs.

Personally I just use defaults:

{pkgs, lib ? pkgs.lib, hello ? pkgs.hello, ...}: lib.traceVal hello

Still I agree something could be improved.

@zimbatm
Copy link
Member

zimbatm commented Feb 18, 2026

What happens if you define a local hello package, should it override the hello attribute coming from nixpkgs? It could also be confusing to know what is coming from where on larger code bases.

@OsiPog
Copy link
Contributor Author

OsiPog commented Feb 19, 2026

As I see it when one wants to use the local hello package, then perSystem.packages.hello or flake.packages.${system}.hello needs to be used. All plain attrset inputs come from nixpkgs directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants