Skip to content

Commit

Permalink
Merge pull request #267322 from reckenrode/dxvk-nixpkgs-cross
Browse files Browse the repository at this point in the history
dxvk: rely on the cross support in nixpkgs
  • Loading branch information
wegank authored Nov 17, 2023
2 parents 4774c53 + 413cd10 commit cf4fee6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
16 changes: 4 additions & 12 deletions pkgs/by-name/dx/dxvk_1/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
, enableMoltenVKCompat ? false
}:

let
isCross = stdenv.hostPlatform != stdenv.targetPlatform;
in
stdenv.mkDerivation (finalAttrs: {
pname = "dxvk";
version = "1.10.3";
Expand All @@ -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";
Expand Down
17 changes: 5 additions & 12 deletions pkgs/by-name/dx/dxvk_2/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
assert !sdl2Support || !glfwSupport;

let
isCross = stdenv.hostPlatform != stdenv.targetPlatform;
isWindows = stdenv.hostPlatform.uname.system == "Windows";
in
stdenv.mkDerivation (finalAttrs: {
Expand Down Expand Up @@ -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"; };

Expand Down

0 comments on commit cf4fee6

Please sign in to comment.