Merge pull request #87789 from danieldk/mkl-pkgconfig
mkl: fix expectation of MKLROOT being set in pkg-config files
This commit is contained in:
commit
6a61ce54b9
@ -1,4 +1,12 @@
|
|||||||
{ stdenvNoCC, fetchurl, rpmextract, undmg, darwin, enableStatic ? false }:
|
{ stdenvNoCC
|
||||||
|
, fetchurl
|
||||||
|
, pkgconfig
|
||||||
|
, rpmextract
|
||||||
|
, undmg
|
||||||
|
, darwin
|
||||||
|
, enableStatic ? false
|
||||||
|
}:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
For details on using mkl as a blas provider for python packages such as numpy,
|
For details on using mkl as a blas provider for python packages such as numpy,
|
||||||
numexpr, scipy, etc., see the Python section of the NixPkgs manual.
|
numexpr, scipy, etc., see the Python section of the NixPkgs manual.
|
||||||
@ -44,6 +52,10 @@ in stdenvNoCC.mkDerivation {
|
|||||||
else
|
else
|
||||||
[ rpmextract ];
|
[ rpmextract ];
|
||||||
|
|
||||||
|
installCheckInputs = [ pkgconfig ];
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
|
|
||||||
buildPhase = if stdenvNoCC.isDarwin then ''
|
buildPhase = if stdenvNoCC.isDarwin then ''
|
||||||
for f in Contents/Resources/pkg/*.tgz; do
|
for f in Contents/Resources/pkg/*.tgz; do
|
||||||
tar xzvf $f
|
tar xzvf $f
|
||||||
@ -77,6 +89,7 @@ in stdenvNoCC.mkDerivation {
|
|||||||
bn=$(basename $f)
|
bn=$(basename $f)
|
||||||
substituteInPlace $f \
|
substituteInPlace $f \
|
||||||
--replace "prefix=<INSTALLDIR>/mkl" "prefix=$out" \
|
--replace "prefix=<INSTALLDIR>/mkl" "prefix=$out" \
|
||||||
|
--replace $\{MKLROOT} "$out" \
|
||||||
--replace "lib/intel64_lin" "lib"
|
--replace "lib/intel64_lin" "lib"
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -139,6 +152,11 @@ in stdenvNoCC.mkDerivation {
|
|||||||
install_name_tool -change @rpath/libtbbmalloc.dylib $out/lib/libtbbmalloc.dylib $out/lib/libtbbmalloc_proxy.dylib
|
install_name_tool -change @rpath/libtbbmalloc.dylib $out/lib/libtbbmalloc.dylib $out/lib/libtbbmalloc_proxy.dylib
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Validate pkgconfig files, since they break often on updates.
|
||||||
|
installCheckPhase = ''
|
||||||
|
pkg-config --validate $out/lib/pkgconfig/*.pc
|
||||||
|
'';
|
||||||
|
|
||||||
# Per license agreement, do not modify the binary
|
# Per license agreement, do not modify the binary
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
dontPatchELF = true;
|
dontPatchELF = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user