11 stdenv.mkDerivation (finalAttrs: {
12 pname = "directx-shader-compiler";
15 # Put headers in dev, there are lot of them which aren't necessary for
16 # using the compiler binary.
22 src = fetchFromGitHub {
24 repo = "DirectXShaderCompiler";
25 rev = "v${finalAttrs.version}";
26 hash = "sha256-7quRcuY3SAuGuS4Slz476WxJ7GHMjJmT2Jmb8kdmsI8=";
27 fetchSubmodules = true;
37 cmakeFlags = [ "-C../cmake/caches/PredefinedParams.cmake" ];
39 # The default install target installs heaps of LLVM stuff.
41 # Upstream issue: https://github.com/microsoft/DirectXShaderCompiler/issues/3276
43 # The following is based on the CI script:
44 # https://github.com/microsoft/DirectXShaderCompiler/blob/master/appveyor.yml#L63-L66
47 mkdir -p $out/bin $out/lib $dev/include
49 mv lib/libdxcompiler.so* lib/libdxcompiler.*dylib $out/lib/
50 cp -r $src/include/dxc $dev/include/
55 description = "Compiler to compile HLSL programs into DXIL and SPIR-V";
56 homepage = "https://github.com/microsoft/DirectXShaderCompiler";
57 platforms = with lib.platforms; linux ++ darwin;
58 license = lib.licenses.ncsa;
59 maintainers = with lib.maintainers; [ Flakebi ];