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
Low-impact cross fixes #33474
Low-impact cross fixes #33474
Conversation
f8a138f
to
b917bd2
Compare
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.
Good after those few things. Thanks!
@@ -314,7 +314,44 @@ stdenv.mkDerivation ({ | |||
+ stdenv.lib.optionalString (langJava || langGo) '' | |||
export lib=$out; | |||
'' | |||
; | |||
+ stdenv.lib.optionalString (buildPlatform != 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.
Let's skip GCC for the moment
@@ -27,6 +28,17 @@ let | |||
# Used when creating a version-suffixed symlink of libLLVM.dylib | |||
shortVersion = with stdenv.lib; | |||
concatStringsSep "." (take 2 (splitString "." release_version)); | |||
|
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.
And also skip llvm
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec { | |||
|
|||
# If architecture-dependent MO files aren't available, they're generated | |||
# during build, so we need gettext for cross-builds. | |||
crossAttrs.nativeBuildInputs = [ gettext buildPackages.stdenv.cc ]; |
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.
Need to get rid of cross attrs and some other things. I can force push to fix or just skip for now.
@@ -29,6 +29,14 @@ stdenv.mkDerivation rec { | |||
''; | |||
}; | |||
|
|||
# Hack: when cross-compiling we need to manually add rpaths to ensure that |
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.
No longer need this hack.
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec { | |||
# These should be turned back on, but see https://github.com/NixOS/nixpkgs/issues/23651 | |||
# For now the tests are just breaking large swaths of the nixpkgs binary cache for Darwin, | |||
# and I'd rather have everything else work at all than have stronger assurance here. | |||
doCheck = !stdenv.isDarwin; | |||
doCheck = !stdenv.isDarwin && stdenv.buildPlatform == 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.
We shouldn't propagate this everywhere. Stdenv should just disable doCheck when cross compiling.
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec { | |||
|
|||
outputs = [ "bin" "dev" "out" "man" "doc" ]; | |||
|
|||
doCheck = true; | |||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform; |
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.
Ditto.
b917bd2
to
3a1a865
Compare
|
@dezgeg would you mind if the stdenv doCheck fixes are tackled in a different PR? This was discussed and the consensus seems to be that this is the way to go for now: #30883 As mentioned there, cleanup would be straightforward if we find and agree on how to better handle this. (I agree it's annoying to propagate in the meantime) |
* move bison/flex to nativeBuildInputs * add patch to avoid use of undocumented glibc macro * fix use of 'install -s' to avoid invoking 'strip' directly
(cherry picked from commit 91fdb2f)
No, I really think that pattern shouldn't spread to everywhere in nixpkgs. |
3a1a865
to
29e8c66
Compare
Dropping perl-cross, needs some work (not being critical, but it's just not incomplete and doesn't work yet). Thought it did work, perhaps something it needs got lost in some shuffling, will pull it out. |
Ok the permenant solution I want for |
@Ericson2314 if you could revive that it'd be great! |
Motivation for this change
Not exhaustive, but manageable chunk of fixes from #30882 (and a few local ones) that don't cause mass-rebuild.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)