summaryrefslogtreecommitdiffstats
path: root/pkgs/development/compilers/cudatoolkit/redist/build-cuda-redist-package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/cudatoolkit/redist/build-cuda-redist-package.nix')
-rw-r--r--pkgs/development/compilers/cudatoolkit/redist/build-cuda-redist-package.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/development/compilers/cudatoolkit/redist/build-cuda-redist-package.nix b/pkgs/development/compilers/cudatoolkit/redist/build-cuda-redist-package.nix
index 9bbd7ea1da11..1b216ee625a8 100644
--- a/pkgs/development/compilers/cudatoolkit/redist/build-cuda-redist-package.nix
+++ b/pkgs/development/compilers/cudatoolkit/redist/build-cuda-redist-package.nix
@@ -1,5 +1,5 @@
{ lib
-, stdenv
+, backendStdenv
, fetchurl
, autoPatchelfHook
, autoAddOpenGLRunpathHook
@@ -10,7 +10,8 @@ attrs:
let
arch = "linux-x86_64";
-in stdenv.mkDerivation {
+in
+backendStdenv.mkDerivation {
inherit pname;
inherit (attrs) version;
@@ -29,7 +30,11 @@ in stdenv.mkDerivation {
];
buildInputs = [
- stdenv.cc.cc.lib
+ # autoPatchelfHook will search for a libstdc++ and we're giving it a
+ # "compatible" libstdc++ from the same toolchain that NVCC uses.
+ #
+ # NB: We don't actually know if this is the right thing to do
+ backendStdenv.cc.cc.lib
];
dontBuild = true;
@@ -43,6 +48,8 @@ in stdenv.mkDerivation {
runHook postInstall
'';
+ passthru.stdenv = backendStdenv;
+
meta = {
description = attrs.name;
license = lib.licenses.unfree;