depot/third_party/nixpkgs/pkgs/development/tools/mold/default.nix
Default email 8e65f7f0cc Project import generated by Copybara.
GitOrigin-RevId: 062a0c5437b68f950b081bbfc8a699d57a4ee026
2022-03-05 17:20:37 +01:00

46 lines
1,018 B
Nix

{ stdenv
, fetchFromGitHub
, lib
, autoPatchelfHook
, cmake
, llvmPackages_latest
, xxHash
, zlib
, openssl
, nix-update-script
}:
stdenv.mkDerivation rec {
pname = "mold";
version = "1.1";
src = fetchFromGitHub {
owner = "rui314";
repo = pname;
rev = "v${version}";
sha256 = "sha256-+uIP/U7H9P7oy78TL1edX9+JNYUzpwro105PYj3D6Yk=";
};
buildInputs = [ zlib openssl ];
nativeBuildInputs = [ autoPatchelfHook cmake xxHash ];
enableParallelBuilding = true;
dontUseCmakeConfigure = true;
EXTRA_LDFLAGS = "-fuse-ld=${llvmPackages_latest.lld}/bin/ld.lld";
LTO = 1;
makeFlags = [ "PREFIX=${placeholder "out"}" ];
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
meta = with lib; {
description = "A high performance drop-in replacement for existing unix linkers";
homepage = "https://github.com/rui314/mold";
license = lib.licenses.agpl3Plus;
maintainers = with maintainers; [ nitsky ];
broken = stdenv.isAarch64;
};
}