Merge pull request #170366 from sgillespie/master

This commit is contained in:
Ellie Hermaszewska 2022-04-28 09:01:26 +08:00 committed by GitHub
commit 1e7de90ad1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 100 additions and 29 deletions

View File

@ -9,13 +9,13 @@
}:
stdenv.mkDerivation rec {
pname = "glslang";
version = "1.2.198.0";
version = "1.3.211.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "glslang";
rev = "sdk-${version}";
sha256 = "sha256-FRiqsfoyjUW2kbbphxcy0Hn0TLVaszatM/nnWBrchRY=";
sha256 = "sha256-YLn/Mxuk6mXPGtBBgfwky5Nl1TCAW6i2g+AZLzqVz+A=";
};
# These get set at all-packages, keep onto them for child drvs

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "spirv-headers";
version = "1.2.198.0";
version = "1.3.211.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
rev = "sdk-${version}";
sha256 = "sha256-cdEiRSCoX0New8ecUh7UTDz/is2v29zhf6Il2N1j3mw=";
sha256 = "sha256-LkIrTFWYvZffLVJJW3152um5LTEsMJEDEsIhBAdhBlk=";
};
nativeBuildInputs = [ cmake ];

View File

@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "vulkan-headers";
version = "1.2.198.0";
version = "1.3.211.0";
nativeBuildInputs = [ cmake ];
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
owner = "KhronosGroup";
repo = "Vulkan-Headers";
rev = "sdk-${version}";
sha256 = "sha256-SvC0AX1wIZWLzws3ZS8Wi8fbNUw1+An/PRlFIfNj24Y=";
sha256 = "sha256-FqrcFHsUS8e4ZgZpxVc8nNZWdNltniFmMjyyWVoNc7w=";
};
meta = with lib; {

View File

@ -3,14 +3,14 @@
stdenv.mkDerivation rec {
pname = "vulkan-loader";
version = "1.2.198.0";
version = "1.3.211.0";
src = (assert version == vulkan-headers.version;
fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Loader";
rev = "sdk-${version}";
sha256 = "sha256-k3eCdZqCjFxpKa0pZ0K4XcORxdSOlr1dFa7C3Qzi04Y=";
sha256 = "sha256-NQu98wA7UK231rpoKDs1yQ6pEyB4wZg7MjFC3JwS2BY=";
});
nativeBuildInputs = [ cmake pkg-config ];

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "spirv-tools";
version = "1.2.198.0";
version = "1.3.211.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "sdk-${version}";
sha256 = "sha256-8EJbTPY5dvsqx32POf2HcCV3j2fA68GtGZA66l9V4TI=";
sha256 = "sha256-DoE+UCJOTB8JidC208wgfV1trZC4r9uFvwRPUhJVaII=";
};
nativeBuildInputs = [ cmake python3 ];

View File

@ -1,10 +1,15 @@
{ lib
, callPackage
, stdenv
, fetchFromGitHub
, cmake
, pkgconfig
, glslang
, libffi
, libX11
, libXau
, libxcb
, libXdmcp
, libXrandr
, spirv-headers
, spirv-tools
@ -13,16 +18,11 @@
}:
let
robin-hood-hashing = fetchFromGitHub {
owner = "martinus";
repo = "robin-hood-hashing";
rev = "3.11.3"; # pin
sha256 = "1gm3lwjkh6h8m7lfykzd0jzhfqjmjchindkmxc008rwvxafsd1pl";
};
robin-hood-hashing = callPackage ./robin-hood-hashing.nix {};
in
stdenv.mkDerivation rec {
pname = "vulkan-validation-layers";
version = "1.2.198.0";
version = "1.3.211.0";
# If we were to use "dev" here instead of headers, the setupHook would be
# placed in that output instead of "out".
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
owner = "KhronosGroup";
repo = "Vulkan-ValidationLayers";
rev = "sdk-${version}";
sha256 = "sha256-/pnXT55EQZcnjOzY2vBwp+gM6l2hktZHwB9yKP8vVTU=";
sha256 = "sha256-NGpFfekZtB0rvnGxYVDo808xzgBuo8ZC4bjXjQnTpxU=";
});
# Include absolute paths to layer libraries in their associated
@ -45,12 +45,17 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
cmake
pkgconfig
];
buildInputs = [
libX11
libxcb
libXau
libXdmcp
libXrandr
libffi
libxcb
spirv-tools
vulkan-headers
wayland
];
@ -60,6 +65,7 @@ stdenv.mkDerivation rec {
"-DSPIRV_HEADERS_INSTALL_DIR=${spirv-headers}"
"-DROBIN_HOOD_HASHING_INSTALL_DIR=${robin-hood-hashing}"
"-DBUILD_LAYER_SUPPORT_FILES=ON"
"-DPKG_CONFIG_EXECUTABLE=${pkgconfig}/bin/pkg-config"
# Hide dev warnings that are useless for packaging
"-Wno-dev"
];

View File

@ -0,0 +1,33 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
pname = "robin-hood-hashing";
version = "3.11.5"; # pin
src = fetchFromGitHub {
owner = "martinus";
repo = "robin-hood-hashing";
rev = version; # pin
sha256 = "sha256-J4u9Q6cXF0SLHbomP42AAn5LSKBYeVgTooOhqxOIpuM=";
};
nativeBuildInputs = [
cmake
];
cmakeFlags = [
"-DRH_STANDALONE_PROJECT=OFF"
];
meta = with lib; {
description = "A faster, more efficient replacement for std::unordered_map / std::unordered_set";
homepage = "https://github.com/martinus/robin-hood-hashing";
platforms = platforms.linux;
license = licenses.mit;
maintainers = [ ];
};
}

View File

@ -2,14 +2,14 @@
stdenv.mkDerivation rec {
pname = "vulkan-extension-layer";
version = "1.2.198.0";
version = "1.3.211.0";
src = (assert version == vulkan-headers.version;
fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-ExtensionLayer";
rev = "sdk-${version}";
sha256 = "sha256-g674rw8lXyP1WUoJmbRRL7s+1Yxs00sR04+hTQ3l3dE=";
sha256 = "sha256-ixCfHnp6YAOuR4NMTGjhhqkfm0H7ZcO/8xKFJqw16YE=";
});
nativeBuildInputs = [ cmake jq ];

View File

@ -23,14 +23,14 @@
stdenv.mkDerivation rec {
pname = "vulkan-tools-lunarg";
# The version must match that in vulkan-headers
version = "1.2.189.1";
version = "1.3.211.0";
src = (assert version == vulkan-headers.version;
fetchFromGitHub {
owner = "LunarG";
repo = "VulkanTools";
rev = "sdk-${version}";
sha256 = "0431dgplv5wiz8bj0ja91mbpc2qhjgdhqhrgaqarvyvjr1f7jw52";
sha256 = "sha256-Pkz2FV0AnTKm/4jVmkQNkYzpxpKJaSoy2fRAhVh5OKU=";
fetchSubmodules = true;
});

View File

@ -1,9 +1,24 @@
{ stdenv, lib, fetchFromGitHub, cmake, glslang, libX11, libxcb
, libXrandr, vulkan-headers, vulkan-loader, wayland }:
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkgconfig
, glslang
, libffi
, libX11
, libXau
, libxcb
, libXdmcp
, libXrandr
, vulkan-headers
, vulkan-loader
, wayland
, wayland-protocols
}:
stdenv.mkDerivation rec {
pname = "vulkan-tools";
version = "1.2.198.0";
version = "1.3.211.0";
# It's not strictly necessary to have matching versions here, however
# since we're using the SDK version we may as well be consistent with
@ -13,11 +28,27 @@ stdenv.mkDerivation rec {
owner = "KhronosGroup";
repo = "Vulkan-Tools";
rev = "sdk-${version}";
sha256 = "sha256-oNJm9Gi41aA5krkpkQI0EYdIlMcQpdodv9yqXhnNURA=";
sha256 = "sha256-iXsWTKNllPZy1Kpo3JHzEEus3Hu9LofvMB3c4Gn6/DM=";
});
nativeBuildInputs = [ cmake ];
buildInputs = [ glslang libX11 libxcb libXrandr vulkan-headers vulkan-loader wayland ];
nativeBuildInputs = [
cmake
pkgconfig
];
buildInputs = [
glslang
libffi
libX11
libXau
libxcb
libXdmcp
libXrandr
vulkan-headers
vulkan-loader
wayland
wayland-protocols
];
libraryPath = lib.strings.makeLibraryPath [ vulkan-loader ];
@ -28,6 +59,7 @@ stdenv.mkDerivation rec {
"-DBUILD_ICD=OFF"
# vulkaninfo loads libvulkan using dlopen, so we have to add it manually to RPATH
"-DCMAKE_INSTALL_RPATH=${libraryPath}"
"-DPKG_CONFIG_EXECUTABLE=${pkgconfig}/bin/pkg-config"
# Hide dev warnings that are useless for packaging
"-Wno-dev"
];