Skip to content
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

Fix cross build (was: fix manual) #11820

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

roberth
Copy link
Member

@roberth roberth commented Nov 6, 2024

Motivation

Fix the build!

I don't think we had a manual in the cross build in the past, so this is nice.

Tested with:

nix build .#nix-everything-armv6l-unknown-linux-gnueabihf

Context

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@roberth roberth added the build-problem Nix fails to compile or test; also improvements to build process label Nov 6, 2024
@Mic92
Copy link
Member

Mic92 commented Nov 7, 2024

@mergify rebase

Copy link
Contributor

mergify bot commented Nov 7, 2024

rebase

❌ Pull request can't be updated with latest base branch changes

Mergify needs the author permission to update the base branch of the pull request.
@hercules-ci needs to authorize modification on its head branch.

@Mic92 Mic92 mentioned this pull request Nov 7, 2024
@edolstra
Copy link
Member

edolstra commented Nov 7, 2024

This doesn't exactly make our Nix expressions easier to understand (and they're already massively more complex than a couple of releases ago). For instance, I have no idea what "splices" are (the Nixpkgs manual is unhelpful in this respect), so the use of functions like makeScopeWithSplicing', generateSplicesForMkScope, etc. is a mystery to me.

@Mic92
Copy link
Member

Mic92 commented Nov 7, 2024

@roberth can you split of the first two commits into it's own PR? They are independent from @edolstra concern and they should be fixed regardless of cross-compilation or not.

flake.nix Outdated
inherit inputs stdenv;
pkgs = final;
});
nixDependencies = lib.makeScopeWithSplicing'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the meta-critique here is that these functions are not documented?
So let's just do that in nixpkgs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flake.nix Outdated
inherit (final) newScope;
}
{
otherSplices = final.generateSplicesForMkScope "nixDependencies";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one as well.

@roberth roberth mentioned this pull request Nov 7, 2024
@roberth
Copy link
Member Author

roberth commented Nov 7, 2024

split

@roberth
Copy link
Member Author

roberth commented Nov 7, 2024

a mystery

I agree. NixOS/nixpkgs#354198 is definitely a problem.
I might be able to simplify this with a different helper function, but the docs are the source of this trouble.

@NixOS NixOS deleted a comment from mergify bot Nov 7, 2024
@Mic92
Copy link
Member

Mic92 commented Nov 7, 2024

@roberth it would be great if I could use mergify for rebasing your pull requests, but that's not possible for the hercules-ci nix fork. Would you mind in future to just push directly to the nix repository? This avoids some back and forth. Maybe there is also a different way to have write access to repositories originating from orgs.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-11-06-nix-team-meeting-minutes-192/55847/1

@roberth roberth changed the title Fix cross manual Fix cross build (was: fix manual) Nov 28, 2024
We *could* use a "native" manual instead - ie reusing a native
`nixpkgsFor.${buildPlatform}`, but this works, and also
works for possible cases where we have a custom or patched build tool.
@Ericson2314
Copy link
Member

I would like go merge this. We shouldn't be blocked by Nixpkgs doc issues.

@roberth
Copy link
Member Author

roberth commented Dec 2, 2024

@edolstra Something like this is required to fix the cross build of everything.nix. The alternative would be to disable the manual, and possible run into another cross issue at a later date.

IMO the readability is a problem that should be fixed in Nixpkgs, and Nix should just follow its lead.

@edolstra edolstra merged commit 8e0913b into NixOS:master Dec 2, 2024
12 checks passed
@roberth
Copy link
Member Author

roberth commented Dec 2, 2024

Thanks!

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-12-02-nix-team-meeting-minutes-199/56961/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-problem Nix fails to compile or test; also improvements to build process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure in cross build to arm6l linux
5 participants