From ea4eeb3cd0db781cea8387deb2d79bdccd1461fa Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Sat, 16 Feb 2019 23:57:14 -0800 Subject: [PATCH 1/7] vulkan-loader: 1.1.85 -> 1.1.101.0 --- pkgs/development/libraries/vulkan-headers/default.nix | 6 +++--- pkgs/development/libraries/vulkan-loader/default.nix | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/vulkan-headers/default.nix b/pkgs/development/libraries/vulkan-headers/default.nix index c93ba1b12909..5a3216583085 100644 --- a/pkgs/development/libraries/vulkan-headers/default.nix +++ b/pkgs/development/libraries/vulkan-headers/default.nix @@ -1,15 +1,15 @@ { stdenv, fetchFromGitHub, cmake }: stdenv.mkDerivation rec { name = "vulkan-headers-${version}"; - version = "1.1.85"; + version = "1.1.101.0"; buildInputs = [ cmake ]; src = fetchFromGitHub { owner = "KhronosGroup"; repo = "Vulkan-Headers"; - rev = "2fd5a24ec4a6df303b2155b3f85b6b8c1d56f6c0"; - sha256 = "0cj4bd396qddh3nxvr7grnpfz89g3sbvm21cx4k3ga52sp1rslpb"; + rev = "sdk-${version}"; + sha256 = "1rrpkibi4lnd9j63aarjk74z0xf4sy30zh8psq1vj92r21hfjr6m"; }; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/vulkan-loader/default.nix b/pkgs/development/libraries/vulkan-loader/default.nix index 6f720857f7cf..69a1b9014ab0 100644 --- a/pkgs/development/libraries/vulkan-loader/default.nix +++ b/pkgs/development/libraries/vulkan-loader/default.nix @@ -2,7 +2,7 @@ , xlibsWrapper, libxcb, libXrandr, libXext, wayland, libGL_driver }: let - version = "1.1.85"; + version = "1.1.101.0"; in assert version == vulkan-headers.version; @@ -13,8 +13,8 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "KhronosGroup"; repo = "Vulkan-Loader"; - rev = "b02f64293680c484e1d7ff6ecb88f89277c0dc8c"; - sha256 = "1n4vjyxlmi2ygx34srwbvalc5gz95gcsrmdw0k10353xja755gmj"; + rev = "sdk-${version}"; + sha256 = "0x891bha9mlsh4cvq59d1qnb4fnalwf6ml2b9y221cr7hikilamw"; }; nativeBuildInputs = [ pkgconfig ]; From 94b2a0fc6b2df18e5aa5cf9e8d4f5ee3e8257ae0 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Sun, 17 Feb 2019 09:52:31 -0800 Subject: [PATCH 2/7] spirv-headers: init at 2019.1 --- .../libraries/spirv-headers/default.nix | 21 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 22 insertions(+) create mode 100644 pkgs/development/libraries/spirv-headers/default.nix diff --git a/pkgs/development/libraries/spirv-headers/default.nix b/pkgs/development/libraries/spirv-headers/default.nix new file mode 100644 index 000000000000..40d272fd07d6 --- /dev/null +++ b/pkgs/development/libraries/spirv-headers/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ff30d1cae528..2b565cace580 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9103,6 +9103,7 @@ in spin = callPackage ../development/tools/analysis/spin { }; + spirv-headers = callPackage ../development/libraries/spirv-headers { }; spirv-tools = callPackage ../development/tools/spirv-tools { }; splint = callPackage ../development/tools/analysis/splint { From d8d8a7a3ebd0cded841881b1b6ec768fc57238e6 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Sun, 17 Feb 2019 09:52:50 -0800 Subject: [PATCH 3/7] spirv-tools: 2018-09-20 -> 2019.1 --- .../development/tools/spirv-tools/default.nix | 37 ++++++------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/pkgs/development/tools/spirv-tools/default.nix b/pkgs/development/tools/spirv-tools/default.nix index 5100b3624c42..c9df2703daa5 100644 --- a/pkgs/development/tools/spirv-tools/default.nix +++ b/pkgs/development/tools/spirv-tools/default.nix @@ -1,38 +1,25 @@ -{ stdenv, fetchFromGitHub, cmake, python }: - +{ stdenv, fetchFromGitHub, cmake, python, spirv-headers }: let - -spirv_sources = { - # `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"; - }; -}; - + # Update spirv-headers rev in lockstep according to DEPs file + version = "2019.1"; in +assert version == spirv-headers.version; stdenv.mkDerivation rec { name = "spirv-tools-${version}"; - version = "2018-09-20"; + inherit version; - src = spirv_sources.tools; - patchPhase = ''ln -sv ${spirv_sources.headers} external/spirv-headers''; + src = fetchFromGitHub { + owner = "KhronosGroup"; + repo = "SPIRV-Tools"; + rev = "v${version}"; + sha256 = "0vddjzhkrhrm3l3i57nxmq2smv3r1s0ka5ff2kziaahr4hqb479r"; + }; enableParallelBuilding = true; buildInputs = [ cmake python ]; - passthru = { - headers = spirv_sources.headers; - }; + cmakeFlags = [ "-DSPIRV-Headers_SOURCE_DIR=${spirv-headers.src}" ]; meta = with stdenv.lib; { inherit (src.meta) homepage; From 6066f72960a36e3a13322f975208b2af1f4f01e6 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Sun, 17 Feb 2019 09:54:25 -0800 Subject: [PATCH 4/7] glslang: 2018-09-26 -> 7.11.3113 --- .../development/compilers/glslang/default.nix | 19 ++++++++----------- pkgs/top-level/all-packages.nix | 19 ++++++++++++++++++- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/pkgs/development/compilers/glslang/default.nix b/pkgs/development/compilers/glslang/default.nix index 62c5a0de0a93..784d66a0f242 100644 --- a/pkgs/development/compilers/glslang/default.nix +++ b/pkgs/development/compilers/glslang/default.nix @@ -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 { - name = "glslang-git-${version}"; - version = "2018-09-26"; + name = "glslang-${version}"; + version = "7.11.3113"; src = fetchFromGitHub { owner = "KhronosGroup"; repo = "glslang"; - rev = "91ac4290bcf2cb930b4fb0981f09c00c0b6797e1"; - sha256 = "0q477pm0n495acnss16ddlf82a6i5l2dfmvc7r8yi0bgmgpzi4av"; + rev = "${version}"; + sha256 = "1kzv2b4q1fddxd7c0hc754nd6rw6y9vijb9fsi13xzzq9dficgb6"; }; - buildInputs = [ cmake bison jq ] ++ spirv-tools.buildInputs; + nativeBuildInputs = [ cmake python bison jq ]; enableParallelBuilding = true; postPatch = '' 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 = '' 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') - 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"; exit 1; fi ''; - doCheck = false; # fails 3 out of 3 tests (ctest) - meta = with stdenv.lib; { inherit (src.meta) homepage; description = "Khronos reference front-end for GLSL and ESSL"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2b565cace580..5513766ddaf6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7052,7 +7052,24 @@ in 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 srcOnly { From 45a6b6878fd9da6b81ac1dac4df4ad88a8109e0e Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Sun, 17 Feb 2019 09:56:12 -0800 Subject: [PATCH 5/7] vulkan-tools: 1.1.92 -> 1.1.101.0 --- pkgs/tools/graphics/vulkan-tools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/graphics/vulkan-tools/default.nix b/pkgs/tools/graphics/vulkan-tools/default.nix index 7d5283b3133e..66efb936aa4c 100644 --- a/pkgs/tools/graphics/vulkan-tools/default.nix +++ b/pkgs/tools/graphics/vulkan-tools/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { name = "vulkan-tools-${version}"; - version = "1.1.92"; + version = "1.1.101.0"; src = fetchFromGitHub { owner = "KhronosGroup"; repo = "Vulkan-Tools"; rev = "sdk-${version}"; - sha256 = "1khbfxp2mha7h0vqs0fkqscxm76gn3zlia8yya11lkhk7sn3h0d3"; + sha256 = "03227qxa8q19qgzk30h0h49sh03idr6vh9srnrhiziw2vzmahmpp"; }; nativeBuildInputs = [ cmake pkgconfig ]; From 11988d7336956dfa3a2a4466ca9392313e0e4be1 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Sun, 17 Feb 2019 09:56:48 -0800 Subject: [PATCH 6/7] vulkan-validation-layers: 1.1.85.0 -> 1.1.101.0 --- .../vulkan-validation-layers/default.nix | 7 ++--- pkgs/top-level/all-packages.nix | 28 ++++++++++++++++++- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/vulkan-validation-layers/default.nix b/pkgs/development/tools/vulkan-validation-layers/default.nix index c76c670739e1..702b7a564b22 100644 --- a/pkgs/development/tools/vulkan-validation-layers/default.nix +++ b/pkgs/development/tools/vulkan-validation-layers/default.nix @@ -1,16 +1,15 @@ -{ stdenv, fetchFromGitHub, cmake, writeText, python3 +{ stdenv, callPackage, fetchFromGitHub, cmake, writeText, python3 , vulkan-headers, vulkan-loader, glslang , pkgconfig, xlibsWrapper, libxcb, libXrandr, wayland }: - stdenv.mkDerivation rec { 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 { owner = "KhronosGroup"; repo = "Vulkan-ValidationLayers"; rev = "sdk-${version}"; - sha256 = "1y5ny587h62139fxnz760hsyv1dmw29m1a9vq096sn8qafh3jzbz"; + sha256 = "00gz72m393i3m3rh5hv9d0znzlz39cpw35ifchzb4cr11bi4mzyz"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5513766ddaf6..df1e62bf0211 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12956,7 +12956,33 @@ in vulkan-headers = callPackage ../development/libraries/vulkan-headers { }; vulkan-loader = callPackage ../development/libraries/vulkan-loader { }; 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; }; From b11558669ebc7472ecaaaa7cafa2729a22b37c17 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Mon, 18 Mar 2019 11:03:19 -0700 Subject: [PATCH 7/7] vulkan-loader: remove headers These now live in vulkan-headers. --- pkgs/development/libraries/vulkan-loader/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/development/libraries/vulkan-loader/default.nix b/pkgs/development/libraries/vulkan-loader/default.nix index 69a1b9014ab0..04266361ea52 100644 --- a/pkgs/development/libraries/vulkan-loader/default.nix +++ b/pkgs/development/libraries/vulkan-loader/default.nix @@ -28,10 +28,6 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - postInstall = '' - cp -r "${vulkan-headers}/include" "$dev" - ''; - meta = with stdenv.lib; { description = "LunarG Vulkan loader"; homepage = https://www.lunarg.com;