1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 17:25:11 +00:00
nixpkgs/pkgs/development/tools/dtools/default.nix

61 lines
1.2 KiB
Nix
Raw Normal View History

2021-03-06 15:43:24 +00:00
{stdenv, lib, fetchFromGitHub, ldc, curl}:
stdenv.mkDerivation rec {
pname = "dtools";
2021-03-06 15:43:24 +00:00
version = "2.095.1";
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
'';
2021-03-06 15:43:24 +00:00
nativeBuildInputs = [ ldc ];
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
'';
buildPhase = ''
2018-01-06 22:28:07 +00:00
$makeCmd
'';
doCheck = true;
checkPhase = ''
2018-01-06 22:28:07 +00:00
$makeCmd test_rdmd
'';
installPhase = ''
2018-01-06 22:28:07 +00:00
$makeCmd INSTALL_DIR=$out install
'';
meta = with lib; {
description = "Ancillary tools for the D programming language compiler";
homepage = "https://github.com/dlang/tools";
license = lib.licenses.boost;
2017-08-27 18:07:15 +01:00
maintainers = with maintainers; [ ThomasMader ];
platforms = lib.platforms.unix;
};
}