mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
6556beb779
Intel MKL is succeeded by Intel oneMKL. This also results in several changes: - The versioning scheme has been changed, it now consists of a version such as "2021.1.1" and a build such as "52". - The tarball of RPMs has been replaced by a relatively complex installer, so instead we use the RPMs provided by the upstream Yum repository. To better detect breakage, the passthru tests also check static builds and with parallel (iomp) execution.
42 lines
806 B
Nix
42 lines
806 B
Nix
{ stdenv
|
|
, pkg-config
|
|
, mkl
|
|
|
|
, enableStatic ? false
|
|
, execution ? "seq"
|
|
}:
|
|
|
|
let
|
|
linkType = if enableStatic then "static" else "dynamic";
|
|
in stdenv.mkDerivation {
|
|
pname = "mkl-test";
|
|
version = mkl.version;
|
|
|
|
src = ./.;
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ (mkl.override { inherit enableStatic; }) ];
|
|
|
|
doCheck = true;
|
|
|
|
buildPhase = ''
|
|
# Check regular Nix build.
|
|
gcc test.c -o test $(pkg-config --cflags --libs mkl-${linkType}-ilp64-${execution})
|
|
|
|
# Clear flags to ensure that we are purely relying on options
|
|
# provided by pkg-config.
|
|
NIX_CFLAGS_COMPILE="" \
|
|
NIX_LDFLAGS="" \
|
|
gcc test.c -o test $(pkg-config --cflags --libs mkl-${linkType}-ilp64-${execution})
|
|
'';
|
|
|
|
installPhase = ''
|
|
touch $out
|
|
'';
|
|
|
|
checkPhase = ''
|
|
./test
|
|
'';
|
|
}
|