1 { lib, fetchFromGitHub, callPackage, wrapCCWith }:
5 src = fetchFromGitHub {
6 owner = "RadeonOpenCompute";
8 rev = "rocm-${version}";
9 hash = "sha256-DlId/dF5r0ULl2omYPCyu1Ic3XKlLL7ndiCA0RaF264=";
12 clang = wrapCCWith rec {
14 extraBuildCommands = ''
15 clang_version=`${cc}/bin/clang -v 2>&1 | grep "clang version " | grep -E -o "[0-9.-]+"`
16 rsrc="$out/resource-root"
18 ln -s "${cc}/lib/clang/$clang_version/include" "$rsrc"
19 echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
20 echo "-Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
21 rm $out/nix-support/add-hardening.sh
22 touch $out/nix-support/add-hardening.sh
26 clang-unwrapped = callPackage ./clang.nix {
27 inherit lld llvm version;
31 lld = callPackage ./lld {
36 llvm = callPackage ./llvm {