opencv: fix != "x86_64-darwin" check; also use lib.systems.equals#403629
Open
MattSturgeon wants to merge 5 commits intoNixOS:masterfrom
Open
opencv: fix != "x86_64-darwin" check; also use lib.systems.equals#403629MattSturgeon wants to merge 5 commits intoNixOS:masterfrom
!= "x86_64-darwin" check; also use lib.systems.equals#403629MattSturgeon wants to merge 5 commits intoNixOS:masterfrom
Conversation
lib.systems.equals!= "x86_64-darwin" check; also use lib.systems.equals
Comment on lines
+459
to
+460
| # FIXME: Do we actually want `equals`, or should we use `canExec`? | ||
| ++ optionals (sysEquals effectiveStdenv.hostPlatform effectiveStdenv.buildPlatform) [ |
Member
There was a problem hiding this comment.
That probably should be canExec
| pythonPackages.python | ||
| ] | ||
| ++ optionals (effectiveStdenv.buildPlatform == effectiveStdenv.hostPlatform) [ | ||
| # FIXME: Do we actually want `equals`, or should we use `canExec`? |
Member
There was a problem hiding this comment.
This probably means "when not doing cross"
| } | ||
| // optionalAttrs (!enablePython) { pythonEnabled = pythonPackages.opencv4; } | ||
| // optionalAttrs (effectiveStdenv.buildPlatform != "x86_64-darwin") { | ||
| # FIXME: is !(isx86_64 && isDarwin) correct, or should it be more general, like !isDarwin ? |
There's no reason to have a checkPhase input in `nativeBuildInputs` when `nativeCheckInputs` exists.
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.
==withlib.systems.equalsFound this while working on #380005, the existing
effectiveStdenv.buildPlatform != "x86_64-darwin"condition will never be false, becausebuildPlatformis never a string.I've replaced this with
!(isx86_64 && isDarwin), however I suspect it may not need to be quite this specific?Additionally I've replaced the usage of
==to compare platforms with the more correctlib.systems.equals. However, it may be more accurate to usebuildPlatform.canExecute hostPlatform.I've included some FIXME comments in the diff; if maintainers/reviewers can clarify intent, I'd like to resolve them in this PR. Otherwise they can be addressed in future work.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-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.