2021-03-06 15:43:24 +00:00
|
|
|
{stdenv, lib, fetchFromGitHub, ldc, curl}:
|
2017-08-19 16:20:34 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "dtools";
|
2021-03-06 15:43:24 +00:00
|
|
|
version = "2.095.1";
|
2017-08-19 16:20:34 +01:00
|
|
|
|
2018-01-06 22:28:07 +00:00
|
|
|
srcs = [
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "dlang";
|
|
|
|
repo = "dmd";
|
|
|
|
rev = "v${version}";
|
2021-03-06 15:43:24 +00:00
|
|
|
sha256 = "sha256:0faca1y42a1h16aml4lb7z118mh9k9fjx3xlw3ki5f1h3ln91xhk";
|
2018-01-06 22:28:07 +00:00
|
|
|
name = "dmd";
|
|
|
|
})
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "dlang";
|
|
|
|
repo = "tools";
|
|
|
|
rev = "v${version}";
|
2021-03-06 15:43:24 +00:00
|
|
|
sha256 = "sha256:0rdfk3mh3fjrb0h8pr8skwlq6ac9hdl1fkrkdl7n1fa2806b740b";
|
2018-01-06 22:28:07 +00:00
|
|
|
name = "dtools";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
mv dmd dtools
|
|
|
|
cd dtools
|
2019-02-17 09:48:00 +00:00
|
|
|
|
2018-01-06 22:28:07 +00:00
|
|
|
'';
|
2017-08-19 16:20:34 +01:00
|
|
|
|
2021-03-06 15:43:24 +00:00
|
|
|
nativeBuildInputs = [ ldc ];
|
2017-08-19 16:20:34 +01:00
|
|
|
buildInputs = [ curl ];
|
|
|
|
|
2018-01-06 22:28:07 +00:00
|
|
|
makeCmd = ''
|
2021-03-06 15:43:24 +00:00
|
|
|
make -f posix.mak all DMD_DIR=dmd DMD=${ldc.out}/bin/ldmd2 CC=${stdenv.cc}/bin/cc
|
2018-01-06 22:28:07 +00:00
|
|
|
'';
|
|
|
|
|
2017-08-19 16:20:34 +01:00
|
|
|
buildPhase = ''
|
2018-01-06 22:28:07 +00:00
|
|
|
$makeCmd
|
2017-08-19 16:20:34 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = ''
|
2018-01-06 22:28:07 +00:00
|
|
|
$makeCmd test_rdmd
|
2017-08-19 16:20:34 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-01-06 22:28:07 +00:00
|
|
|
$makeCmd INSTALL_DIR=$out install
|
2021-01-21 00:55:55 +00:00
|
|
|
'';
|
2017-08-19 16:20:34 +01:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2017-08-19 16:20:34 +01:00
|
|
|
description = "Ancillary tools for the D programming language compiler";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/dlang/tools";
|
2017-08-19 16:20:34 +01:00
|
|
|
license = lib.licenses.boost;
|
2017-08-27 18:07:15 +01:00
|
|
|
maintainers = with maintainers; [ ThomasMader ];
|
2021-01-23 12:26:19 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2017-08-19 16:20:34 +01:00
|
|
|
};
|
|
|
|
}
|