Files
nixpkgs/pkgs/by-name/li/libxsmm/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

75 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
gfortran,
python3,
util-linux,
which,
enableStatic ? stdenv.hostPlatform.isStatic,
}:
stdenv.mkDerivation rec {
pname = "libxsmm";
version = "1.17";
src = fetchFromGitHub {
owner = "libxsmm";
repo = "libxsmm";
rev = version;
sha256 = "sha256-s/NEFU4IwQPLyPLwMmrrpMDd73q22Sk2BNid/kedawY=";
};
# Fixes /build references in the rpath
patches = [ ./rpath.patch ];
outputs = [
"out"
"dev"
"doc"
];
nativeBuildInputs = [
gfortran
python3
util-linux
which
];
enableParallelBuilding = true;
dontConfigure = true;
makeFlags =
let
static = if enableStatic then "1" else "0";
in
[
"OMP=1"
"PREFIX=$(out)"
"STATIC=${static}"
];
postInstall = ''
mkdir -p $dev/lib/pkgconfig
mv $out/lib/*.pc $dev/lib/pkgconfig
moveToOutput "share/libxsmm" ''${!outputDoc}
'';
prePatch = ''
patchShebangs .
'';
meta = with lib; {
broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
description = "Library targeting Intel Architecture for specialized dense and sparse matrix operations, and deep learning primitives";
mainProgram = "libxsmm_gemm_generator";
license = licenses.bsd3;
homepage = "https://github.com/hfp/libxsmm";
platforms = platforms.linux;
maintainers = with lib.maintainers; [ chessai ];
};
}