3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/dtools/default.nix

60 lines
1.2 KiB
Nix
Raw Normal View History

{stdenv, lib, fetchFromGitHub, dmd, curl}:
stdenv.mkDerivation rec {
name = "dtools-${version}";
2018-04-14 11:56:34 +01:00
version = "2.079.1";
2018-01-06 22:28:07 +00:00
srcs = [
(fetchFromGitHub {
owner = "dlang";
repo = "dmd";
rev = "v${version}";
2018-04-14 11:56:34 +01:00
sha256 = "0mlk095aw94d940qkymfp85daggiz3f0xv598nlc7acgp6408kyj";
2018-01-06 22:28:07 +00:00
name = "dmd";
})
(fetchFromGitHub {
owner = "dlang";
repo = "tools";
rev = "v${version}";
2018-03-03 17:37:14 +00:00
sha256 = "0fvpfwh3bh3fymrmis3n39x9hkfklmv81lrlqcyl8fmmk694yvad";
2018-01-06 22:28:07 +00:00
name = "dtools";
})
];
sourceRoot = ".";
postUnpack = ''
mv dmd dtools
cd dtools
'';
nativeBuildInputs = [ dmd ];
buildInputs = [ curl ];
2018-01-06 22:28:07 +00:00
makeCmd = ''
2018-02-10 09:49:17 +00:00
make -f posix.mak DMD_DIR=dmd DMD=${dmd.out}/bin/dmd 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
'';
2017-08-27 18:07:15 +01:00
meta = with stdenv.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 = stdenv.lib.platforms.unix;
};
}