mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
parent
67a2ceab6a
commit
81a86d07e6
@ -9,8 +9,15 @@
|
|||||||
, spirv-headers
|
, spirv-headers
|
||||||
, vulkan-headers
|
, vulkan-headers
|
||||||
, SDL2
|
, SDL2
|
||||||
|
, glfw
|
||||||
|
, pkgsBuildHost
|
||||||
|
, sdl2Support ? true
|
||||||
|
, glfwSupport ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
# SDL2 and GLFW support are mutually exclusive.
|
||||||
|
assert !sdl2Support || !glfwSupport;
|
||||||
|
|
||||||
let
|
let
|
||||||
# DXVK 2.0+ no longer vendors certain dependencies. This derivation also needs to build on Darwin,
|
# DXVK 2.0+ no longer vendors certain dependencies. This derivation also needs to build on Darwin,
|
||||||
# which does not currently support DXVK 2.0, so adapt conditionally for this situation.
|
# which does not currently support DXVK 2.0, so adapt conditionally for this situation.
|
||||||
@ -36,13 +43,13 @@ let
|
|||||||
./darwin-thread-primitives.patch
|
./darwin-thread-primitives.patch
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"2.0" = rec {
|
"2.1" = rec {
|
||||||
version = "2.0";
|
version = "2.1";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "doitsujin";
|
owner = "doitsujin";
|
||||||
repo = "dxvk";
|
repo = "dxvk";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-mSNFvoILsvm+CpWV7uRlb7DkjV7ctClSUdteNcF5EAY=";
|
hash = "sha256-A4KR11brfQbR56dGt371MRwMN/H6HFAU8TlFC97/bRs=";
|
||||||
fetchSubmodules = true; # Needed for the DirectX headers and libdisplay-info
|
fetchSubmodules = true; # Needed for the DirectX headers and libdisplay-info
|
||||||
};
|
};
|
||||||
patches = [ ];
|
patches = [ ];
|
||||||
@ -61,8 +68,14 @@ stdenv.mkDerivation {
|
|||||||
++ lib.optionals isDxvk2 (
|
++ lib.optionals isDxvk2 (
|
||||||
[ spirv-headers vulkan-headers ]
|
[ spirv-headers vulkan-headers ]
|
||||||
++ lib.optional (!isWindows && sdl2Support) SDL2
|
++ lib.optional (!isWindows && sdl2Support) SDL2
|
||||||
|
++ lib.optional (!isWindows && glfwSupport) glfw
|
||||||
);
|
);
|
||||||
|
|
||||||
|
postPatch = lib.optionalString isDxvk2 ''
|
||||||
|
substituteInPlace "subprojects/libdisplay-info/tool/gen-search-table.py" \
|
||||||
|
--replace "/usr/bin/env python3" "${lib.getBin pkgsBuildHost.python3}/bin/python3"
|
||||||
|
'';
|
||||||
|
|
||||||
# Build with the Vulkan SDK in nixpkgs.
|
# Build with the Vulkan SDK in nixpkgs.
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
rm -rf include/spirv/include include/vulkan/include
|
rm -rf include/spirv/include include/vulkan/include
|
||||||
@ -77,7 +90,8 @@ stdenv.mkDerivation {
|
|||||||
"--buildtype" "release"
|
"--buildtype" "release"
|
||||||
"--prefix" "${placeholder "out"}"
|
"--prefix" "${placeholder "out"}"
|
||||||
]
|
]
|
||||||
++ lib.optionals isCross [ "--cross-file" "build-win${arch}.txt" ];
|
++ lib.optionals isCross [ "--cross-file" "build-win${arch}.txt" ]
|
||||||
|
++ lib.optional glfwSupport "-Ddxvk_native_wsi=glfw";
|
||||||
|
|
||||||
doCheck = isDxvk2 && !isCross;
|
doCheck = isDxvk2 && !isCross;
|
||||||
|
|
||||||
|
@ -37210,7 +37210,7 @@ with pkgs;
|
|||||||
|
|
||||||
dxvk = callPackage ../misc/dxvk { };
|
dxvk = callPackage ../misc/dxvk { };
|
||||||
dxvk_1 = callPackage ../misc/dxvk/dxvk.nix { dxvkVersion = "1.10"; };
|
dxvk_1 = callPackage ../misc/dxvk/dxvk.nix { dxvkVersion = "1.10"; };
|
||||||
dxvk_2 = callPackage ../misc/dxvk/dxvk.nix { dxvkVersion = "2.0"; };
|
dxvk_2 = callPackage ../misc/dxvk/dxvk.nix { dxvkVersion = "2.1"; };
|
||||||
|
|
||||||
ecdsatool = callPackage ../tools/security/ecdsatool { };
|
ecdsatool = callPackage ../tools/security/ecdsatool { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user