mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 08:33:54 +00:00
40 lines
824 B
Nix
40 lines
824 B
Nix
{ lib, stdenv
|
|
, fetch
|
|
, libunwind
|
|
, cmake
|
|
, libxml2
|
|
, llvm
|
|
, version
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "lld";
|
|
inherit version;
|
|
|
|
src = fetch pname "1zakyxk5bwnh7jarckcd4rbmzi58jgn2dbah5j5cwcyfyfbx9drc";
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [ llvm libxml2 ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace MachO/CMakeLists.txt --replace \
|
|
'(''${LLVM_MAIN_SRC_DIR}/' '('
|
|
mkdir -p libunwind/include
|
|
tar -xf "${libunwind.src}" --wildcards -C libunwind/include --strip-components=2 "libunwind-*/include/"
|
|
'';
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
postInstall = ''
|
|
moveToOutput include "$dev"
|
|
moveToOutput lib "$dev"
|
|
'';
|
|
|
|
meta = {
|
|
description = "The LLVM Linker";
|
|
homepage = "https://lld.llvm.org/";
|
|
license = lib.licenses.ncsa;
|
|
platforms = lib.platforms.all;
|
|
};
|
|
}
|