nvidia-optical-flow-sdk: refactor: propagation via setupCudaHook

This commit is contained in:
Someone Serge 2023-12-15 01:10:37 +00:00
parent adf2347f8b
commit a33ae59eeb
No known key found for this signature in database
GPG Key ID: 7B0E3B1390D61DA4

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub }:
{ lib, stdenv, fetchFromGitHub, cudaPackages }:
stdenv.mkDerivation {
pname = "nvidia-optical-flow-sdk";
@ -18,10 +18,12 @@ stdenv.mkDerivation {
cp -R * $out/include
'';
postFixup = ''
mkdir -p $out/nix-support
echo $pname >> "$out/nix-support/include-in-cudatoolkit-root"
'';
# 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
];
meta = with lib; {
description = "Nvidia optical flow headers for computing the relative motion of pixels between images";