-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
libpsl: don't depend on python when we cross compile #344211
Conversation
@ofborg build pkgsStatic.curl curl |
@ofborg build pkgsCross.aarch64-multiplatform.curl |
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.
I don't think it makes sense to artificially restrict functionality that would otherwise work when cross compiling. There's not any reason to assume that people want this functionality when doing native builds, but not when cross compiling, except when cross compiling to platforms where it shouldn't work.
I think this should be an option (so people can choose when avoid the big dependency, even in native cases), and it should default to only including the Python stuff in cases where that's possible, i.e. not when cross compiling to a platform Python doesn't support cross compiling to. We can use the list in their configure script. It might be nice if it was exposed in python3
's passthru
, so that other packages could do the same thing without having to repeat the list.
this is quite a big dependency that we don't want.
@@ -12,6 +12,7 @@ | |||
, python3 | |||
, buildPackages | |||
, publicsuffix-list | |||
, enablePython3 ? python3.availableOn stdenv.hostPlatform |
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.
Here we go.
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.
This won't work, because Python's meta.platforms lists platforms Python can be built for, but it can't encode that it can't be cross compiled to those platforms. For example, Python supports being built natively on NetBSD, but not being cross compiled to it. We need a separate list of which platforms Python supports being cross compiled to.
@@ -655,6 +655,8 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { | |||
nativeBuildInputs = with pkgsBuildBuild.python3.pkgs; [ sphinxHook python-docs-theme ]; | |||
}; | |||
|
|||
availableOn = platform: !platform.isStatic && lib.meta.availableOn platform self; |
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 can be built statically. Even if it didn't, we could encode that using badPlatforms = [ lib.systems.inspect.platformPatterns.isStatic ]
, with no need to invent a new helper.
Ok. I don't want to spend more time on fixing this. I will disable cross-compilation in the nix repository until someone else fixes this. |
this is quite a big dependency that we don't want.
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-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.