mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-25 02:44:36 +00:00
nix: .#widnows: init
initial nix build for windows using zig mingwW64 build removes nix zig windows build removes nix zig windows build removed unnessesary glibc.static removed unnessesary import of pkgs in nix fixed missing trailing newline on non-windows nix builds overriding stdenv when building for crosscompiling to windows in nix better variables when crosscompiling windows in nix cross compile windows on macos removed trailing whitespace remove unnessesary overwrite of "CMAKE_SYSTEM_NAME" in nix windows build nix: keep file extension when copying result files during cross compile for windows nix: better checking for file extensions when using MinGW nix: using hostPlatform instead of targetPlatform when cross compiling for Windows using hostPlatform.extensions.executable to extract executable format
This commit is contained in:
parent
d0e2f6416b
commit
f6a0f5c642
@ -67,6 +67,8 @@ let
|
|||||||
strings.optionalString (suffices != [ ])
|
strings.optionalString (suffices != [ ])
|
||||||
", accelerated with ${strings.concatStringsSep ", " suffices}";
|
", accelerated with ${strings.concatStringsSep ", " suffices}";
|
||||||
|
|
||||||
|
executableSuffix = effectiveStdenv.hostPlatform.extensions.executable;
|
||||||
|
|
||||||
# TODO: package the Python in this repository in a Nix-like way.
|
# TODO: package the Python in this repository in a Nix-like way.
|
||||||
# It'd be nice to migrate to buildPythonPackage, as well as ensure this repo
|
# It'd be nice to migrate to buildPythonPackage, as well as ensure this repo
|
||||||
# is PEP 517-compatible, and ensure the correct .dist-info is generated.
|
# is PEP 517-compatible, and ensure the correct .dist-info is generated.
|
||||||
@ -244,8 +246,8 @@ effectiveStdenv.mkDerivation (
|
|||||||
# TODO(SomeoneSerge): It's better to add proper install targets at the CMake level,
|
# TODO(SomeoneSerge): It's better to add proper install targets at the CMake level,
|
||||||
# if they haven't been added yet.
|
# if they haven't been added yet.
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mv $out/bin/main $out/bin/llama
|
mv $out/bin/main${executableSuffix} $out/bin/llama${executableSuffix}
|
||||||
mv $out/bin/server $out/bin/llama-server
|
mv $out/bin/server${executableSuffix} $out/bin/llama-server${executableSuffix}
|
||||||
mkdir -p $out/include
|
mkdir -p $out/include
|
||||||
cp $src/llama.h $out/include/
|
cp $src/llama.h $out/include/
|
||||||
'';
|
'';
|
||||||
|
@ -155,6 +155,9 @@
|
|||||||
{
|
{
|
||||||
default = config.legacyPackages.llamaPackages.llama-cpp;
|
default = config.legacyPackages.llamaPackages.llama-cpp;
|
||||||
vulkan = config.packages.default.override { useVulkan = true; };
|
vulkan = config.packages.default.override { useVulkan = true; };
|
||||||
|
windows = config.legacyPackages.llamaPackages.llama-cpp.override {
|
||||||
|
stdenv = pkgs.pkgsCross.mingwW64.stdenv;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs pkgs.stdenv.isLinux {
|
// lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||||
opencl = config.packages.default.override { useOpenCL = true; };
|
opencl = config.packages.default.override { useOpenCL = true; };
|
||||||
|
Loading…
Reference in New Issue
Block a user