-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
lots of cross fixes #189397
lots of cross fixes #189397
Conversation
@@ -41,6 +41,8 @@ stdenv.mkDerivation rec { | |||
] ++ lib.optional gstreamerSupport "--enable-cogl-gst" | |||
++ lib.optionals (!stdenv.isDarwin) [ "--enable-gles1" "--enable-gles2" ]; | |||
|
|||
# TODO: this shouldn't propagate so many things | |||
# especially not gobject-introspection |
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.
cc @lovek323
"-Dinstalled_test_datadir=${placeholder "installedTests"}/share" | ||
"-Dinstalled_test_bindir=${placeholder "installedTests"}/libexec" | ||
]; | ||
|
||
doCheck = true; | ||
|
||
postPatch = '' | ||
substituteInPlace tests/meson.build \ |
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.
Sounds very hacky :)
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.
wonder why i did that instead of just making the installedTests conditional on host == build
changed it to that
Thanks! Currently diff LGTM, but indeed some things should go upstream sooner rather than later. Do you want to track that somewhere or would the source of nixpkgs be enough to remember? Sprinkled some small comments, nothing major. |
ced75a7
to
a57e5de
Compare
41e0af9
to
f813b1f
Compare
doesn't work yet ``` gnome-tour-aarch64-unknown-linux-gnu> error: linking with `/nix/store/3d9zjv5vaqjxb9kwbdqsd194alwm97x1-gcc-wrapper-11.3.0/bin/cc` failed: exit status: 1 gnome-tour-aarch64-unknown-linux-gnu> | gnome-tour-aarch64-unknown-linux-gnu> = note: "/nix/store/3d9zjv5vaqjxb9kwbdqsd194alwm97x1-gcc-wrapper-11.3.0/bin/cc" "-m64" "/build/rustcd8pO0A/symbols.o" "/build/gnome-tour-42.0/build/src/release/deps/gnome_to ... gnome-tour-aarch64-unknown-linux-gnu> /nix/store/vhf2cr6immz4qdxd83y025fnxim8mmfg-binutils-2.38/bin/ld: skipping incompatible /nix/store/c84gzzifyh10w9m612wxcas04r7fq4h0-glib-aarch64-unknown-linux-gnu-2. 72.3/lib/libglib-2.0.so when searching for -lglib-2.0 gnome-tour-aarch64-unknown-linux-gnu> /nix/store/vhf2cr6immz4qdxd83y025fnxim8mmfg-binutils-2.38/bin/ld: cannot find -lglib-2.0: No such file or directory ... gnome-tour-aarch64-unknown-linux-gnu> collect2: error: ld returned 1 exit status ... gnome-tour-aarch64-unknown-linux-gnu> FAILED: src/gnome-tour gnome-tour-aarch64-unknown-linux-gnu> /nix/store/m5n32vy7rbfrqcxigw1p6wyx3cj7smg9-coreutils-9.1/bin/env CARGO_HOME=/build/gnome-tour-42.0/build/cargo-home /nix/store/76l9r44x1sv323c90j6vi401n4fvims2-cargo-1.62.1/b in/cargo build --manifest-path /build/gnome-tour-42.0/Cargo.toml --target-dir /build/gnome-tour-42.0/build/src --release && cp src/release/gnome-tour src/gnome-tour gnome-tour-aarch64-unknown-linux-gnu> ninja: build stopped: subcommand failed. ```
f813b1f
to
15cd209
Compare
]; | ||
|
||
buildInputs = [ | ||
glib |
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.
Should be here as well, do not rely on propagation: https://gitlab.gnome.org/GNOME/gnome-logs/-/blob/e0a8ab855f4ea318f2d2c5dfb1b314ac2702c987/meson.build#L64
# for some reason upstream does the following instead of using meson builtins | ||
# TODO: tell upstream to use meson builtins / remove the duplicate check | ||
|
||
# dependency('pkg-config', version : '>= 0.24') |
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.
Likely a remnant from porting from autotools: https://gitlab.gnome.org/GNOME/gnome-logs/-/blame/e0a8ab855f4ea318f2d2c5dfb1b314ac2702c987/meson.build#L56
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.
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.
The extraneous mkenums check was removed in https://gitlab.gnome.org/GNOME/gnome-logs/-/merge_requests/37
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.
pulled both in patches
@@ -38,6 +38,7 @@ stdenv.mkDerivation rec { | |||
python3 | |||
desktop-file-utils | |||
wrapGAppsHook4 | |||
gjs |
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 should be fixed by adding native: true
kwarg to find_program
here:
Edit: that might not work looking at https://mesonbuild.com/Reference-manual_functions.html#find_program but it is definitely a native build input.
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.
find_program already looks in PATH
ther reason its needed in buildInputs is https://gitlab.gnome.org/GNOME/gnome-characters/-/blob/b72bf4e1a7cbe8446ef2659d432b78ac8b50df83/meson.build#L47
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.
buildInputs
I am fine with since gjs
is an interpreter used for running the app. But it should not be necessary at build time, as far as I can tell.
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.
# error: Package `...' not found in specified Vala API directories or GObject-Introspection GIR directories | ||
# TODO: the vala setuphook should look for vala filess in targetOffset instead of hostOffset | ||
gsound |
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.
Then it should be fixed there.
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.
yeah im going to do it in a separate pr
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.
@@ -25,6 +27,11 @@ stdenv.mkDerivation rec { | |||
glib | |||
]; | |||
|
|||
postPatch = '' |
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 are switching to meson in #182618, we can probably cherry-pick that to master.
2c9bff3
to
470e9ba
Compare
I won't/can't comment on the technical side but @Artturin I wonder what's your motivation for all these cross-building fixes ? It is great, just curious :) |
I want to see how much of nixpkgs we can get to cross-compile |
they weren't being built before at all
no idea why this still happens here when this issue was fixed in gobject-introspection hook and the fix works for other packages
470e9ba
to
b59f013
Compare
this is in response to an old TODO: <NixOS#189397 (comment)>
Description of changes
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes