Skip to content

Commit eba0f48

Browse files
authored
Add buildArch flag to translateLocally for controlling AVX512 (NixOS#385549)
2 parents b0e62b6 + ebfb536 commit eba0f48

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkgs/by-name/tr/translatelocally/package.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
runCommand,
1313
translatelocally,
1414
translatelocally-models,
15+
buildArch ? "x86-64",
1516
}:
1617

1718
let
@@ -65,6 +66,10 @@ stdenv.mkDerivation (finalAttrs: {
6566
cmakeFlags = [
6667
"-DBLAS_LIBRARIES=-lblas"
6768
"-DCBLAS_LIBRARIES=-lcblas"
69+
70+
# See the following for context:
71+
# https://github.com/NixOS/nixpkgs/pull/385549
72+
(lib.optionalString stdenv.hostPlatform.isx86_64 "-DBUILD_ARCH=${buildArch}")
6873
];
6974

7075
passthru.tests = {

0 commit comments

Comments
 (0)