Skip to content

shader-slang: 2025.8.1 -> 2025.10.3#424144

Closed
samestep wants to merge 1 commit intoNixOS:masterfrom
samestep:shader-slang-2025.10.3
Closed

shader-slang: 2025.8.1 -> 2025.10.3#424144
samestep wants to merge 1 commit intoNixOS:masterfrom
samestep:shader-slang-2025.10.3

Conversation

@samestep
Copy link
Copy Markdown
Contributor

@samestep samestep commented Jul 10, 2025

Upgrades shader-slang from 2025.8.1 to 2025.10.3

At first I tried to fix up #416790 to get all the way to the latest version, but I failed. It seems like the only issue was that pkgs/by-name/sh/shader-slang/1-find-packages.patch was out of date, so I fixed that:

Updated patch for v2025.10.4 through v2025.12.1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 549e465ac..546c94607 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -175,6 +175,8 @@ advanced_option(
     "Build using system unordered dense"
     OFF
 )
+advanced_option(SLANG_USE_SYSTEM_SPIRV_TOOLS "Build using system SPIR-V tools library" OFF)
+advanced_option(SLANG_USE_SYSTEM_GLSLANG "Build using system glslang library" OFF)
 
 option(
     SLANG_SPIRV_HEADERS_INCLUDE_DIR
@@ -404,6 +406,34 @@ if(${SLANG_USE_SYSTEM_UNORDERED_DENSE})
     find_package(unordered_dense CONFIG QUIET)
 endif()
 
+if(${SLANG_USE_SYSTEM_MINIZ})
+    find_package(miniz REQUIRED)
+    add_library(miniz ALIAS miniz::miniz)
+endif()
+
+if(${SLANG_USE_SYSTEM_LZ4})
+    find_package(lz4 REQUIRED)
+    add_library(lz4_static ALIAS LZ4::lz4)
+endif()
+
+if(${SLANG_USE_SYSTEM_VULKAN_HEADERS})
+    find_package(VulkanHeaders REQUIRED)
+endif()
+
+if(${SLANG_USE_SYSTEM_SPIRV_HEADERS})
+    find_package(SPIRV-Headers REQUIRED)
+    add_library(SPIRV-Headers ALIAS SPIRV-Headers::SPIRV-Headers)
+endif()
+
+if(${SLANG_USE_SYSTEM_SPIRV_TOOLS})
+    find_package(SPIRV-Tools REQUIRED)
+endif()
+
+if(${SLANG_USE_SYSTEM_GLSLANG})
+    find_package(glslang REQUIRED)
+    add_library(glslang ALIAS glslang::glslang)
+endif()
+
 add_subdirectory(external)
 
 # webgpu_dawn is only available as a fetched shared library, since Dawn's nested source
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index 801cae4d6..d45150118 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -133,6 +133,7 @@ if(SLANG_ENABLE_SLANG_GLSLANG)
         )
     endif()
 
+if(NOT ${SLANG_USE_SYSTEM_SPIRV_TOOLS})
     # SPIRV-Tools
     set(SPIRV_TOOLS_BUILD_STATIC ON)
     set(SPIRV_WERROR OFF)
@@ -148,11 +149,14 @@ if(SLANG_ENABLE_SLANG_GLSLANG)
             ${system}
         )
     endif()
+endif()
 
+if(NOT ${SLANG_USE_SYSTEM_GLSLANG})
     # glslang
     set(SKIP_GLSLANG_INSTALL ON)
     set(ENABLE_OPT ON)
     set(ENABLE_PCH OFF)
+    set(ALLOW_EXTERNAL_SPIRV_TOOLS ${SLANG_USE_SYSTEM_SPIRV_TOOLS})
     if(NOT SLANG_OVERRIDE_GLSLANG_PATH)
         add_subdirectory(glslang EXCLUDE_FROM_ALL ${system})
     else()
@@ -164,6 +168,7 @@ if(SLANG_ENABLE_SLANG_GLSLANG)
         )
     endif()
 endif()
+endif()
 
 # imgui
 add_library(imgui INTERFACE)

But after doing that, I started getting these weird build errors at the very end:

error: cycle detected in build of '/nix/store/vg64rlbv3xmaxqa6084is11mz8wsqpi2-shader-slang-2025.10.4.drv' in the references of output 'dev' from output 'out'
error: cycle detected in build of '/nix/store/9w3c9pips513k31969r7gxlzwhqz49zd-shader-slang-2025.12.1.drv' in the references of output 'dev' from output 'out'

I couldn't figure out how to fix them, so that's why for now I gave up and opened this PR for a month-old version instead. However, I did do a little more delta debugging: it turns out that the reference cycle is caused by shader-slang/slang#7382, since it is absent when building from the previous commit shader-slang/slang@4ae6e9d.

cc @niklaskorz

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@samestep samestep requested a review from niklaskorz July 10, 2025 20:07
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jul 10, 2025
@niklaskorz
Copy link
Copy Markdown
Member

Superseded by #424153

@niklaskorz niklaskorz closed this Jul 11, 2025
@samestep samestep deleted the shader-slang-2025.10.3 branch July 11, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants