Commit Graph

233 Commits

Author SHA1 Message Date
Lewis Arias
197f37c80f
opencv4: properly install Python type-stubs
Without these type stubs installed auto-completion for the `cv2` module
will not be available and diagnostics may not be accurate.
This is especially notable in a devshell using `mkShell` and `python3.withPackages`
leading to editors such as Neovim having a poor development experience.
2024-10-06 20:28:13 -04:00
Connor Baker
7edb29bd29 cudaPackages.tests: create tests for OpenCV/Torch ordering 2024-09-25 02:55:35 +00:00
Connor Baker
aa117cc209 opencv: inherit from lib, switch to cmake* helpers, fix CUDA 2024-09-25 02:55:32 +00:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Emily
87c5a230ec opencv{2,3}: drop 2024-08-20 20:16:13 +01:00
Philip Taron
18c70e9378
opencv4: fix build with enableCuda = true
I broke this in e949a91d02
2024-08-19 11:44:49 -07:00
Philip Taron
e949a91d02
opencv: remove with statements 2024-08-18 06:31:16 -07:00
Philip Taron
13deb3a2a1
opencv: remove with statements 2024-08-18 06:31:16 -07:00
Jörg Thalheim
5356420466 treewide: remove unused with statements from maintainer lists
$ find -type f -name '*.nix' -print0 | xargs -P "$(nproc)" -0 sed -i \
  -e 's!with lib.maintainers; \[ *\];![ ];!' \
  -e 's!with maintainers; \[ *\];![ ];!'
2024-07-29 10:06:20 +08:00
Matteo Pacini
aaa1d5d0fb opencv2: fix clang builds 2024-07-20 18:18:18 +01:00
Someone Serge
82018339bd treewide: cuda: use propagatedBuildInputs, lib.getOutput 2024-07-02 01:47:19 +00:00
K900
8f09c67329
Merge pull request #314691 from SuperSandro2000/spectacle-opencv
spectacle: use minimal opencv
2024-06-02 10:42:19 +03:00
Sandro Jäckel
28a2669aba
opencv: add option to only compile specific modules 2024-05-26 20:44:17 +02:00
Connor Baker
b8c7244bae opencv3: don't build with CUDA newer than 11 2024-05-25 23:10:03 +00:00
Sandro Jäckel
31bd95c876
opencv: expose runAccuracyTests, runPerformanceTests booleans 2024-05-25 23:56:19 +02:00
Yohann Boniface
d20a86ccc1
pkgs/development/libraries: remove unused fetchpatch and other arguments (#313402) 2024-05-23 13:43:35 +02:00
Someone Serge
2c51064b0b treewide: remove cudatoolkit.cc references 2024-04-13 14:24:39 +00:00
Martin Weinelt
b79beadd1e
opencv4: 4.7.0 -> 4.9.0
https://github.com/opencv/opencv/wiki/ChangeLog#version490
2024-02-25 23:20:40 +01:00
Nicolas Benes
48dc1dba06 openblas: update URLs, upstream repo was moved 2024-01-30 10:26:25 +01:00
Yureka
59ed7caeed
opencv3: build with openexr 3 (#279918)
Confirmed to pick up OpenEXR 3 correctly, has no dependencies
2024-01-16 12:03:57 +01:00
Someone
e326909cf3
opencv4: extend the comment about cxxdev
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2023-12-25 22:10:11 +00:00
Someone Serge
7954fc68cb
opencv4: propagate real outputs in cxxdev even without cuda
Hotfix https://github.com/NixOS/nixpkgs/issues/276691
2023-12-25 11:56:37 +00:00
Someone Serge
55af932942
opencv4: discard build-time cuda deps 2023-12-06 02:00:52 +00:00
Someone Serge
4569838029
opencv4: propagate optical flow sdk same as cuda 2023-12-06 02:00:52 +00:00
Someone Serge
ada3991349
opencv4: expose cxxdev, propagating optional cuda deps 2023-12-06 02:00:52 +00:00
Someone Serge
0c4b1fcfba
openvino: opencvConfig.cmake attempts to find_package(CUDA) 2023-12-04 20:24:32 +00:00
Fabián Heredia Montiel
884449105e Merge remote-tracking branch 'origin/master' into staging-next 2023-11-13 14:31:51 -06:00
Someone Serge
d4229c0e32
opecv4: drop symlinkJoin 2023-11-03 13:34:48 +00:00
Someone Serge
866daf5f7c
opencv{3,4}: do not ignore config.cudaSupport
i686 isn't in the meta.platforms for cudaPackages anyway
2023-11-02 19:13:31 +00:00
Someone Serge
c7dbb3ccc9
opencv3: cuda: add a libstdc++ integration test 2023-11-02 19:13:31 +00:00
Someone Serge
4735963a24
opencv4: cuda: fix libstdc++ errors 2023-11-02 19:13:31 +00:00
Someone Serge
a122884cb3
opencv4: cuda: add a libstdc++ integration test 2023-11-02 19:13:31 +00:00
Aaron Jheng
80aaa46d4c
protobuf: use new package definition only 2023-10-11 13:20:31 +00:00
Pierre Bourdon
5266b96d2e
Merge pull request #256444 from delroth/opencv-darwin-unvendor
opencv3,opencv4: disable some unnecessary vendoring on Darwin
2023-09-27 23:23:45 +02:00
Pierre Bourdon
c32c0dd64a
opencv3,opencv4: disable some unnecessary vendoring on Darwin 2023-09-22 00:59:41 +02:00
Ben Darwin
38a5ede5c3 opencv3: remove enableVtk flag
This flag does not actually cause opencv3 to detect vtk.
Instead of fixing it, we remove it to remove the optional dependence on
vtk_8.
(Note this flag works correctly in opencv4.)
2023-09-18 12:45:56 -04:00
Vladimír Čunát
bb945f3cea
opencv(4), opencv3: switch to older protobuf
https://hydra.nixos.org/build/231540730
https://hydra.nixos.org/build/231464517
2023-08-15 07:55:47 +02:00
Connor Baker
495875182e
Merge pull request #224068 from SomeoneSerge/respect-config-cudaSupport
Respect global config.cudaSupport
2023-07-25 14:18:14 -04:00
Someone Serge
471dbe9bcf
treewide: consume config.cudaSupport as required
Eliminate uses of `config.cudaSupport or false` and alike, since the
option is now declared in config.nix with a default value

fd .nix -t f -x sed 's/config\.cudaSupport or false, cudaPackages [?] [{][}]/config.cudaSupport, cudaPackages ? { }/' '{}' -i
fd .nix -t f -x sed 's/config\.cudaSupport or false/config.cudaSupport/' '{}' -i
fd .nix -t f -x sed 's/cudaSupport = pkgs.config.cudaSupport/inherit (pkgs.config) cudaSupport/' '{}' -i
fd .nix -t f -x sed 's/cudaSupport = config.cudaSupport/inherit (config) cudaSupport/' '{}' -i
2023-07-20 18:08:19 +03:00
Felix Buehler
f3719756b5 treewide: use optionalString instead of 'then ""' 2023-06-24 20:19:19 +02:00
Robert Scott
0c813b2340 opencv: add patches for CVE-2023-2617 & CVE-2023-2618 2023-05-31 22:12:42 +01:00
fetsorn
d454823d20 opencv: fix typo
"perfomanceTests" -> "performanceTests"
2023-05-08 22:11:18 +04:00
Vladimír Čunát
c6b639ec35
opencv2: add Accelerate framework on darwin
Same as commit e4d2b6fced3; I didn't notice this version suffered
from it as well.  It's probably random/impurity anyway.
https://hydra.nixos.org/build/214981496
2023-04-10 08:24:42 +02:00
Vladimír Čunát
e4d2b6fced
opencv_{3,4}: add Accelerate framework on darwin
No idea why aarch64-darwin started to need it now.
https://hydra.nixos.org/build/215252174#tabs-buildsteps
(also split long lines)
2023-04-09 08:21:09 +02:00
Samuel Ainsworth
2cc30d5125
Merge pull request #221370 from ConnorBaker/feat/opencv-use-cudaPackages-staging-reland
opencv: misc CUDA-related updates and fixes; add enableLto
2023-03-29 21:36:52 -04:00
Connor Baker
cd16931110 opencv: use cudaPackages.backendStdenv.cc instead of cudaPackages.cudatoolkit.cc 2023-03-17 10:17:50 -04:00
Connor Baker
a418cae499 opencv: misc CUDA-related updates and fixes; add enableLto
- use cudaPackages instead of cudatoolkit (reduces download/closure size)
- set C/C++ compiler when building with CUDA to ensure NVCC has an appropriate backing compiler
- add flag to build with CUDNN (disabled by default due to increase in closure size)
- add flag to build with LTO (enabled by default)
2023-03-15 19:59:12 +00:00
Mathieu Rene
e4c31c2dfc opencv3: Build with video input under darwin platforms
Adds the right dependencies for encoding video, and removes the cmake
flag preventing the feature to be compiled in.
2023-03-12 16:15:14 -04:00
Enno Richter
649670296e opencv2: add darwin dependencies 2023-03-07 05:32:02 +01:00
Someone Serge
2b69d618c2
opencv3: respect config.cudaCapabilities 2023-03-04 01:04:25 +02:00