3
0
Fork 0
forked from mirrors/nixpkgs

dxvk: rely on the cross support in nixpkgs

The `isCross` check is broken. When cross-compiling, it incorrectly
evaluates to false. DXVK has been building using the Meson
cross-compilation support in nixpkgs instead of with upstream’s cross
file. Instead of fixing `isCross`, just drop it as unnecessary.
This commit is contained in:
Randy Eckenrode 2023-11-13 17:31:30 -05:00
parent 2f8742189e
commit 413cd10b6a
No known key found for this signature in database
GPG key ID: 64C1CD4EC2A600D9
2 changed files with 9 additions and 24 deletions

View file

@ -9,9 +9,6 @@
, enableMoltenVKCompat ? false
}:
let
isCross = stdenv.hostPlatform != stdenv.targetPlatform;
in
stdenv.mkDerivation (finalAttrs: {
pname = "dxvk";
version = "1.10.3";
@ -36,15 +33,10 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ glslang meson ninja ];
buildInputs = [ windows.pthreads ];
mesonFlags =
let
arch = if stdenv.is32bit then "32" else "64";
in
[
"--buildtype" "release"
"--prefix" "${placeholder "out"}"
]
++ lib.optionals isCross [ "--cross-file" "build-win${arch}.txt" ];
mesonFlags = [
"--buildtype" "release"
"--prefix" "${placeholder "out"}"
];
meta = {
description = "A Vulkan-based translation layer for Direct3D 9/10/11";

View file

@ -19,7 +19,6 @@
assert !sdl2Support || !glfwSupport;
let
isCross = stdenv.hostPlatform != stdenv.targetPlatform;
isWindows = stdenv.hostPlatform.uname.system == "Windows";
in
stdenv.mkDerivation (finalAttrs: {
@ -51,18 +50,12 @@ stdenv.mkDerivation (finalAttrs: {
mkdir -p include/spirv/include include/vulkan/include
'';
mesonFlags =
let
arch = if stdenv.is32bit then "32" else "64";
in
[
"--buildtype" "release"
"--prefix" "${placeholder "out"}"
]
++ lib.optionals isCross [ "--cross-file" "build-win${arch}.txt" ]
++ lib.optional glfwSupport "-Ddxvk_native_wsi=glfw";
mesonFlags = [
"--buildtype" "release"
"--prefix" "${placeholder "out"}"
] ++ lib.optional glfwSupport "-Ddxvk_native_wsi=glfw";
doCheck = !isCross;
doCheck = true;
passthru.updateScript = gitUpdater { rev-prefix = "v"; };