{stdenv, lib, fetchFromGitHub, dmd, curl}: stdenv.mkDerivation rec { name = "dtools-${version}"; version = "2.078.2"; srcs = [ (fetchFromGitHub { owner = "dlang"; repo = "dmd"; rev = "v${version}"; sha256 = "0x9q4aw4jl36dz7m5111y2sm8jdaj3zg36zhj6vqg1lqpdn3bhls"; name = "dmd"; }) (fetchFromGitHub { owner = "dlang"; repo = "tools"; rev = "v${version}"; sha256 = "1cydhn8g0h9i9mygzi80fb5fz3z1f6m8b9gypdvmyhkkzg63kf12"; name = "dtools"; }) ]; sourceRoot = "."; postUnpack = '' mv dmd dtools cd dtools ''; nativeBuildInputs = [ dmd ]; buildInputs = [ curl ]; makeCmd = '' make -f posix.mak DMD_DIR=dmd DMD=${dmd.out}/bin/dmd CC=${stdenv.cc}/bin/cc ''; buildPhase = '' $makeCmd ''; doCheck = true; checkPhase = '' $makeCmd test_rdmd ''; installPhase = '' $makeCmd INSTALL_DIR=$out install ''; meta = with stdenv.lib; { description = "Ancillary tools for the D programming language compiler"; homepage = https://github.com/dlang/tools; license = lib.licenses.boost; maintainers = with maintainers; [ ThomasMader ]; platforms = stdenv.lib.platforms.unix; }; }