40 lines
796 B
Nix
Raw Normal View History

{ lib, stdenv
2020-07-10 19:28:08 +02:00
, cmake
, libxml2
, llvm
, version
, src
}:
stdenv.mkDerivation rec {
inherit version src;
pname = "lld";
nativeBuildInputs = [ cmake ];
buildInputs = [ libxml2 llvm ];
outputs = [ "out" "dev" ];
2021-03-24 08:43:58 +01:00
cmakeFlags = [ "-DLLVM_MAIN_SRC_DIR=${llvm.src}" ];
2020-07-10 19:28:08 +02:00
postInstall = ''
moveToOutput include "$dev"
moveToOutput lib "$dev"
# Fix lld binary path for CMake.
substituteInPlace "$dev/lib/cmake/lld/LLDTargets-release.cmake" \
--replace "\''${_IMPORT_PREFIX}/bin/lld" "$out/bin/lld"
2020-07-10 19:28:08 +02:00
'';
meta = with lib; {
2020-07-10 19:28:08 +02:00
description = "ROCm fork of the LLVM Linker";
homepage = "https://github.com/RadeonOpenCompute/llvm-project";
license = licenses.ncsa;
maintainers = with maintainers; [ danieldk ];
platforms = platforms.linux;
};
}