amd-blis: add patch to make output reproducible, cleanup (#447706)

authored by Markus Kowalewski and committed by GitHub 114da121 f0986323

+25 -7
+13
pkgs/by-name/am/amd-blis/build-date.patch
··· 1 + diff --git a/configure b/configure 2 + index d96114619..119040151 100755 3 + --- a/configure 4 + +++ b/configure 5 + @@ -1913,7 +1913,7 @@ set_default_version() 6 + echo "${script_name}: determining default version string." 7 + 8 + # Use what's in the version file as-is. 9 + - version="AOCL-BLAS $(cat "${version_file}") Build $(date +%Y%m%d)" 10 + + version="AOCL-BLAS $(cat "${version_file}") Build $(date -d "@$SOURCE_DATE_EPOCH" +%Y%m%d)" 11 + } 12 + 13 +
+12 -7
pkgs/by-name/am/amd-blis/package.nix
··· 10 10 11 11 # Target architecture. "amdzen" compiles kernels for all Zen 12 12 # generations. To build kernels for specific Zen generations, 13 - # use "zen", "zen2", "zen3", or "zen4". 13 + # use "zen", "zen2", "zen3", "zen4", or "zen5". 14 14 withArchitecture ? "amdzen", 15 15 16 16 # Enable OpenMP-based threading. ··· 22 22 blasIntSize = if blas64 then "64" else "32"; 23 23 24 24 in 25 - stdenv.mkDerivation rec { 25 + stdenv.mkDerivation (finalAttrs: { 26 26 pname = "amd-blis"; 27 27 version = "5.1"; 28 28 29 29 src = fetchFromGitHub { 30 30 owner = "amd"; 31 31 repo = "blis"; 32 - rev = version; 32 + rev = finalAttrs.version; 33 33 hash = "sha256-hqb/Q1CBqtC4AXqHNd7voewGUD675hJ9IwvP3Mn9b+M="; 34 34 }; 35 35 36 + patches = [ 37 + # Set the date stamp to $SOURCE_DATE_EPOCH 38 + ./build-date.patch 39 + ]; 40 + 36 41 inherit blas64; 37 42 38 43 nativeBuildInputs = [ ··· 66 71 ln -s $out/lib/libcblas.so.3 $out/lib/libcblas.so 67 72 ''; 68 73 69 - meta = with lib; { 74 + meta = { 70 75 description = "BLAS-compatible library optimized for AMD CPUs"; 71 76 homepage = "https://developer.amd.com/amd-aocl/blas-library/"; 72 - license = licenses.bsd3; 73 - maintainers = [ maintainers.markuskowa ]; 77 + license = lib.licenses.bsd3; 78 + maintainers = [ lib.maintainers.markuskowa ]; 74 79 platforms = [ "x86_64-linux" ]; 75 80 }; 76 - } 81 + })