mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
commit
c1e2855bb7
@ -1,35 +1,32 @@
|
|||||||
{ stdenv, fetchFromGitHub, fetchpatch, cmake, bison, spirv-tools, jq }:
|
{ stdenv, fetchFromGitHub, fetchpatch, cmake, bison, jq, python, spirv-tools, spirv-headers }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "glslang-git-${version}";
|
name = "glslang-${version}";
|
||||||
version = "2018-09-26";
|
version = "7.11.3113";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "KhronosGroup";
|
owner = "KhronosGroup";
|
||||||
repo = "glslang";
|
repo = "glslang";
|
||||||
rev = "91ac4290bcf2cb930b4fb0981f09c00c0b6797e1";
|
rev = "${version}";
|
||||||
sha256 = "0q477pm0n495acnss16ddlf82a6i5l2dfmvc7r8yi0bgmgpzi4av";
|
sha256 = "1kzv2b4q1fddxd7c0hc754nd6rw6y9vijb9fsi13xzzq9dficgb6";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ cmake bison jq ] ++ spirv-tools.buildInputs;
|
nativeBuildInputs = [ cmake python bison jq ];
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools
|
cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools
|
||||||
ln -s "${spirv-tools.headers}" External/spirv-tools/external/spirv-headers
|
ln -s "${spirv-headers.src}" External/spirv-tools/external/spirv-headers
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
HEADERS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools/external/spirv-headers"))[0].commit')
|
HEADERS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools/external/spirv-headers"))[0].commit')
|
||||||
TOOLS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools"))[0].commit')
|
TOOLS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools"))[0].commit')
|
||||||
if [ "$HEADERS_COMMIT" != "${spirv-tools.headers.rev}" ] || [ "$TOOLS_COMMIT" != "${spirv-tools.src.rev}" ]; then
|
if [ "$HEADERS_COMMIT" != "${spirv-headers.src.rev}" ] || [ "$TOOLS_COMMIT" != "${spirv-tools.src.rev}" ]; then
|
||||||
echo "ERROR: spirv-tools commits do not match expected versions: expected tools at $TOOLS_COMMIT, headers at $HEADERS_COMMIT";
|
echo "ERROR: spirv-tools commits do not match expected versions: expected tools at $TOOLS_COMMIT, headers at $HEADERS_COMMIT";
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = false; # fails 3 out of 3 tests (ctest)
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
inherit (src.meta) homepage;
|
inherit (src.meta) homepage;
|
||||||
description = "Khronos reference front-end for GLSL and ESSL";
|
description = "Khronos reference front-end for GLSL and ESSL";
|
||||||
|
21
pkgs/development/libraries/spirv-headers/default.nix
Normal file
21
pkgs/development/libraries/spirv-headers/default.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{ stdenv, fetchFromGitHub, cmake }:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "spirv-headers-${version}";
|
||||||
|
version = "2019.1"; # spirv-tools version whose DEPS file calls for this commit
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "KhronosGroup";
|
||||||
|
repo = "SPIRV-Headers";
|
||||||
|
rev = "79b6681aadcb53c27d1052e5f8a0e82a981dbf2f"; # from spirv-tools' DEPS
|
||||||
|
sha256 = "0flng2rdmc4ndq3j71h6wk1ibcjvhjrg2rzd6rv445vcsf0jh2pj";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
inherit (src.meta) homepage;
|
||||||
|
description = "Machine-readable components of the Khronos SPIR-V Registry";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = [ maintainers.ralith ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,15 +1,15 @@
|
|||||||
{ stdenv, fetchFromGitHub, cmake }:
|
{ stdenv, fetchFromGitHub, cmake }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "vulkan-headers-${version}";
|
name = "vulkan-headers-${version}";
|
||||||
version = "1.1.85";
|
version = "1.1.101.0";
|
||||||
|
|
||||||
buildInputs = [ cmake ];
|
buildInputs = [ cmake ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "KhronosGroup";
|
owner = "KhronosGroup";
|
||||||
repo = "Vulkan-Headers";
|
repo = "Vulkan-Headers";
|
||||||
rev = "2fd5a24ec4a6df303b2155b3f85b6b8c1d56f6c0";
|
rev = "sdk-${version}";
|
||||||
sha256 = "0cj4bd396qddh3nxvr7grnpfz89g3sbvm21cx4k3ga52sp1rslpb";
|
sha256 = "1rrpkibi4lnd9j63aarjk74z0xf4sy30zh8psq1vj92r21hfjr6m";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
, xlibsWrapper, libxcb, libXrandr, libXext, wayland, libGL_driver }:
|
, xlibsWrapper, libxcb, libXrandr, libXext, wayland, libGL_driver }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "1.1.85";
|
version = "1.1.101.0";
|
||||||
in
|
in
|
||||||
|
|
||||||
assert version == vulkan-headers.version;
|
assert version == vulkan-headers.version;
|
||||||
@ -13,8 +13,8 @@ stdenv.mkDerivation rec {
|
|||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "KhronosGroup";
|
owner = "KhronosGroup";
|
||||||
repo = "Vulkan-Loader";
|
repo = "Vulkan-Loader";
|
||||||
rev = "b02f64293680c484e1d7ff6ecb88f89277c0dc8c";
|
rev = "sdk-${version}";
|
||||||
sha256 = "1n4vjyxlmi2ygx34srwbvalc5gz95gcsrmdw0k10353xja755gmj";
|
sha256 = "0x891bha9mlsh4cvq59d1qnb4fnalwf6ml2b9y221cr7hikilamw";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
@ -28,10 +28,6 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
cp -r "${vulkan-headers}/include" "$dev"
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "LunarG Vulkan loader";
|
description = "LunarG Vulkan loader";
|
||||||
homepage = https://www.lunarg.com;
|
homepage = https://www.lunarg.com;
|
||||||
|
@ -1,38 +1,25 @@
|
|||||||
{ stdenv, fetchFromGitHub, cmake, python }:
|
{ stdenv, fetchFromGitHub, cmake, python, spirv-headers }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
# Update spirv-headers rev in lockstep according to DEPs file
|
||||||
spirv_sources = {
|
version = "2019.1";
|
||||||
# `glslang` requires a specific version of `spirv-tools` and `spirv-headers` as specified in `known-good.json`.
|
|
||||||
tools = fetchFromGitHub {
|
|
||||||
owner = "KhronosGroup";
|
|
||||||
repo = "SPIRV-Tools";
|
|
||||||
rev = "9bfe0eb25e3dfdf4f3fd86ab6c0cda009c9bd661";
|
|
||||||
sha256 = "1spfii4zib1lmz40vnz1d1cr6is7q2n7rvar1vfzi33gwrn8rqhi";
|
|
||||||
};
|
|
||||||
headers = fetchFromGitHub {
|
|
||||||
owner = "KhronosGroup";
|
|
||||||
repo = "SPIRV-Headers";
|
|
||||||
rev = "d5b2e1255f706ce1f88812217e9a554f299848af";
|
|
||||||
sha256 = "18530mpa030ckjhn78z9vbfd35l5jgh3mg22ra6k8gw8zx4wjhsl";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
assert version == spirv-headers.version;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "spirv-tools-${version}";
|
name = "spirv-tools-${version}";
|
||||||
version = "2018-09-20";
|
inherit version;
|
||||||
|
|
||||||
src = spirv_sources.tools;
|
src = fetchFromGitHub {
|
||||||
patchPhase = ''ln -sv ${spirv_sources.headers} external/spirv-headers'';
|
owner = "KhronosGroup";
|
||||||
|
repo = "SPIRV-Tools";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0vddjzhkrhrm3l3i57nxmq2smv3r1s0ka5ff2kziaahr4hqb479r";
|
||||||
|
};
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
buildInputs = [ cmake python ];
|
buildInputs = [ cmake python ];
|
||||||
|
|
||||||
passthru = {
|
cmakeFlags = [ "-DSPIRV-Headers_SOURCE_DIR=${spirv-headers.src}" ];
|
||||||
headers = spirv_sources.headers;
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
inherit (src.meta) homepage;
|
inherit (src.meta) homepage;
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
{ stdenv, fetchFromGitHub, cmake, writeText, python3
|
{ stdenv, callPackage, fetchFromGitHub, cmake, writeText, python3
|
||||||
, vulkan-headers, vulkan-loader, glslang
|
, vulkan-headers, vulkan-loader, glslang
|
||||||
, pkgconfig, xlibsWrapper, libxcb, libXrandr, wayland }:
|
, pkgconfig, xlibsWrapper, libxcb, libXrandr, wayland }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "vulkan-validation-layers-${version}";
|
name = "vulkan-validation-layers-${version}";
|
||||||
version = "1.1.85.0";
|
version = "1.1.101.0"; # WARNING: glslang overrides in all-packages.nix must be updated to match known-good.json!
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "KhronosGroup";
|
owner = "KhronosGroup";
|
||||||
repo = "Vulkan-ValidationLayers";
|
repo = "Vulkan-ValidationLayers";
|
||||||
rev = "sdk-${version}";
|
rev = "sdk-${version}";
|
||||||
sha256 = "1y5ny587h62139fxnz760hsyv1dmw29m1a9vq096sn8qafh3jzbz";
|
sha256 = "00gz72m393i3m3rh5hv9d0znzlz39cpw35ifchzb4cr11bi4mzyz";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "vulkan-tools-${version}";
|
name = "vulkan-tools-${version}";
|
||||||
version = "1.1.92";
|
version = "1.1.101.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "KhronosGroup";
|
owner = "KhronosGroup";
|
||||||
repo = "Vulkan-Tools";
|
repo = "Vulkan-Tools";
|
||||||
rev = "sdk-${version}";
|
rev = "sdk-${version}";
|
||||||
sha256 = "1khbfxp2mha7h0vqs0fkqscxm76gn3zlia8yya11lkhk7sn3h0d3";
|
sha256 = "03227qxa8q19qgzk30h0h49sh03idr6vh9srnrhiziw2vzmahmpp";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig ];
|
nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
|
@ -7214,7 +7214,24 @@ in
|
|||||||
|
|
||||||
dotnetPackages = recurseIntoAttrs (callPackage ./dotnet-packages.nix {});
|
dotnetPackages = recurseIntoAttrs (callPackage ./dotnet-packages.nix {});
|
||||||
|
|
||||||
glslang = callPackage ../development/compilers/glslang { };
|
glslang = callPackage ../development/compilers/glslang {
|
||||||
|
spirv-tools = spirv-tools.overrideAttrs (_: {
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "KhronosGroup";
|
||||||
|
repo = "SPIRV-Tools";
|
||||||
|
rev = "117a1fd11f11e9bef9faa563c3d5156cc6ab529c";
|
||||||
|
sha256 = "1w5hb6sgy71g279wsghixxc75r7rsm7wki011mpz039q66827sym";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
spirv-headers = spirv-tools.overrideAttrs (_: {
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "KhronosGroup";
|
||||||
|
repo = "SPIRV-Tools";
|
||||||
|
rev = "79b6681aadcb53c27d1052e5f8a0e82a981dbf2f";
|
||||||
|
sha256 = "0flng2rdmc4ndq3j71h6wk1ibcjvhjrg2rzd6rv445vcsf0jh2pj";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
go_bootstrap = if stdenv.isAarch64 then
|
go_bootstrap = if stdenv.isAarch64 then
|
||||||
srcOnly {
|
srcOnly {
|
||||||
@ -9286,6 +9303,7 @@ in
|
|||||||
|
|
||||||
spin = callPackage ../development/tools/analysis/spin { };
|
spin = callPackage ../development/tools/analysis/spin { };
|
||||||
|
|
||||||
|
spirv-headers = callPackage ../development/libraries/spirv-headers { };
|
||||||
spirv-tools = callPackage ../development/tools/spirv-tools { };
|
spirv-tools = callPackage ../development/tools/spirv-tools { };
|
||||||
|
|
||||||
splint = callPackage ../development/tools/analysis/splint {
|
splint = callPackage ../development/tools/analysis/splint {
|
||||||
@ -13117,7 +13135,33 @@ in
|
|||||||
vulkan-headers = callPackage ../development/libraries/vulkan-headers { };
|
vulkan-headers = callPackage ../development/libraries/vulkan-headers { };
|
||||||
vulkan-loader = callPackage ../development/libraries/vulkan-loader { };
|
vulkan-loader = callPackage ../development/libraries/vulkan-loader { };
|
||||||
vulkan-tools = callPackage ../tools/graphics/vulkan-tools { };
|
vulkan-tools = callPackage ../tools/graphics/vulkan-tools { };
|
||||||
vulkan-validation-layers = callPackage ../development/tools/vulkan-validation-layers { };
|
vulkan-validation-layers = callPackage ../development/tools/vulkan-validation-layers {
|
||||||
|
glslang = (glslang.override {
|
||||||
|
spirv-tools = spirv-tools.overrideAttrs (_: {
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "KhronosGroup";
|
||||||
|
repo = "SPIRV-Tools";
|
||||||
|
rev = "5994ae2a045015004cce24802dc47c33736486ea";
|
||||||
|
sha256 = "1w1zkql03aggma31nz4xb1b5waxxf2jcg99slzvmihg9ngmmlbm6";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
spirv-headers = spirv-tools.overrideAttrs (_: {
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "KhronosGroup";
|
||||||
|
repo = "SPIRV-Headers";
|
||||||
|
rev = "79b6681aadcb53c27d1052e5f8a0e82a981dbf2f";
|
||||||
|
sha256 = "0flng2rdmc4ndq3j71h6wk1ibcjvhjrg2rzd6rv445vcsf0jh2pj";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}).overrideAttrs (_: {
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "KhronosGroup";
|
||||||
|
repo = "glslang";
|
||||||
|
rev = "5432f0dd8f331f15182681664d7486681e8514e6";
|
||||||
|
sha256 = "0spdm93qkx83z8bks61am2g3ary7fkibvhqq706nj4z9wx4k0cbm";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
vtkWithQt4 = vtk.override { qtLib = qt4; };
|
vtkWithQt4 = vtk.override { qtLib = qt4; };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user