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
This commit is contained in:
Sebastian Neubauer 2022-05-05 18:15:41 +02:00
parent 9345322f79
commit 7655d19fc2

View file

@ -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 ];
};
}