libgudev: fix cross failing to build checks#245761
Closed
lilyinstarlight wants to merge 1 commit intoNixOS:stagingfrom
Closed
libgudev: fix cross failing to build checks#245761lilyinstarlight wants to merge 1 commit intoNixOS:stagingfrom
lilyinstarlight wants to merge 1 commit intoNixOS:stagingfrom
Conversation
Since `doCheck` is still forced off for cross[1], `checkInputs` do not get added to `buildInputs`. Prior to this change libgudev still tries to build the tests and fails because it can't find `umockdev`. Forcing tests off when `doCheck` is forcibly turns off fixes the build. [1] https://github.com/NixOS/nixpkgs/blob/bdddb46f4b058465ad53134d4a118671f9956662/pkgs/stdenv/generic/make-derivation.nix#L171
13 tasks
Mindavi
approved these changes
Jul 27, 2023
jtojnar
reviewed
Jul 27, 2023
| ]; | ||
|
|
||
| mesonFlags = [ | ||
| (lib.mesonEnable "tests" finalAttrs.finalPackage.doCheck) |
Member
There was a problem hiding this comment.
Why not just finalAttrs.doCheck?
Member
Author
There was a problem hiding this comment.
Idk, finalAttrs.doCheck was still true and so didn't work, and I didn't look into it further 🤷🏻♀️
Member
Author
There was a problem hiding this comment.
Oh, it's because until it goes through mkDerivation, the doCheck attr still hasn't been transformed. It looks like finalAttrs is resolved after all overrides, but finalPackage is after the mkDerivationSimple transformations
Member
|
I can't speak the quality of the specific change, but I can say this enabled me to get back to cross-compiling several of my systems on my locally applied "nixpkgs-cross" branch. Thank you! |
13 tasks
uninsane
approved these changes
Aug 1, 2023
Contributor
|
fixed in master: #246362 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Since
doCheckis still forced off for cross1,checkInputsdo not get added tobuildInputs. Prior to this change libgudev still tries to build the tests and fails because it can't findumockdevForcing tests off when
doCheckis forcibly turned off fixes thelibgudevbuild after #241939Things done
sandbox = trueset 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/)