nixpkgs/pkgs/by-name/nv/nvidia-optical-flow-sdk/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

35 lines
1.0 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cudaPackages }:
stdenv.mkDerivation {
pname = "nvidia-optical-flow-sdk";
version = "2.0";
src = fetchFromGitHub {
owner = "NVIDIA";
repo = "NVIDIAOpticalFlowSDK";
rev = "edb50da3cf849840d680249aa6dbef248ebce2ca";
sha256 = "0hv0m0k9wl2wjhhl886j7ymngnf2xz7851nfh57s1gy5bv9lgdgz";
};
# # We only need the header files. The library files are
# # in the nvidia_x11 driver.
installPhase = ''
mkdir -p $out/include
cp -R * $out/include
'';
# 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";
homepage = "https://developer.nvidia.com/opticalflow-sdk";
license = licenses.bsd3; # applies to the header files only
platforms = platforms.all;
};
}