From 34478a3dbe856bae443e47b44985c58c16ba9f3a Mon Sep 17 00:00:00 2001 From: Ashley Ruglys Date: Thu, 9 Jan 2025 06:07:04 +0000 Subject: [PATCH] shader-slang: init at v2025.1 --- maintainers/maintainer-list.nix | 6 +++++ pkgs/by-name/sh/shader-slang/package.nix | 34 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/by-name/sh/shader-slang/package.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a3cc89d57ed75..a8a34b0af46e5 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -7217,6 +7217,12 @@ githubId = 873530; name = "Alexey Levan"; }; + expenses = { + email = "ashley.ruglys@gmail.com"; + github = "expenses"; + githubId = 13566135; + name = "Ashley Ruglys"; + }; exploitoverload = { email = "nix@exploitoverload.com"; github = "exploitoverload"; diff --git a/pkgs/by-name/sh/shader-slang/package.nix b/pkgs/by-name/sh/shader-slang/package.nix new file mode 100644 index 0000000000000..108decebdc905 --- /dev/null +++ b/pkgs/by-name/sh/shader-slang/package.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchFromGitHub, cmake, python3, llvmPackages_13, xorg, }: +stdenv.mkDerivation (finalAttrs: { + name = "shader-slang"; + version = "v2025.1"; + nativeBuildInputs = [ cmake python3 ]; + buildInputs = + [ llvmPackages_13.libllvm llvmPackages_13.clang-unwrapped xorg.libX11 ]; + src = fetchFromGitHub { + owner = "shader-slang"; + repo = "slang"; + rev = finalAttrs.version; + hash = "sha256-uTf2GOEaqcZ8ZKGBFit5UU1JycMLYpKSq0Zvxxct+JI="; + fetchSubmodules = true; + }; + cmakeFlags = [ "-DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM" ]; + meta = with lib; { + description = "The Slang Shading Language and Compiler"; + longDescription = '' + The Slang shading language and compiler is a proven open-source technology + empowering real-time graphics developers with flexible, innovative + features that complement existing shading languages, including neural + computation inside graphics shaders. Slang’s support for modular code + significantly simplifies the development and maintenance of large + codebases, while its compiler enables smooth migration paths for existing + HLSL and GLSL shaders. The Slang compiler also supports multiple backend + targets for portable code deployment across diverse APIs and platforms. + ''; + homepage = "https://shader-slang.com/"; + license = licenses.asl20-llvm; + mainProgram = "slangc"; + platforms = platforms.all; + maintainers = with maintainers; [ expenses ]; + }; +})