python3Packages.pytorch: removeReferencesTo gcc

This commit is contained in:
Kevin Mehall 2021-11-03 23:10:25 +00:00
parent e47fb605ef
commit 9c6aecf304

View File

@ -6,7 +6,7 @@
cudaArchList ? null,
# Native build inputs
cmake, util-linux, linkFarm, symlinkJoin, which, pybind11,
cmake, util-linux, linkFarm, symlinkJoin, which, pybind11, removeReferencesTo,
# Build inputs
numactl,
@ -220,6 +220,7 @@ in buildPythonPackage rec {
which
ninja
pybind11
removeReferencesTo
] ++ lib.optionals cudaSupport [ cudatoolkit_joined ];
buildInputs = [ blas blas.provider ]
@ -259,6 +260,8 @@ in buildPythonPackage rec {
])
];
postInstall = ''
find "$out/${python.sitePackages}/torch/include" "$out/${python.sitePackages}/torch/lib" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
mkdir $dev
cp -r $out/${python.sitePackages}/torch/include $dev/include
cp -r $out/${python.sitePackages}/torch/share $dev/share