fix(nix): FINALLY

This commit is contained in:
Nova
2024-08-21 00:49:11 -04:00
parent 7ba710e8b7
commit 499aa2be28
4 changed files with 43 additions and 27 deletions

View File

@@ -3,8 +3,8 @@
let
sk_gpu_zip = fetchurl {
url =
"https://github.com/StereoKit/sk_gpu/releases/download/v2024.8.12/sk_gpu.v2024.8.12.zip";
sha256 = "sha256-NPjOFzu7AlpQKJ8PZYeUuegrR6TXtRyg+Hm2BxIAMLI=";
"https://github.com/StereoKit/sk_gpu/releases/download/v2024.8.16/sk_gpu.v2024.8.16.zip";
sha256 = "sha256-Wk3PZFlWqhrsQ8xG0sQaV2xSasdg2D7TMiPvl/CgtGU=";
};
in stdenv.mkDerivation rec {
name = "sk_gpu";

View File

@@ -1,6 +1,26 @@
{ rustPlatform, src, name, libGL, mesa, xorg, fontconfig, libxkbcommon, libclang
, cmake, cpm-cmake, pkg-config, llvmPackages, fetchFromGitHub, sk_gpu, libXau
, libXdmcp, stdenv, lib }:
{ rustPlatform
, src
, name
, libGL
, mesa
, xorg
, fontconfig
, libxkbcommon
, libclang
, cmake
, cpm-cmake
, pkg-config
, llvmPackages
, fetchFromGitHub
, sk_gpu
, libXau
, libXdmcp
, stdenv
, lib
, openxr-loader
}:
rustPlatform.buildRustPackage rec {
inherit src name;
@@ -8,18 +28,13 @@ rustPlatform.buildRustPackage rec {
lockFile = (src + "/Cargo.lock");
allowBuiltinFetchGit = true;
};
buildFeatures = [ "local_deps" ];
FORCE_LOCAL_DEPS = true;
CPM_LOCAL_PACKAGES_ONLY = true;
CPM_SOURCE_CACHE = "./build";
CPM_USE_LOCAL_PACKAGES = true;
CPM_DOWNLOAD_ALL = false;
openxr_loader = fetchFromGitHub {
owner = "KhronosGroup";
repo = "OpenXR-SDK";
rev = "288d3a7ebc1ad959f62d51da75baa3d27438c499";
sha256 = "sha256-RdmnBe26hqPmqwCHIJolF6bSmZRmIKVlGF+TXAY35ig=";
};
meshoptimizer = fetchFromGitHub {
owner = "zeux";
repo = "meshoptimizer";
@@ -33,9 +48,9 @@ rustPlatform.buildRustPackage rec {
sha256 = "sha256-zBRAXgG5Fi6+5uPQCI/RCGatY6O4ELuYBoKrPNn4K+8=";
};
DEP_OPENXR_LOADER_SOURCE = "${openxr_loader}";
DEP_MESHOPTIMIZER_SOURCE = "${meshoptimizer}";
DEP_BASIS_UNIVERSAL_SOURCE = "${basis_universal}";
DEP_SK_GPU_SOURCE = "${sk_gpu}";
postPatch = let libPath = lib.makeLibraryPath [ stdenv.cc.cc.lib ];
in ''
@@ -65,6 +80,7 @@ rustPlatform.buildRustPackage rec {
libxkbcommon
libXau
libXdmcp
openxr-loader
];
LIBCLANG_PATH = "${libclang.lib}/lib";
}