From 553f345e4a05b6925bf5eadac83bd96062af74d6 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sat, 12 Oct 2024 01:16:16 +0200 Subject: [PATCH 1/2] amd-libflame: 4.2 -> 5.0 --- .../libraries/science/math/amd-libflame/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/math/amd-libflame/default.nix b/pkgs/development/libraries/science/math/amd-libflame/default.nix index 0ca1c49505412..2a49dbe7c4295 100644 --- a/pkgs/development/libraries/science/math/amd-libflame/default.nix +++ b/pkgs/development/libraries/science/math/amd-libflame/default.nix @@ -14,13 +14,13 @@ stdenv.mkDerivation rec { pname = "amd-libflame"; - version = "4.2"; + version = "5.0"; src = fetchFromGitHub { owner = "amd"; repo = "libflame"; rev = version; - hash = "sha256-eiH2eq+nKUjlB1bZTZNRW1+efCHZ68UOSFy0NpcY1FI="; + hash = "sha256-Shsv5Zd59FN5tq1LY7QqPRtAHEysHIVbPeKIIZ/2eMw="; }; postPatch = '' From 36652974df506179a10792affa30d02b33b769da Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sat, 12 Oct 2024 11:25:36 +0200 Subject: [PATCH 2/2] amd-libflame: apply nixfmt --- .../science/math/amd-libflame/default.nix | 61 +++++++++++-------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/pkgs/development/libraries/science/math/amd-libflame/default.nix b/pkgs/development/libraries/science/math/amd-libflame/default.nix index 2a49dbe7c4295..6022742e05fc1 100644 --- a/pkgs/development/libraries/science/math/amd-libflame/default.nix +++ b/pkgs/development/libraries/science/math/amd-libflame/default.nix @@ -1,15 +1,16 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, gfortran -, python3 -, amd-blis -, aocl-utils - -, withOpenMP ? true -, blas64 ? false -, withAMDOpt ? true +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + gfortran, + python3, + amd-blis, + aocl-utils, + + withOpenMP ? true, + blas64 ? false, + withAMDOpt ? true, }: stdenv.mkDerivation rec { @@ -30,22 +31,32 @@ stdenv.mkDerivation rec { substituteInPlace CMakeLists.txt --replace '-mtune=native' "" ''; - passthru = { inherit blas64; }; + passthru = { + inherit blas64; + }; - nativeBuildInputs = [ cmake gfortran python3 ]; + nativeBuildInputs = [ + cmake + gfortran + python3 + ]; - buildInputs = [ amd-blis aocl-utils ]; + buildInputs = [ + amd-blis + aocl-utils + ]; - cmakeFlags = [ - "-DLIBAOCLUTILS_LIBRARY_PATH=${lib.getLib aocl-utils}/lib/libaoclutils${stdenv.hostPlatform.extensions.sharedLibrary}" - "-DLIBAOCLUTILS_INCLUDE_PATH=${lib.getDev aocl-utils}/include" - "-DENABLE_BUILTIN_LAPACK2FLAME=ON" - "-DENABLE_CBLAS_INTERFACES=ON" - "-DENABLE_EXT_LAPACK_INTERFACE=ON" - ] - ++ lib.optional (!withOpenMP) "-DENABLE_MULTITHREADING=OFF" - ++ lib.optional blas64 "-DENABLE_ILP64=ON" - ++ lib.optional withAMDOpt "-DENABLE_AMD_OPT=ON"; + cmakeFlags = + [ + "-DLIBAOCLUTILS_LIBRARY_PATH=${lib.getLib aocl-utils}/lib/libaoclutils${stdenv.hostPlatform.extensions.sharedLibrary}" + "-DLIBAOCLUTILS_INCLUDE_PATH=${lib.getDev aocl-utils}/include" + "-DENABLE_BUILTIN_LAPACK2FLAME=ON" + "-DENABLE_CBLAS_INTERFACES=ON" + "-DENABLE_EXT_LAPACK_INTERFACE=ON" + ] + ++ lib.optional (!withOpenMP) "-DENABLE_MULTITHREADING=OFF" + ++ lib.optional blas64 "-DENABLE_ILP64=ON" + ++ lib.optional withAMDOpt "-DENABLE_AMD_OPT=ON"; postInstall = '' ln -s $out/lib/libflame.so $out/lib/liblapack.so.3