nix-pkgset icon indicating copy to clipboard operation
nix-pkgset copied to clipboard

providing static packages within the set

Open katexochen opened this issue 3 months ago • 1 comments

In my package set, I have two packages A and B, where B should depend pkgsStatic.A. It there a way to archive this with nix-pkgset? I'm using flakes.

katexochen avatar Aug 27 '25 14:08 katexochen

nix-pkgset no longer generates static/cross variants as it was too convoluted for me to maintain. You could try and generate your own static variant like:

foo = nix-pkgset.lib.makePackageSet "foo" pkgs.newScope (self: {
  fooStatic = nix-pkgset.lib.makePackageSet "foo" pkgs.pkgsStatic.newScope (self: {
    A = self.callPackage ./A.nix {};
  });
  
  A = self.callPackage ./A.nix {};
  B = self.callPackage ./B.nix { A = self.fooStatic.A; };
});


But that most likely won't be spliced correctly if you want to do cross-compilation.

szlend avatar Aug 27 '25 15:08 szlend