mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 14:32:59 +00:00
moltenvk: update for the new xcbuild, the new SDK, and the new version plus cleanup (#346962)
This commit is contained in:
commit
b0cfb8ec2b
@ -39,7 +39,7 @@
|
||||
waylandSupport ? false,
|
||||
x11Support ? false,
|
||||
embedInstallers ? false, # The Mono and Gecko MSI installers
|
||||
moltenvk ? darwin.moltenvk # Allow users to override MoltenVK easily
|
||||
moltenvk # Allow users to override MoltenVK easily
|
||||
}:
|
||||
|
||||
let wine-build = build: release:
|
||||
|
@ -19,6 +19,7 @@
|
||||
libsepol,
|
||||
libxcb,
|
||||
makeBinaryWrapper,
|
||||
moltenvk,
|
||||
nix-update-script,
|
||||
ocl-icd,
|
||||
opencl-headers,
|
||||
@ -119,7 +120,7 @@ stdenv'.mkDerivation (finalAttrs: {
|
||||
MediaRemote
|
||||
OpenCL
|
||||
SystemConfiguration
|
||||
darwin.moltenvk
|
||||
moltenvk
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -3,19 +3,16 @@
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
gitUpdater,
|
||||
apple-sdk_14,
|
||||
darwinMinVersionHook,
|
||||
cereal,
|
||||
libcxx,
|
||||
glslang,
|
||||
simd,
|
||||
spirv-cross,
|
||||
spirv-headers,
|
||||
spirv-tools,
|
||||
vulkan-headers,
|
||||
xcbuild,
|
||||
AppKit,
|
||||
Foundation,
|
||||
Metal,
|
||||
QuartzCore,
|
||||
xcbuildHook,
|
||||
enableStatic ? stdenv.hostPlatform.isStatic,
|
||||
# MoltenVK supports using private APIs to implement some Vulkan functionality.
|
||||
# Applications that use private APIs can’t be distributed on the App Store,
|
||||
@ -26,23 +23,22 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "MoltenVK";
|
||||
version = "1.2.9";
|
||||
version = "1.2.10";
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
buildInputs = [
|
||||
AppKit
|
||||
Foundation
|
||||
Metal
|
||||
QuartzCore
|
||||
apple-sdk_14
|
||||
cereal
|
||||
(darwinMinVersionHook "10.15")
|
||||
glslang
|
||||
simd
|
||||
spirv-cross
|
||||
spirv-headers
|
||||
spirv-tools
|
||||
vulkan-headers
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ xcbuild ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
@ -54,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
owner = "KhronosGroup";
|
||||
repo = "MoltenVK";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-9k7NMw2M6IqCUQNBekzDaS6VYAOKwPmuCfJkENQ7oiI=";
|
||||
hash = "sha256-5hc+bnsyc8Am9My2kzsU7fv+1CePCHgxL82Mxz/zJRo=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@ -95,6 +91,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# Link glslang source because MoltenVK needs non-public headers to build.
|
||||
mkdir -p build/include
|
||||
ln -s "${glslang.src}" "build/include/glslang"
|
||||
|
||||
# MoltenVK should be using SPIRV_CROSS_NAMESPACE instead of hardcoding the namespace.
|
||||
substituteInPlace MoltenVK/MoltenVK/GPUObjects/MVKDescriptorSet.mm \
|
||||
--replace-fail MVK_spirv_cross SPIRV_CROSS_NAMESPACE
|
||||
'';
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString (
|
||||
@ -117,25 +117,25 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"-lspirv-cross-reflect"
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
preBuild = ''
|
||||
NIX_CFLAGS_COMPILE+=" \
|
||||
-I$NIX_BUILD_TOP/$sourceRoot/build/include \
|
||||
-I$NIX_BUILD_TOP/$sourceRoot/Common"
|
||||
|
||||
xcodebuild build \
|
||||
SYMROOT=$PWD/Products OBJROOT=$PWD/Intermedates \
|
||||
-jobs $NIX_BUILD_CORES \
|
||||
-configuration Release \
|
||||
-project MoltenVKPackaging.xcodeproj \
|
||||
-scheme 'MoltenVK Package (macOS only)' \
|
||||
-destination generic/platform=macOS \
|
||||
-arch ${stdenv.hostPlatform.darwinArch}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
xcbuildFlags = [
|
||||
"-configuration"
|
||||
"Release"
|
||||
"-project"
|
||||
"MoltenVKPackaging.xcodeproj"
|
||||
"-scheme"
|
||||
"MoltenVK Package (macOS only)"
|
||||
"-destination"
|
||||
"generic/platform=macOS"
|
||||
"-arch"
|
||||
stdenv.hostPlatform.darwinArch
|
||||
];
|
||||
|
||||
postBuild =
|
||||
if enableStatic then
|
||||
''
|
||||
@ -187,6 +187,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
passthru.updateScript = gitUpdater {
|
||||
rev-prefix = "v";
|
||||
ignoredVersions = ".*-(beta|rc).*";
|
@ -2670,7 +2670,6 @@ with pkgs;
|
||||
dolphin-emu = qt6Packages.callPackage ../applications/emulators/dolphin-emu {
|
||||
stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv;
|
||||
inherit (darwin.apple_sdk_11_0.frameworks) CoreBluetooth ForceFeedback IOBluetooth IOKit OpenGL VideoToolbox;
|
||||
inherit (darwin) moltenvk;
|
||||
};
|
||||
|
||||
dolphin-emu-primehack = qt5.callPackage ../applications/emulators/dolphin-emu/primehack.nix {
|
||||
@ -23512,9 +23511,8 @@ with pkgs;
|
||||
|
||||
vulkan-extension-layer = callPackage ../tools/graphics/vulkan-extension-layer { };
|
||||
vulkan-headers = callPackage ../development/libraries/vulkan-headers { };
|
||||
vulkan-loader = callPackage ../development/libraries/vulkan-loader { inherit (darwin) moltenvk; };
|
||||
vulkan-loader = callPackage ../development/libraries/vulkan-loader { };
|
||||
vulkan-tools = callPackage ../tools/graphics/vulkan-tools {
|
||||
inherit (darwin) moltenvk;
|
||||
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa;
|
||||
};
|
||||
vulkan-tools-lunarg = callPackage ../tools/graphics/vulkan-tools-lunarg { };
|
||||
@ -35217,9 +35215,7 @@ with pkgs;
|
||||
quakespasm = callPackage ../games/quakespasm {
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa CoreAudio CoreFoundation IOKit OpenGL;
|
||||
};
|
||||
vkquake = callPackage ../games/quakespasm/vulkan.nix {
|
||||
inherit (darwin) moltenvk;
|
||||
};
|
||||
vkquake = callPackage ../games/quakespasm/vulkan.nix { };
|
||||
|
||||
ioquake3 = callPackage ../games/quake3/ioquake { };
|
||||
quake3e = callPackage ../games/quake3/quake3e { };
|
||||
|
@ -68,6 +68,10 @@ mapAliases ({
|
||||
libauto = throw "'darwin.libauto' has been removed, as it was broken and unmaintained"; # added 2024-05-10
|
||||
libtapi = pkgs.libtapi; # 2024-08-16
|
||||
|
||||
### M ###
|
||||
|
||||
moltenvk = pkgs.moltenvk; # 2024-10-06
|
||||
|
||||
### O ###
|
||||
|
||||
opencflite = pkgs.opencflite; # added 2024-05-02
|
||||
|
@ -206,15 +206,6 @@ impure-cmds // apple-source-packages // apple-source-headers // stubs // {
|
||||
|
||||
lsusb = callPackage ../os-specific/darwin/lsusb { };
|
||||
|
||||
moltenvk = callPackage ../os-specific/darwin/moltenvk {
|
||||
stdenv = pkgs.overrideSDK stdenv {
|
||||
darwinMinVersion = "10.15";
|
||||
darwinSdkVersion = "12.3";
|
||||
};
|
||||
inherit (apple_sdk.frameworks) AppKit Foundation Metal QuartzCore;
|
||||
inherit (apple_sdk.libs) simd;
|
||||
};
|
||||
|
||||
openwith = callPackage ../os-specific/darwin/openwith { };
|
||||
|
||||
stubs = pkgs.callPackages ../os-specific/darwin/stubs { };
|
||||
|
Loading…
Reference in New Issue
Block a user