anchor.diff:      coreutils
     ];
   
  -  makeFlags =
  -    [
  -      "FC=${optionalString (stdenv.hostPlatform != stdenv.buildPlatform) stdenv.cc.targetPrefix}gfortran"
  -      "CC=${optionalString (stdenv.hostPlatform != stdenv.buildPlatform) stdenv.cc.targetPrefix}cc"
  -      ''PREFIX="''$(out)"''
  -      "NUM_THREADS=64"
  -      "INTERFACE64=${if blas64 then "1" else "0"}"
  -      "NO_STATIC=1"
  -    ]
  -    ++ stdenv.lib.optional (stdenv.hostPlatform.libc == "musl") "NO_AFFINITY=1"
  -    ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "NO_BINARY_MODE=1" "HOSTCC=cc" "CROSS=1" ]
  -    ++ mapAttrsToList (var: val: var + "=" + val) config;
  +  makeFlags = mapAttrsToList (var: val: "${var}=${toString val}") (config // {
  +    FC = "${stdenv.cc.targetPrefix}gfortran";
  +    CC = "${stdenv.cc.targetPrefix}cc";
  +    PREFIX = placeholder "out";
  +    NUM_THREADS = 64;
  +    INTERFACE64 = blas64;
  +    NO_STATIC = true;
  +    CROSS = stdenv.hostPlatform != stdenv.buildPlatform;
  +    HOSTCC = "${buildPackages.stdenv.cc.targetPrefix}cc";
  +    NO_BINARY_MODE = stdenv.hostPlatform != stdenv.buildPlatform;
  +  });
   
  -  doCheck = stdenv.hostPlatform != stdenv.buildPlatform;
  +  doCheck = true;
     checkTarget = "tests";
   
     postInstall = ''
  
positive.code:   # To add support for a new platform, add an element to this set.
    configs = {
      armv6l-linux = {
        BINARY = "32";
        TARGET = "ARMV6";
        DYNAMIC_ARCH = "0";
        USE_OPENMP = "1";
      };
  
      armv7l-linux = {
        BINARY = "32";
        TARGET = "ARMV7";
        DYNAMIC_ARCH = "0";
        USE_OPENMP = "1";
      };
  
      aarch64-linux = {
        BINARY = "64";
        TARGET = "ARMV8";
        DYNAMIC_ARCH = "1";
        USE_OPENMP = "1";
      };
  
      i686-linux = {
        BINARY = "32";
        TARGET = "P2";
        DYNAMIC_ARCH = "1";
        USE_OPENMP = "1";
      };
  
      x86_64-darwin = {
        BINARY = "64";
        TARGET = "ATHLON";
        DYNAMIC_ARCH = "1";
        USE_OPENMP = "0";
        MACOSX_DEPLOYMENT_TARGET = "10.7";
      };
  
      x86_64-linux = {
        BINARY = "64";
        TARGET = "ATHLON";
        DYNAMIC_ARCH = "1";
        USE_OPENMP = "1";
      };
    };
  in
  
negative.code: in
  stdenv.mkDerivation rec {
    name = "openblas-${version}";
    version = "0.3.5";
    src = fetchFromGitHub {
      owner = "xianyi";
      repo = "OpenBLAS";
      rev = "v${version}";
      sha256 = "0hwfplr6ciqjvfqkya5vz92z2rx8bhdg5mkh923z246ylhs6d94k";
    };
  
    inherit blas64;
  
    # Some hardening features are disabled due to sporadic failures in
    # OpenBLAS-based programs. The problem may not be with OpenBLAS itself, but
  