Add switch for dxvk-async.
This commit is contained in:
parent
21cd505119
commit
780f0f5bb7
10
default.nix
10
default.nix
|
@ -4,6 +4,8 @@
|
|||
prefixBaseDir ? "$HOME/.winenix",
|
||||
binName ? "starcitizen",
|
||||
launcherArgs ? [ "--use-gl=osmesa" ],
|
||||
dxvkPatches ? [ ],
|
||||
dxvkAsync ? false,
|
||||
winePackage ? pkgs.wineWowPackages.unstable,
|
||||
wineGlobalEnv ? [ "DXVK_STATE_CACHE=0" ],
|
||||
winePatches ? [ ./patches/joyaxis.patch ],
|
||||
|
@ -22,8 +24,10 @@ let
|
|||
winePkg = winePackage.overrideAttrs (attrs: {
|
||||
patches = attrs.patches ++ winePatches;
|
||||
});
|
||||
dxvk = (pkgsCross.mingwW64.callPackage ./dxvk.nix { async = dxvkAsync; }).overrideAttrs
|
||||
( attrs: { patches = attrs.patches ++ dxvkPatches; });
|
||||
dxvkAsyncEnv = "DXVK_ASYNC=1" ;
|
||||
|
||||
dxvk = (with import ~/repositories/nixpkgs/default.nix {}; pkgsCross.mingwW64.callPackage ./dxvk.nix { });
|
||||
fonts = pkgs.callPackage ./fonts.nix {};
|
||||
wine64 = "${winePkg}/bin/wine64";
|
||||
wineMulti = "${winePkg}/bin/wine";
|
||||
|
@ -149,7 +153,9 @@ let
|
|||
export WINEPREFIX="${prefixBaseDir}/$uuid"
|
||||
|
||||
#export all global env vars
|
||||
${lib.concatMapStrings (x: "export " + x + "\n") wineGlobalEnv }
|
||||
${lib.concatMapStrings (x: "export " + x + "\n") (wineGlobalEnv
|
||||
++ lib.lists.optional dxvkAsync dxvkAsyncEnv
|
||||
)}
|
||||
|
||||
#parse input
|
||||
case "$@" in
|
||||
|
|
12
dxvk.nix
12
dxvk.nix
|
@ -1,15 +1,25 @@
|
|||
{ stdenv, lib, fetchFromGitHub, glslang, buildPackages, writeScriptBin, pkgs, pkgsCross }:
|
||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, glslang, buildPackages, writeScriptBin, pkgs, pkgsCross,
|
||||
async ? false
|
||||
}:
|
||||
|
||||
let
|
||||
fix = writeScriptBin "x86_64-w64-mingw32-windres" ''
|
||||
#!${stdenv.shell}
|
||||
exec ${pkgsCross.mingwW64.buildPackages.binutils.bintools}/bin/x86_64-w64-mingw32-windres --preprocessor=x86_64-w64-mingw32-gcc --preprocessor-arg=-E --preprocessor-arg=-xc --preprocessor-arg=-DRC_INVOKED $@
|
||||
'';
|
||||
asyncPatch = (fetchpatch {
|
||||
name = "dxvk-async";
|
||||
url = "https://raw.githubusercontent.com/Sporif/dxvk-async/8911d6da0f838efc8fbbea805da522be4e1ad6c3/dxvk-async.patch";
|
||||
sha256 = "0mr43flzim25lfq73pac94ah07yrr86n82fzsx47lxlcmsh9zhrq";
|
||||
});
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "dxvk";
|
||||
version = "1.9";
|
||||
|
||||
patches = []
|
||||
++ lib.lists.optional async asyncPatch;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "doitsujin";
|
||||
repo = "dxvk";
|
||||
|
|
Loading…
Reference in a new issue