Merge pull request #147221 from lionello/fix-dtools-aarch64-darwin

dtools: Fix aarch64-darwin build
This commit is contained in:
Jörg Thalheim 2021-11-24 08:37:53 +00:00 committed by GitHub
commit 48e0fd8005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,34 +1,25 @@
{stdenv, lib, fetchFromGitHub, ldc, curl}:
{stdenv, lib, fetchFromGitHub, fetchpatch, ldc, curl}:
stdenv.mkDerivation rec {
pname = "dtools";
version = "2.095.1";
srcs = [
(fetchFromGitHub {
owner = "dlang";
repo = "dmd";
rev = "v${version}";
sha256 = "sha256:0faca1y42a1h16aml4lb7z118mh9k9fjx3xlw3ki5f1h3ln91xhk";
name = "dmd";
})
(fetchFromGitHub {
owner = "dlang";
repo = "tools";
rev = "v${version}";
sha256 = "sha256:0rdfk3mh3fjrb0h8pr8skwlq6ac9hdl1fkrkdl7n1fa2806b740b";
name = "dtools";
src = fetchFromGitHub {
owner = "dlang";
repo = "tools";
rev = "v${version}";
sha256 = "sha256:0rdfk3mh3fjrb0h8pr8skwlq6ac9hdl1fkrkdl7n1fa2806b740b";
name = "dtools";
};
patches = [
(fetchpatch {
# part of https://github.com/dlang/tools/pull/441
url = "https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69424625ee866.patch"; # Fix LDC arm64 build
sha256 = "sha256-x6EclTYN1Y5FG57KLhbBK0BZicSYcZoWO7MTVcP4T18=";
})
];
sourceRoot = ".";
postUnpack = ''
mv dmd dtools
cd dtools
'';
nativeBuildInputs = [ ldc ];
buildInputs = [ curl ];