From 7655d19fc2235edbc583183218b9ba8a2eff481d Mon Sep 17 00:00:00 2001 From: Sebastian Neubauer Date: Thu, 5 May 2022 18:15:41 +0200 Subject: [PATCH] directx-shader-compiler: 1.6.2106 -> 1.6.2112 The glibc update broke compiling dxc. Update and fix compilation. - Use ninja because it's faster and fixes compilation (uhm, yes, no idea why) - Remove the comment about using submodules only for .git, they are actually used for SPIR-V - The way default CMake flags are passed changed - Add myself as maintainer --- .../directx-shader-compiler/default.nix | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/pkgs/tools/graphics/directx-shader-compiler/default.nix b/pkgs/tools/graphics/directx-shader-compiler/default.nix index 5baedaab11e..bfc87f20bb8 100644 --- a/pkgs/tools/graphics/directx-shader-compiler/default.nix +++ b/pkgs/tools/graphics/directx-shader-compiler/default.nix @@ -1,8 +1,8 @@ -{ lib, stdenv, fetchFromGitHub, cmake, python3, git }: +{ lib, stdenv, fetchFromGitHub, cmake, ninja, python3, git }: stdenv.mkDerivation rec { pname = "directx-shader-compiler"; - version = "1.6.2106"; + version = "1.6.2112"; # Put headers in dev, there are lot of them which aren't necessary for # using the compiler binary. @@ -12,20 +12,13 @@ stdenv.mkDerivation rec { owner = "microsoft"; repo = "DirectXShaderCompiler"; rev = "v${version}"; - sha256 = "6kQgAESYiQ06LkiGTfDBYwd/ORLSm1W+BcO+OUp4yXY="; - # We rely on the side effect of leaving the .git directory here for the - # version-grabbing functionality of the build system. + hash = "sha256-+oh7oWJCE0CLehnqpE2J9aIfMFbtfLAKwI9ETmCg/TA="; fetchSubmodules = true; }; - nativeBuildInputs = [ cmake git python3 ]; + nativeBuildInputs = [ cmake git ninja python3 ]; - configurePhase = '' - # Requires some additional flags to cmake from a file in the repo - additionalCMakeFlags=$(< utils/cmake-predefined-config-params) - cmakeFlags="$additionalCMakeFlags''${cmakeFlags:+ $cmakeFlags}" - cmakeConfigurePhase - ''; + cmakeFlags = [ "-C../cmake/caches/PredefinedParams.cmake" ]; # The default install target installs heaps of LLVM stuff. # @@ -45,6 +38,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/microsoft/DirectXShaderCompiler"; platforms = with platforms; linux ++ darwin; license = licenses.ncsa; - maintainers = with maintainers; [ expipiplus1 ]; + maintainers = with maintainers; [ expipiplus1 Flakebi ]; }; }