nixpkgs/pkgs/by-name/li/libxsmm/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

63 lines
1.3 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 ];
};
}