-
-
Notifications
You must be signed in to change notification settings - Fork 18k
libpsl: make python both a build and runtime dependency #321150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why getDev, dev output usually doesn't have bin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh dear, now THAT is a typo. I have no idea how this worked in my testing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "PYTHON=${lib.getBin buildPackages.python3}/bin/python3" | |
| "PYTHON=${lib.getExe buildPackages.python3}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
Description seems backwards? Also do we still need the one runnable at build time for cross? |
|
You're right, the description is backwards. I'll fix it in a moment. I recall attempting to switch python to just being a buildInput, but it failed, and I was in fact testing linux -> freebsd cross while working on this. |
Previously, python3 was only provided as a nativeBuildInput. However, libpsl.bin distributes python scripts. To make them use the right python, provide python as a buildInput and specify which python to use at build time with a configure flag.
|
@Ericson2314, @alyssais: this has consequences for netbsd and openbsd cross. I just noticed by accident that jobs fell off Hydra, but I'm not personally interested in netbsd or openbds. Easy eval test e.g.: nix eval -f pkgs/top-level/release-cross.nix x86_64-netbsd.nix.x86_64-linux.outPath |
|
Oh, thanks for noticing! |
|
Python can't (or at least refuses to) cross compile for NetBSD, so maybe the thing to do where we can't cross compile Python is just to not install the Python scripts? (Or leave them with unpatched shebangs, in case there's system Python?) |
|
This also broke [Edit:] My apologies, this isn't quite right. This did add the dependency from pkgsStatic.libpsl to pkgsStatic.python3, but at the time of merging this, pkgsStatic.python3 was still building fine. So this isn't the root cause. [Edit2:] Updating to Python 3.12 was what broke |
|
Maybe the binaries should be a separate package altogether, as they’re probably relatively marginal? |
Description of changes
Previously, python3 was only provided as a buildInput. However, libpsl.bin distributes python scripts. To make them use the right python, provide python as a nativeBuildInput and specify which python to use for the build with a configure flag.
This rebuilds curl.dev. I'm not sure how far-reaching the consequences of that are, but it at least includes rebuilding rustc, so I'm targeting staging.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.