Skip to content

Commit

Permalink
nix: .#windows: proper cross-compilation set-up
Browse files Browse the repository at this point in the history
Take all dependencies from the cross stage, rather tha only stdenv
  • Loading branch information
SomeoneSerge committed Mar 28, 2024
1 parent 22a462c commit e9f17dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
# the same path you would with an overlay.
legacyPackages = {
llamaPackages = pkgs.callPackage .devops/nix/scope.nix { inherit llamaVersion; };
llamaPackagesWindows = pkgs.pkgsCross.mingwW64.callPackage .devops/nix/scope.nix { inherit llamaVersion; };
llamaPackagesCuda = pkgsCuda.callPackage .devops/nix/scope.nix { inherit llamaVersion; };
llamaPackagesRocm = pkgsRocm.callPackage .devops/nix/scope.nix { inherit llamaVersion; };
};
Expand All @@ -155,9 +156,7 @@
{
default = config.legacyPackages.llamaPackages.llama-cpp;
vulkan = config.packages.default.override { useVulkan = true; };
windows = config.legacyPackages.llamaPackages.llama-cpp.override {
stdenv = pkgs.pkgsCross.mingwW64.stdenv;
};
windows = config.legacyPackages.llamaPackagesWindows.llama-cpp;
}
// lib.optionalAttrs pkgs.stdenv.isLinux {
opencl = config.packages.default.override { useOpenCL = true; };
Expand Down

0 comments on commit e9f17dc

Please sign in to comment.