Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5256f591479d
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a7c70f2e10bc
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on May 14, 2020

  1. mkl: fix expectation of MKLROOT being set in pkg-config files

    The Intel MKL pkg-config files did not work, because they expect that
    the MKLROOT environment variable is set. This change replaces
    occurences by the actual path of MKL in the Nix store.
    
    Since the pkg-config files seem to break quite frequently after
    upgrades, add a post-install check to validate the pkg-config files.
    
    (cherry picked from commit e88673a)
    danieldk committed May 14, 2020
    Copy the full SHA
    2dd4f2a View commit details
  2. Merge pull request #87836 from danieldk/mkl-pkgconfig-20.03

    [20.03] mkl: fix expectation of MKLROOT being set in pkg-config files
    bhipple authored May 14, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a7c70f2 View commit details
Showing with 19 additions and 1 deletion.
  1. +19 −1 pkgs/development/libraries/science/math/mkl/default.nix
20 changes: 19 additions & 1 deletion pkgs/development/libraries/science/math/mkl/default.nix
Original file line number Diff line number Diff line change
@@ -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,
numexpr, scipy, etc., see the Python section of the NixPkgs manual.
@@ -42,6 +50,10 @@ in stdenvNoCC.mkDerivation {
else
[ rpmextract ];

installCheckInputs = [ pkgconfig ];

doInstallCheck = true;

buildPhase = if stdenvNoCC.isDarwin then ''
for f in Contents/Resources/pkg/*.tgz; do
tar xzvf $f
@@ -75,6 +87,7 @@ in stdenvNoCC.mkDerivation {
bn=$(basename $f)
substituteInPlace $f \
--replace "prefix=<INSTALLDIR>/mkl" "prefix=$out" \
--replace $\{MKLROOT} "$out" \
--replace "lib/intel64_lin" "lib"
done
@@ -125,6 +138,11 @@ in stdenvNoCC.mkDerivation {
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
dontStrip = true;
dontPatchELF = true;