1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 16:42:09 +00:00
nixpkgs/pkgs/development/tools/dtools/default.nix
2018-05-19 23:17:30 +02:00

60 lines
1.2 KiB
Nix

{stdenv, lib, fetchFromGitHub, dmd, curl}:
stdenv.mkDerivation rec {
name = "dtools-${version}";
version = "2.079.1";
srcs = [
(fetchFromGitHub {
owner = "dlang";
repo = "dmd";
rev = "v${version}";
sha256 = "0mlk095aw94d940qkymfp85daggiz3f0xv598nlc7acgp6408kyj";
name = "dmd";
})
(fetchFromGitHub {
owner = "dlang";
repo = "tools";
rev = "v${version}";
sha256 = "0fvpfwh3bh3fymrmis3n39x9hkfklmv81lrlqcyl8fmmk694yvad";
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;
};
}