Commit Graph

292 Commits

Author SHA1 Message Date
Sandro Jäckel
2eafee5fcd opencv: cleanup unused code 2025-02-28 16:43:51 +01:00
Peder Bergebakken Sundt
5aba99242e treewide: fix typos in comments
Made with

```shell
git restore .
fd '\.nix$' pkgs/ --type f -j1 -x bash -xc "$(cat <<"EOF"
    typos --no-check-filenames --write-changes "$1"
    git diff --exit-code "$1" && exit
    #( git diff "$1" | grep -qE "^\+ +[^# ]") && git restore "$1"
    count1="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> ' | wc -l )"
    count2="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> (<span style="color:#f8f8f2;"> *</span>)?<span style="color:#75715e;">.*</span>$' | wc -l )"
    [[ $count1 -ne $count2 ]] && git restore "$1"
EOF
)" -- {}
```

and filtered with `GIT_DIFF_OPTS='--unified=15' git -c interactive.singleKey=true add --patch`

I initially tried using the tree-sitter cli, python bindings and even ast-grep through various means, but this is what I ended up with.
2025-02-24 10:44:41 +01:00
Gaetan Lepage
7d50d46671 opencv: do not add withIpp to passthru.tests on darwin 2025-02-18 15:22:28 +01:00
Gaetan Lepage
688232dcd4 opencv: add missing hash for ipp support 2025-02-18 13:50:25 +01:00
Gaetan Lepage
a20a850011 opencv: 4.9.0 -> 4.11.0
Diff: https://github.com/opencv/opencv/compare/4.9.0...4.11.0

Changelog:
https://github.com/opencv/opencv/wiki/OpenCV-Change-Logs#version4110
2025-02-04 08:42:04 +01:00
FliegendeWurst
26d1630bae opencv4: use latest protobuf, remove no longer needed cross fix 2025-01-23 23:17:00 +01:00
misuzu
ea772f118f opencv: restore sfm module (#349383) 2024-12-15 15:18:48 +02:00
Silvan Mosberger
667d42c00d treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 57b193d8dd
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:27:17 +01:00
FliegendeWurst
029555ec8d opencv4: restore sfm module
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2024-11-22 15:28:15 +01:00
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