dtools: rdmd -> dtools
- Remove single rdmd derivation and introduce new dtools derivation with more tools from the repository. - Update rdmd/dtools 2.067.0 -> 2.075.1 - Adding checkPhase - Fixing dependencies - Update derivation description
This commit is contained in:
parent
9d4d963097
commit
58ed023bc6
@ -1,28 +0,0 @@
|
||||
{stdenv, lib, fetchurl, dmd}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "rdmd-2.067.0";
|
||||
|
||||
buildInputs = [ dmd ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/D-Programming-Language/tools/archive/v2.067.0.tar.gz";
|
||||
sha256 = "2702ecda0427c675084d9b688449bc8c8392fd73e30257d79e2488640d5a9982";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
dmd rdmd.d
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp rdmd $out/bin/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Wrapper for D language compiler";
|
||||
homepage = http://dlang.org/rdmd.html;
|
||||
license = lib.licenses.boost;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
54
pkgs/development/tools/dtools/default.nix
Normal file
54
pkgs/development/tools/dtools/default.nix
Normal file
@ -0,0 +1,54 @@
|
||||
{stdenv, lib, fetchFromGitHub, dmd, curl}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dtools-${version}";
|
||||
version = "2.075.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "tools";
|
||||
rev = "v${version}";
|
||||
sha256 = "0lxn400s9las9hq6h9vj4mis2jr662k2yw0zcrvqcm1yg9pd245d";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace posix.mak \
|
||||
--replace "../dmd/generated/\$(OS)/release/\$(MODEL)/dmd" ${dmd.out}/bin/dmd
|
||||
|
||||
substituteInPlace posix.mak \
|
||||
--replace gcc $CC
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ dmd ];
|
||||
buildInputs = [ curl ];
|
||||
|
||||
buildPhase = ''
|
||||
make -f posix.mak DMD=${dmd.out}/bin/dmd INSTALL_DIR=$out
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkPhase = ''
|
||||
export BITS=${builtins.toString stdenv.hostPlatform.parsed.cpu.bits}
|
||||
export OSNAME=${if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name}
|
||||
./generated/$OSNAME/$BITS/rdmd -main -unittest rdmd.d
|
||||
${dmd.out}/bin/dmd rdmd_test.d
|
||||
./rdmd_test
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
${
|
||||
let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
|
||||
osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in
|
||||
"find $PWD/generated/${osname}/${bits} -perm /a+x -type f -exec cp {} $out/bin \\;"
|
||||
}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Ancillary tools for the D programming language compiler";
|
||||
homepage = https://github.com/dlang/tools;
|
||||
license = lib.licenses.boost;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
@ -119,6 +119,7 @@ mapAliases (rec {
|
||||
quake3game = ioquake3; # added 2016-01-14
|
||||
qwt6 = libsForQt5.qwt; # added 2015-12-19
|
||||
rdiff_backup = rdiff-backup; # added 2014-11-23
|
||||
rdmd = dtools; # added 2017-08-19
|
||||
rssglx = rss-glx; #added 2015-03-25
|
||||
rubygems = throw "deprecated 2016-03-02: rubygems is now bundled with ruby";
|
||||
rustUnstable = rustNightly; # added 2016-11-29
|
||||
|
@ -963,6 +963,8 @@ with pkgs;
|
||||
gtk = gtk3;
|
||||
};
|
||||
|
||||
dtools = callPackage ../development/tools/dtools { };
|
||||
|
||||
dtrx = callPackage ../tools/compression/dtrx { };
|
||||
|
||||
duperemove = callPackage ../tools/filesystems/duperemove { };
|
||||
@ -4037,8 +4039,6 @@ with pkgs;
|
||||
|
||||
rdfind = callPackage ../tools/filesystems/rdfind { };
|
||||
|
||||
rdmd = callPackage ../development/compilers/rdmd { };
|
||||
|
||||
rhash = callPackage ../tools/security/rhash { };
|
||||
|
||||
riemann_c_client = callPackage ../tools/misc/riemann-c-client { };
|
||||
|
Loading…
Reference in New Issue
Block a user