Merge pull request #331789 from museoa/vkd3d-proton
vkd3d-proton: 2.8-unstable-2023-04-21 -> 2.13
This commit is contained in:
commit
c07ed4a6ee
pkgs
by-name/vk/vkd3d-proton
development/libraries/vkd3d-proton
top-level
50
pkgs/by-name/vk/vkd3d-proton/package.nix
Normal file
50
pkgs/by-name/vk/vkd3d-proton/package.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
lib,
|
||||
callPackage,
|
||||
glslang,
|
||||
meson,
|
||||
ninja,
|
||||
stdenv,
|
||||
wine,
|
||||
}:
|
||||
|
||||
let
|
||||
sources = callPackage ./sources.nix { };
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
inherit (sources.vkd3d-proton) pname version src;
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
glslang
|
||||
meson
|
||||
ninja
|
||||
wine
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace meson.build \
|
||||
--replace-fail "vkd3d_build = vcs_tag(" \
|
||||
"vkd3d_build = vcs_tag( fallback : '$(cat .nixpkgs-auxfiles/vkd3d_build)'", \
|
||||
--replace-fail "vkd3d_version = vcs_tag(" \
|
||||
"vkd3d_version = vcs_tag( fallback : '$(cat .nixpkgs-auxfiles/vkd3d_version)'",
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit sources;
|
||||
};
|
||||
|
||||
meta = {
|
||||
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 = with lib.licenses; [ lgpl21Plus ];
|
||||
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||
inherit (wine.meta) platforms;
|
||||
};
|
||||
})
|
39
pkgs/by-name/vk/vkd3d-proton/sources.nix
Normal file
39
pkgs/by-name/vk/vkd3d-proton/sources.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{ fetchFromGitHub }:
|
||||
|
||||
{
|
||||
vkd3d-proton =
|
||||
let
|
||||
self = {
|
||||
pname = "vkd3d-proton";
|
||||
version = "2.13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "HansKristian-Work";
|
||||
repo = "vkd3d-proton";
|
||||
rev = "v${self.version}";
|
||||
fetchSubmodules = true;
|
||||
#
|
||||
# Some files are filled by using Git commands; it requires deepClone.
|
||||
# More info at `checkout_ref` function in nix-prefetch-git.
|
||||
# However, `.git` is a bit nondeterministic (and Git itself makes no
|
||||
# guarrantees whatsoever).
|
||||
# Then, in order to enhance reproducibility, what we will do here is:
|
||||
#
|
||||
# - Execute the desired Git commands;
|
||||
# - Save the obtained info into files;
|
||||
# - Remove `.git` afterwards.
|
||||
#
|
||||
deepClone = true;
|
||||
postFetch = ''
|
||||
cd $out
|
||||
mkdir -p .nixpkgs-auxfiles/
|
||||
git describe --always --exclude='*' --abbrev=15 --dirty=0 > .nixpkgs-auxfiles/vkd3d_build
|
||||
git describe --always --tags --dirty=+ > .nixpkgs-auxfiles/vkd3d_version
|
||||
find $out -name .git -print0 | xargs -0 rm -fr
|
||||
'';
|
||||
hash = "sha256-dJYQ6pJdfRQwr8OrxxpWG6YMfeTXqzTrHXDd5Ecxbi8=";
|
||||
};
|
||||
};
|
||||
in
|
||||
self;
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
{ 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;
|
||||
hash = "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;
|
||||
};
|
||||
}
|
@ -24188,8 +24188,6 @@ with pkgs;
|
||||
hdf5 = hdf5.override { usev110Api = true; };
|
||||
};
|
||||
|
||||
vkd3d-proton = callPackage ../development/libraries/vkd3d-proton {};
|
||||
|
||||
vkdisplayinfo = callPackage ../tools/graphics/vkdisplayinfo { };
|
||||
|
||||
vkdt = callPackage ../applications/graphics/vkdt { };
|
||||
|
Loading…
Reference in New Issue
Block a user