anchor.diff:  # Enable BLAS interface with 64-bit integer width.
   , blas64 ? false
   
  -# Target architecture, use "zen" or "zen2", optimization for Zen and
  -# other families is pretty much mutually exclusive in the AMD fork of
  -# BLIS.
  -, withArchitecture ? "zen"
  +# Target architecture. "amd64" compiles kernels for all Zen
  +# generations. To build kernels for specific Zen generations,
  +# use "zen", "zen2", or "zen3".
  +, withArchitecture ? "amd64"
   
   # Enable OpenMP-based threading.
   , withOpenMP ? true
  
positive.code:   blasIntSize = if blas64 then "64" else "32";
  in stdenv.mkDerivation rec {
    pname = "amd-blis";
    version = "2.2";
  
    src = fetchFromGitHub {
      owner = "amd";
      repo = "blis";
      rev = version;
      sha256 = "1b2f5bwi0gkw2ih2rb7wfzn3m9hgg7k270kg43rmzpr2acpy86xa";
    };
  
    inherit blas64;
  
negative.code:   '';
  
    postInstall = ''
      ln -s $out/lib/libblis${threadingSuffix}.so.3 $out/lib/libblas.so.3
      ln -s $out/lib/libblis${threadingSuffix}.so.3 $out/lib/libcblas.so.3
      ln -s $out/lib/libblas.so.3 $out/lib/libblas.so
      ln -s $out/lib/libcblas.so.3 $out/lib/libcblas.so
    '';
  