You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
941 B

{ stdenv, lib, fetchFromGitHub, glslang, buildPackages, writeScriptBin, pkgs, pkgsCross }:
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 $@
'';
in stdenv.mkDerivation rec {
pname = "dxvk";
version = "1.9";
src = fetchFromGitHub {
owner = "doitsujin";
repo = "dxvk";
rev = "v${version}";
sha256 = "01db23ncbrrq0cqnp25fg5plp88v5i5ri0i38m0wida8mw3mmjsa";
};
CFLAGS="-fstack-protector";
CPPFLAGS="-fstack-protector";
mesonFlags = [ "--cross-file build-win64.txt" "--buildtype release" ];
depsBuildBuild = [
fix
buildPackages.gcc
buildPackages.meson
buildPackages.ninja
glslang
];
depsBuildTarget = [
pkgs.windows.pthreads
];
}