flake.nix: darwin: only expose the default

This commit is contained in:
Someone Serge 2023-12-26 22:41:53 +00:00
parent d0adab60d5
commit 3f7003b4bb
No known key found for this signature in database
GPG key ID: 7B0E3B1390D61DA4

View file

@ -73,6 +73,7 @@
perSystem = perSystem =
{ {
config, config,
lib,
pkgs, pkgs,
pkgsCuda, pkgsCuda,
pkgsRocm, pkgsRocm,
@ -81,15 +82,18 @@
{ {
# We don't use the overlay here so as to avoid making too many instances of nixpkgs, # We don't use the overlay here so as to avoid making too many instances of nixpkgs,
# cf. https://zimbatm.com/notes/1000-instances-of-nixpkgs # cf. https://zimbatm.com/notes/1000-instances-of-nixpkgs
packages = { packages =
default = (pkgs.callPackage .devops/nix/scope.nix { inherit llamaVersion; }).llama-cpp; {
opencl = config.packages.default.override { useOpenCL = true; }; default = (pkgs.callPackage .devops/nix/scope.nix { inherit llamaVersion; }).llama-cpp;
cuda = (pkgsCuda.callPackage .devops/nix/scope.nix { inherit llamaVersion; }).llama-cpp; }
rocm = (pkgsRocm.callPackage .devops/nix/scope.nix { inherit llamaVersion; }).llama-cpp; // lib.optionalAttrs pkgs.stdenv.isLinux {
opencl = config.packages.default.override { useOpenCL = true; };
cuda = (pkgsCuda.callPackage .devops/nix/scope.nix { inherit llamaVersion; }).llama-cpp;
rocm = (pkgsRocm.callPackage .devops/nix/scope.nix { inherit llamaVersion; }).llama-cpp;
mpi-cpu = config.packages.default.override { useMpi = true; }; mpi-cpu = config.packages.default.override { useMpi = true; };
mpi-cuda = config.packages.default.override { useMpi = true; }; mpi-cuda = config.packages.default.override { useMpi = true; };
}; };
}; };
}; };
} }