From 03a7962a4270124b5f6d7b97d4a1d7ad2ab1d82e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 1 Aug 2024 01:03:32 +0000 Subject: [PATCH 1/2] directx-shader-compiler: 1.8.2405 -> 1.8.2407 --- pkgs/tools/graphics/directx-shader-compiler/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/graphics/directx-shader-compiler/default.nix b/pkgs/tools/graphics/directx-shader-compiler/default.nix index c6c3daeab1e3..15ef8be57798 100644 --- a/pkgs/tools/graphics/directx-shader-compiler/default.nix +++ b/pkgs/tools/graphics/directx-shader-compiler/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "directx-shader-compiler"; - version = "1.8.2405"; + version = "1.8.2407"; # Put headers in dev, there are lot of them which aren't necessary for # using the compiler binary. @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { owner = "microsoft"; repo = "DirectXShaderCompiler"; rev = "v${version}"; - hash = "sha256-p1sQcKWSQo0VU1JwB7J0eqT85CzNWxAMqC4HZ95NySg="; + hash = "sha256-7quRcuY3SAuGuS4Slz476WxJ7GHMjJmT2Jmb8kdmsI8="; fetchSubmodules = true; }; From c841a495188bf4123a3d6a8b3e90145e1ccd37ca Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:03:34 +0530 Subject: [PATCH 2/2] directx-shader-compiler: move to finalAttrs, cleanup apply nixfmt-rfc-style --- .../directx-shader-compiler/default.nix | 41 ++++++++++++++----- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/graphics/directx-shader-compiler/default.nix b/pkgs/tools/graphics/directx-shader-compiler/default.nix index 15ef8be57798..11deeca44d06 100644 --- a/pkgs/tools/graphics/directx-shader-compiler/default.nix +++ b/pkgs/tools/graphics/directx-shader-compiler/default.nix @@ -1,22 +1,38 @@ -{ lib, stdenv, fetchFromGitHub, cmake, ninja, python3, git }: +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + ninja, + python3, + git, +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "directx-shader-compiler"; version = "1.8.2407"; # Put headers in dev, there are lot of them which aren't necessary for # using the compiler binary. - outputs = [ "out" "dev" ]; + outputs = [ + "out" + "dev" + ]; src = fetchFromGitHub { owner = "microsoft"; repo = "DirectXShaderCompiler"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-7quRcuY3SAuGuS4Slz476WxJ7GHMjJmT2Jmb8kdmsI8="; fetchSubmodules = true; }; - nativeBuildInputs = [ cmake git ninja python3 ]; + nativeBuildInputs = [ + cmake + git + ninja + python3 + ]; cmakeFlags = [ "-C../cmake/caches/PredefinedParams.cmake" ]; @@ -27,17 +43,22 @@ stdenv.mkDerivation rec { # The following is based on the CI script: # https://github.com/microsoft/DirectXShaderCompiler/blob/master/appveyor.yml#L63-L66 installPhase = '' + runHook preInstall mkdir -p $out/bin $out/lib $dev/include mv bin/dxc* $out/bin/ mv lib/libdxcompiler.so* lib/libdxcompiler.*dylib $out/lib/ cp -r $src/include/dxc $dev/include/ + runHook postInstall ''; - meta = with lib; { + meta = { description = "Compiler to compile HLSL programs into DXIL and SPIR-V"; homepage = "https://github.com/microsoft/DirectXShaderCompiler"; - platforms = with platforms; linux ++ darwin; - license = licenses.ncsa; - maintainers = with maintainers; [ expipiplus1 Flakebi ]; + platforms = with lib.platforms; linux ++ darwin; + license = lib.licenses.ncsa; + maintainers = with lib.maintainers; [ + expipiplus1 + Flakebi + ]; }; -} +})