From e9f17dc3bf0da76c8b35130f9ca2fda5246c418e Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Tue, 26 Mar 2024 16:22:42 +0000 Subject: [PATCH] nix: .#windows: proper cross-compilation set-up Take all dependencies from the cross stage, rather tha only stdenv --- flake.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index cdce3e0a9..9cd3756e5 100644 --- a/flake.nix +++ b/flake.nix @@ -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; }; }; @@ -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; };