yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
719ecf3bf
master
1{ 2description = "The Slang Shading Language and Compiler" ; 3inputs = { 4nixpkgs . url = "github:NixOS/nixpkgs/nixpkgs-unstable" ; 5flake-utils . url = "github:numtide/flake-utils" ; 6}; 7outputs = 8{ 9self , 10nixpkgs , 11flake-utils , 12} : 13flake-utils . lib . eachDefaultSystem ( 14system: 15let 16pkgs = import nixpkgs { inherit system ; }; 17in 18{ 19# We want to use Clang instead of GCC because it seems to behave better 20# with LLDB, so we use `mkShellNoCC` here instead of `mkShell` because 21# the latter brings in GCC by default on Linux. 22devShell = pkgs . mkShellNoCC { 23buildInputs = [ 24# We must list clangd before the `clang` package to make sure it 25# comes earlier on the `PATH`, and we must get it from the 26# `clang-tools` package so that it is wrapped properly. 27( pkgs . linkFarm "clangd-21" [ 28{ 29name = "bin/clangd" ; 30# New enough to support `HeaderInsertion: Never` in `.clangd`. 31path = " ${ pkgs . llvmPackages_21 . clang-tools } /bin/clangd" ; 32} 33]) 34( pkgs . linkFarm "clang-format-17" [ 35{ 36name = "bin/clang-format" ; 37# Match the clang-format version used in CI. 38path = " ${ pkgs . llvmPackages_17 . clang-tools } /bin/clang-format" ; 39} 40]) 41 42pkgs . clang 43pkgs . cmake 44pkgs . gersemi 45pkgs . lldb 46pkgs . ninja 47pkgs . nixfmt-rfc-style 48pkgs . prettier 49pkgs . python3 50pkgs . shfmt 51pkgs . vulkan-loader # Ensure this gets built to use in library path. 52pkgs . xorg . libX11 53]; 54LD_LIBRARY_PATH = pkgs . lib . makeLibraryPath [ 55# In addition to this, running the Vulkan tests on Linux distros 56# other than NixOS may require the use of nixGL: 57# https://github.com/nix-community/nixGL 58pkgs . vulkan-loader 59]; 60}; 61} 62); 63}