!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

398 Members
92 Servers

Load older messages


SenderMessageTime
19 Oct 2024
@artturin:matrix.orgArtturinRun it on native and cross05:00:48
@artturin:matrix.orgArtturinAnd leave everything else as is and hope np one ever uses the file05:01:01
@jackwilsdon:matrix.orgjackwilsdon
    postInstall = ''
      nuke-refs \
        $out/${python.sitePackages}/contourpy/util/__pycache__/_build_config.* \
        $out/${python.sitePackages}/contourpy/util/_build_config.py
    '';

Had to remove the references from the compiled cache files too but this looks good.

05:11:26
@artturin:matrix.orgArtturinThe cache files probably arent for the right system05:13:40
@artturin:matrix.orgArtturinAnd non-reproducible so they're usually removed05:14:00
@jackwilsdon:matrix.orgjackwilsdonAh right, I couldn't find many examples of them being removed but I'll do that05:14:11
@jackwilsdon:matrix.orgjackwilsdonThere's 1 or 2 but I guess it only applies for packages where the code has been run during build05:14:31
@jackwilsdon:matrix.orgjackwilsdon
    postInstall = ''
      find $out/${python.sitePackages}/contourpy -name __pycache__ -type d -exec rm -rf {} +
      nuke-refs $out/${python.sitePackages}/contourpy/util/_build_config.py
    '';
05:14:56
@jackwilsdon:matrix.orgjackwilsdonI'll open a PR with this I guess 😁05:15:04
@artturin:matrix.orgArtturin
In reply to @jackwilsdon:matrix.org
Ah right, I couldn't find many examples of them being removed but I'll do that
They should be removed automatically in postFixup https://github.com/NixOS/nixpkgs/blob/7cf7ffbdc3348f7b0a9309805a180f812f3ab220/pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh#L41
05:19:46
@jackwilsdon:matrix.orgjackwilsdonHmm interesting, they were definitely in the resulting derivation. Will see if I can find out why.05:20:05
@artturin:matrix.orgArtturinNIX_DEBUG = 705:20:43
@artturin:matrix.orgArtturin
In reply to @artturin:matrix.org
They should be removed automatically in postFixup https://github.com/NixOS/nixpkgs/blob/7cf7ffbdc3348f7b0a9309805a180f812f3ab220/pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh#L41
Nvm this namespaces thing is something different https://github.com/search?q=repo%3ANixOS%2Fnixpkgs%20pythonNamespaces&type=code
05:22:10
@jackwilsdon:matrix.orgjackwilsdonAh05:23:04
@artturin:matrix.orgArtturin PYTHONDONTWRITEBYTECODE will make python not write it 05:28:21
@jackwilsdon:matrix.orgjackwilsdonOh nice. I'll set that on the derivation itself I guess.05:29:37
@artturin:matrix.orgArtturinDo it on cross, seems it's not common to remove them on native05:30:36
@artturin:matrix.orgArtturinImproves performance05:30:41
@jackwilsdon:matrix.orgjackwilsdon Hmm, setting PYTHONDONTWRITEBYTECODE = "1"; in the derivation doesn't actually get rid of them. 05:34:53
@artturin:matrix.orgArtturinOk I guess just remive them05:36:22
@artturin:matrix.orgArtturin* Ok I guess just remove them05:36:38
@jwillikers:matrix.orgjwillikers joined the room.12:06:37
@artturin:matrix.orgArtturin jackwilsdon: Worked? 19:21:44
@artturin:matrix.orgArtturin * jackwilsdon: Did you get it to work? 19:22:16
@artturin:matrix.orgArtturin When you make your PR you can add Supersedes https://github.com/NixOS/nixpkgs/pull/328218 19:22:39
@jackwilsdon:matrix.orgjackwilsdon
In reply to @artturin:matrix.org
jackwilsdon: Did you get it to work?
It builds fine but haven't had the chance to properly test it yet
19:36:13
@jackwilsdon:matrix.orgjackwilsdon
In reply to @artturin:matrix.org
When you make your PR you can add Supersedes https://github.com/NixOS/nixpkgs/pull/328218
I didn't even realize someone else had opened a PR. I guess using nuke-refs is preferred over the solution in that PR?
19:37:11
@artturin:matrix.orgArtturinyes19:38:38
@artturin:matrix.orgArtturin * yes in this context19:39:27
20 Oct 2024
@jaredbaur:matrix.orgJared Baur fix for linux-firmware when doing cross: https://github.com/NixOS/nixpkgs/pull/349895 01:57:37

There are no newer messages yet.


Back to Room ListRoom Version: 6