From 67a6315ba873f60d93d26631256df497c39cf8a9 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Sat, 22 Apr 2023 12:53:46 +0800 Subject: [PATCH] vkd3d-proton: init at unstable-2023-04-21 --- .../libraries/vkd3d-proton/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/libraries/vkd3d-proton/default.nix diff --git a/pkgs/development/libraries/vkd3d-proton/default.nix b/pkgs/development/libraries/vkd3d-proton/default.nix new file mode 100644 index 00000000000..7616db1e021 --- /dev/null +++ b/pkgs/development/libraries/vkd3d-proton/default.nix @@ -0,0 +1,41 @@ +{ lib, stdenv, fetchFromGitHub, meson, ninja, wine, glslang }: + +let + # these are both embedded in the output files + rev = "83308675078e9ea263fa8c37af95afdd15b3ab71"; + # git describe --tags + shortRev = builtins.substring 0 8 rev; + realVersion = "v2.8-302-g${shortRev}"; +in + +stdenv.mkDerivation rec { + pname = "vkd3d-proton"; + version = "unstable-2023-04-21"; + + nativeBuildInputs = [ meson ninja wine glslang ]; + + src = fetchFromGitHub { + owner = "HansKristian-Work"; + repo = pname; + inherit rev; + sha256 = "sha256-iLpVvYmWhqy0rbbyJoT+kxzIqp68Vsb/TkihGtQQucU="; + fetchSubmodules = true; + }; + + prePatch = '' + substituteInPlace meson.build \ + --replace "vkd3d_build = vcs_tag(" \ + "vkd3d_build = vcs_tag( fallback : '${shortRev}'", \ + --replace "vkd3d_version = vcs_tag(" \ + "vkd3d_version = vcs_tag( fallback : '${realVersion}'", + ''; + + meta = with lib; { + homepage = "https://github.com/HansKristian-Work/vkd3d-proton"; + description = + "A fork of VKD3D, which aims to implement the full Direct3D 12 API on top of Vulkan"; + license = licenses.lgpl21; + maintainers = with maintainers; [ expipiplus1 ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b001e9f93f7..a997e22ccc9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24156,6 +24156,8 @@ with pkgs; vkd3d = callPackage ../development/libraries/vkd3d {}; + vkd3d-proton = callPackage ../development/libraries/vkd3d-proton {}; + vkdisplayinfo = callPackage ../tools/graphics/vkdisplayinfo { }; vkdt = callPackage ../applications/graphics/vkdt { };