!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

570 Members
124 Servers

Load older messages


SenderMessageTime
4 Jul 2025
@sananatheskenana:matrix.orglzcunti am overriding python3Minimal to add zlib back, then overriding meson to use my python3Minimal17:33:12
@sananatheskenana:matrix.orglzcuntthe first part works but the second part doesn't seem to work (it seems to use regular python3Minimal instead)17:33:38
@sananatheskenana:matrix.orglzcunti don't really understand splicing, is this something to do with that and what can I do about it?17:33:51
@sananatheskenana:matrix.orglzcuntmeson does use python3.pkgs which I've heard is bad for cross but switching it to python3Packages doesn't help17:34:19
@sananatheskenana:matrix.orglzcunt

the previous solution was this abomination:

(buildPackages.meson.override { python3 = (buildPackages.__splicedPackages.python3Minimal); }) 
17:35:20
@sananatheskenana:matrix.orglzcunt

this is basically what I'm trying to do after rebasing to add zlib back in, but what I explained happens

(buildPackages.meson.override { python3 = (buildPackages.__splicedPackages.python3Minimal.override { zlib = buildPackages.zlib; allowedReferenceNames = []; }); })
17:36:19
@artturin:matrix.orgArtturin overriding doesn't preserve splicing so the __splicedPackages there does nothing 18:13:27
@artturin:matrix.orgArtturinWhat commis?18:16:39
@artturin:matrix.orgArtturin* What commits?18:16:43
@artturin:matrix.orgArtturin * overriding doesn't preserve splicing so the __splicedPackages there does nothing (in the "previous solution" it did something) 18:18:48
@artturin:matrix.orgArtturin * overriding doesn't preserve splicing so the __splicedPackages there does nothing (in the "previous solution" it did something because you didn't .override) 18:22:48
@artturin:matrix.orgArtturin * What commits? You can find them in git reflog 18:32:40
@sananatheskenana:matrix.orglzcuntthe commits that removed zlib from python3Minimal18:38:23
@sananatheskenana:matrix.orglzcuntis there a way to splice the overridden package?18:38:40
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/pull/26779218:40:58
@artturin:matrix.orgArtturinMaybe the self and pythonAttr are causing your issue https://github.com/NixOS/nixpkgs/blob/ce72a12fd00a945c0b7717b3ea2ce51d5c42a20c/pkgs/development/interpreters/python/default.nix#L105-L10718:42:38
@artturin:matrix.orgArtturinYou should really do an overlay to overwrite 18:42:50
@artturin:matrix.orgArtturin* You should really do an overlay to override18:42:56
@artturin:matrix.orgArtturin python3MinimalWithZlib = python3.override { self = __splicedPackages.python3MinimalWithZlib; pythonAttr = "python3MinimalWithZlib"; ... } 18:43:41
@artturin:matrix.orgArtturin meson.override { python3 = python3MinimalWithZlib; } 18:43:59
@artturin:matrix.orgArtturin * ...meson.override { python3 = python3MinimalWithZlib; } 18:44:02
@sananatheskenana:matrix.orglzcuntRedacted or Malformed Event18:44:16
@sananatheskenana:matrix.orglzcuntwrong reply18:44:27
@sananatheskenana:matrix.orglzcuntwell I intend for this to be merged to nixpkgs18:44:40
@artturin:matrix.orgArtturin

There's some python3.override's in nixpkgs but they're doing packageOverrides, not overriding python.

python = python3.override {
   self = python;
   packageOverrides = self: super: { sqlalchemy = super.sqlalchemy_1_4; };
 };
18:46:59
@emilazy:matrix.orgemilyyou should really just try to get full Python building18:47:11
@emilazy:matrix.orgemilyDarwin bootstrap does it18:47:16
@artturin:matrix.orgArtturin *

There's some python3.override's in nixpkgs but they're doing packageOverrides, not overriding python. (I don't think they cause a python rebuild though)

python = python3.override {
   self = python;
   packageOverrides = self: super: { sqlalchemy = super.sqlalchemy_1_4; };
 };
18:47:44
@sananatheskenana:matrix.orglzcunt openssl, libffi, and probably others have infinite recursions because they all do cc.isGNU which depends on the libc which depends on meson which is rough 18:48:09
@sananatheskenana:matrix.orglzcuntbut i'll look into darwin bootstrap18:48:16

Show newer messages


Back to Room ListRoom Version: 6