mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 07:05:13 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
56 lines
1.3 KiB
Nix
56 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
cmake,
|
|
gfortran,
|
|
# Whether to build with ILP64 interface
|
|
blas64 ? false,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "blas";
|
|
version = "3.12.0";
|
|
|
|
src = fetchurl {
|
|
url = "http://www.netlib.org/blas/${pname}-${version}.tgz";
|
|
sha256 = "sha256-zMQbXQiOUNsAMDF66bDJrzdXEME5KsrR/iCWAtpaWq0=";
|
|
};
|
|
|
|
passthru = { inherit blas64; };
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
gfortran
|
|
];
|
|
|
|
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ] ++ lib.optional blas64 "-DBUILD_INDEX64=ON";
|
|
|
|
postInstall =
|
|
let
|
|
canonicalExtension =
|
|
if stdenv.hostPlatform.isLinux then
|
|
"${stdenv.hostPlatform.extensions.sharedLibrary}.${lib.versions.major version}"
|
|
else
|
|
stdenv.hostPlatform.extensions.sharedLibrary;
|
|
in
|
|
lib.optionalString blas64 ''
|
|
ln -s $out/lib/libblas64${canonicalExtension} $out/lib/libblas${canonicalExtension}
|
|
'';
|
|
|
|
preFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
for fn in $(find $out/lib -name "*.so*"); do
|
|
if [ -L "$fn" ]; then continue; fi
|
|
install_name_tool -id "$fn" "$fn"
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Basic Linear Algebra Subprograms";
|
|
license = licenses.publicDomain;
|
|
maintainers = [ maintainers.markuskowa ];
|
|
homepage = "http://www.netlib.org/blas/";
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|