2022-03-10 19:12:11 +00:00
|
|
|
{ lib
|
2022-03-30 09:31:56 +00:00
|
|
|
, stdenvNoCC
|
2022-03-10 19:12:11 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pkgsCross
|
2023-02-02 18:25:31 +00:00
|
|
|
, stdenv
|
|
|
|
, bash
|
2022-03-10 19:12:11 +00:00
|
|
|
}:
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
stdenvNoCC.mkDerivation (finalAttrs:
|
|
|
|
let
|
2023-07-15 17:15:38 +00:00
|
|
|
dxvk32 = if stdenv.isDarwin
|
|
|
|
then pkgsCross.mingw32.dxvk_1.override { enableMoltenVKCompat = true; }
|
|
|
|
else pkgsCross.mingw32.dxvk_2;
|
|
|
|
dxvk64 = if stdenv.isDarwin
|
|
|
|
then pkgsCross.mingwW64.dxvk_1.override { enableMoltenVKCompat = true; }
|
|
|
|
else pkgsCross.mingwW64.dxvk_2;
|
2022-06-16 17:23:12 +00:00
|
|
|
in
|
|
|
|
{
|
2023-03-15 16:39:30 +00:00
|
|
|
pname = "dxvk";
|
2023-02-02 18:25:31 +00:00
|
|
|
inherit (dxvk64) version;
|
2022-03-10 19:12:11 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "bin" "lib" ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
dontUnpack = true;
|
2022-03-10 19:12:11 +00:00
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $bin $lib
|
2023-02-02 18:25:31 +00:00
|
|
|
substitute ${./setup_dxvk.sh} $out/bin/setup_dxvk.sh \
|
|
|
|
--subst-var-by bash ${bash} \
|
|
|
|
--subst-var-by dxvk32 ${dxvk32} \
|
|
|
|
--subst-var-by dxvk64 ${dxvk64} \
|
2023-07-15 17:15:38 +00:00
|
|
|
--subst-var-by mcfgthreads32 "${pkgsCross.mingw32.windows.mcfgthreads_pre_gcc_13}" \
|
|
|
|
--subst-var-by mcfgthreads64 "${pkgsCross.mingwW64.windows.mcfgthreads_pre_gcc_13}"
|
2022-03-10 19:12:11 +00:00
|
|
|
chmod a+x $out/bin/setup_dxvk.sh
|
|
|
|
declare -A dxvks=( [x32]=${dxvk32} [x64]=${dxvk64} )
|
|
|
|
for arch in "''${!dxvks[@]}"; do
|
|
|
|
ln -s "''${dxvks[$arch]}/bin" $bin/$arch
|
|
|
|
ln -s "''${dxvks[$arch]}/lib" $lib/$arch
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2023-02-02 18:25:31 +00:00
|
|
|
description = "Setup script for DXVK";
|
2022-03-10 19:12:11 +00:00
|
|
|
homepage = "https://github.com/doitsujin/dxvk";
|
|
|
|
changelog = "https://github.com/doitsujin/dxvk/releases";
|
|
|
|
maintainers = [ lib.maintainers.reckenrode ];
|
|
|
|
license = lib.licenses.zlib;
|
2022-06-16 17:23:12 +00:00
|
|
|
platforms = [ "x86_64-darwin" "i686-linux" "x86_64-linux" ];
|
2022-03-10 19:12:11 +00:00
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
})
|