From 42c7bbed76990fc70a410e4e76bd3dccfdf8a29f Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 25 Dec 2023 17:59:16 +0000 Subject: [PATCH] nix: clarify the meaning of "broken" and "badPlatforms" --- .devops/nix/package.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.devops/nix/package.nix b/.devops/nix/package.nix index 0f1cab916..59c5e4c53 100644 --- a/.devops/nix/package.nix +++ b/.devops/nix/package.nix @@ -178,7 +178,15 @@ effectiveStdenv.mkDerivation ( }; meta = { - broken = (useCuda && effectiveStdenv.isDarwin) || (useMetalKit && !effectiveStdenv.isDarwin); + # Configurations we don't want even the CI to evaluate. Results in the + # "unsupported platform" messages. This is mostly a no-op, because + # cudaPackages would've refused to evaluate anyway. + badPlatforms = optionals (useCuda || useOpenCL) lib.platforms.darwin; + + # Configurations that are known to result in build failures. Can be + # overridden by importing Nixpkgs with `allowBroken = true`. + broken = (useMetalKit && !effectiveStdenv.isDarwin); + description = "Inference of LLaMA model in pure C/C++${descriptionSuffix}"; homepage = "https://github.com/ggerganov/llama.cpp/"; license = lib.licenses.mit; @@ -201,7 +209,8 @@ effectiveStdenv.mkDerivation ( SomeoneSerge ]; - platforms = lib.platforms.unix; + # Extend `badPlatforms` instead + platforms = lib.platforms.all; }; } )