nixpkgs/pkgs/development/tools/dtools/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.2 KiB
Nix
Raw Normal View History

2021-11-24 05:12:55 +00:00
{stdenv, lib, fetchFromGitHub, fetchpatch, ldc, curl}:
stdenv.mkDerivation rec {
pname = "dtools";
2021-03-06 15:43:24 +00:00
version = "2.095.1";
2021-11-24 05:12:55 +00:00
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
2021-11-24 05:12:55 +00:00
sha256 = "sha256-x6EclTYN1Y5FG57KLhbBK0BZicSYcZoWO7MTVcP4T18=";
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 17:07:15 +00:00
maintainers = with maintainers; [ ThomasMader ];
platforms = lib.platforms.unix;
};
}