Hi! Glad to see the progress you’ve made deciphering our tech debt since starting this thread. First, an important disclaimer: much of this code that confused you, including e.g. the “fixups” and “shims” is being phased out: cudaPackages: build redists from manifests and add CUDA 13 by ConnorBaker · Pull Request #437723 · NixOS/nixpkgs · GitHub https://github.com/NixOS/nixpkgs/pull/406740
But how to add my own version and how to use it (not in a github repo)?
This question is answered in the Nixpkgs Manual. The generic answer for “scopes” is:
let
cudaPackages = pkgs.cudaPackages.overrideScope (fi: pre: {
tensorrt = pre.overrideAttrs (oldAttrs: { version = ...; src = requireFile { ... }; });
});
in
Cf. the manual for the hacks specific to the current implementation of cudaPackages.
error: attribute 'featureRelease' missing
at /nix/store/m85c2rx3rh5km3aarlm4hhj4n6invskp-nixpkgs/nixpkgs/pkgs development/cuda-modules/_cuda/fixups/tensorrt.nix:32:10:
Short answer: ignore it, just override with your own brand-new src attribute. The hack that causes the error is being removed anyway.
To use the TensorRT derivation, you must join the NVIDIA Developer Program and
The error already says so, but I’ll just re-iterate that we have no URL from which we can legally download TensorRT in a hands-off way, so you are expected to add it to the store manually. The requireFile fake derivation is a FOD (“Fixed Output Derivation”) that just matches the pre-existing store path by hash.
LD_LIBRARY_PATH
I don’t know your background, so I’ll mention this just to be sure: you usually only need LD_LIBRARY_PATH at runtime, not at build time, and only when using software not built by Nix. In contrast, you use buildInputs if you do not “use” tensorrt, but only reference (link) it at build time
flake
While at it, here’s also a reminder that, no matter what you do, you don’t need flakes 