2024-01-02 11:29:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cudaPackages }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "nvidia-optical-flow-sdk";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NVIDIA";
|
|
|
|
repo = "NVIDIAOpticalFlowSDK";
|
2021-06-28 23:13:55 +00:00
|
|
|
rev = "edb50da3cf849840d680249aa6dbef248ebce2ca";
|
|
|
|
sha256 = "0hv0m0k9wl2wjhhl886j7ymngnf2xz7851nfh57s1gy5bv9lgdgz";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# # We only need the header files. The library files are
|
|
|
|
# # in the nvidia_x11 driver.
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/include
|
|
|
|
cp -R * $out/include
|
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
# Makes setupCudaHook propagate nvidia-optical-flow-sdk together with cuda
|
|
|
|
# packages. Currently used by opencv4.cxxdev, hopefully can be removed in the
|
|
|
|
# future
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cudaPackages.markForCudatoolkitRootHook
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Nvidia optical flow headers for computing the relative motion of pixels between images";
|
|
|
|
homepage = "https://developer.nvidia.com/opticalflow-sdk";
|
|
|
|
license = licenses.bsd3; # applies to the header files only
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|