How do I set cmakeFlags that point to a library?


 cmakeFlags = [ 

Which produces an error:

build/DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda" does not exist.

The command to build it:

nix-build --keep-failed --expr 'with import <nixpkgs> {}; callPackage ./default.nix {}'

This path doesn’t exist in the sandbox. If you really need to do this you can turn the sandbox off in /etc/nix/nix.conf but this isn’t recommended. The recommendation would be to use a library packaged for nixpkgs, or package the library you need as well.