Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions pkgs/development/libraries/opencv/4.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ let
else if effectiveStdenv.hostPlatform.system == "x86_64-darwin" then
{ ${name "mac_intel64"} = ""; }
else
throw "ICV is not available for this platform (or not yet supported by this package)";
throw "ICV is not available for ${effectiveStdenv.hostPlatform.system} (or not yet supported by this package)";
dst = ".cache/ippicv";
};

Expand Down Expand Up @@ -343,7 +343,8 @@ effectiveStdenv.mkDerivation {
++ optionals enablePython [
pythonPackages.python
]
++ optionals (effectiveStdenv.buildPlatform == effectiveStdenv.hostPlatform) [
# FIXME: Do we actually want `equals`, or should we use `canExec`?
Copy link
Member

Choose a reason for hiding this comment

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

This probably means "when not doing cross"

++ optionals (lib.systems.equals effectiveStdenv.buildPlatform effectiveStdenv.hostPlatform) [
hdf5
]
++ optionals enableGtk2 [
Expand Down Expand Up @@ -448,20 +449,21 @@ effectiveStdenv.mkDerivation {
pkg-config
unzip
]
++ optionals enablePython (
[
pythonPackages.pip
pythonPackages.wheel
pythonPackages.setuptools
]
++ optionals (effectiveStdenv.hostPlatform == effectiveStdenv.buildPlatform) [
pythonPackages.pythonImportsCheckHook
]
)
++ optionals enablePython [
pythonPackages.pip
pythonPackages.wheel
pythonPackages.setuptools
]
++ optionals enableCuda [
cudaPackages.cuda_nvcc
];

nativeCheckInputs =
optionals (enablePython && effectiveStdenv.buildPlatform.canExec effectiveStdenv.hostPlatform)
[
pythonPackages.pythonImportsCheckHook
];

# Configure can't find the library without this.
OpenBLAS_HOME = optionalString withOpenblas openblas_.dev;
OpenBLAS = optionalString withOpenblas openblas_;
Expand Down Expand Up @@ -628,7 +630,8 @@ effectiveStdenv.mkDerivation {
withIpp = opencv4.override { enableIpp = true; };
}
// 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 ?
Copy link
Member

Choose a reason for hiding this comment

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

Maybe #208351 can answer that?

// optionalAttrs (with effectiveStdenv.buildPlatform; !(isx86_64 && isDarwin)) {
opencv4-tests = callPackage ./tests.nix {
inherit
enableGStreamer
Expand Down