2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchFromGitHub, curl, dmd, libevent, rsync }:
|
2015-01-18 00:41:39 +00:00
|
|
|
|
2019-02-17 09:48:59 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "dub";
|
2019-03-30 09:34:27 +00:00
|
|
|
version = "1.14.0";
|
2017-11-25 18:27:49 +00:00
|
|
|
|
2019-02-17 09:48:59 +00:00
|
|
|
enableParallelBuilding = true;
|
2017-11-25 18:27:49 +00:00
|
|
|
|
2019-02-17 09:48:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dlang";
|
|
|
|
repo = "dub";
|
|
|
|
rev = "v${version}";
|
2019-03-30 09:34:27 +00:00
|
|
|
sha256 = "070kfkyrkr98y1hbhcf85842c0x7l95w1ambrkdgajpb6kcmpf84";
|
2017-11-25 18:27:49 +00:00
|
|
|
};
|
|
|
|
|
2019-02-17 09:48:59 +00:00
|
|
|
postUnpack = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
2018-08-11 14:25:01 +01:00
|
|
|
|
2019-02-17 09:48:59 +00:00
|
|
|
# Can be removed with https://github.com/dlang/dub/pull/1368
|
|
|
|
dubvar = "\\$DUB";
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace test/fetchzip.sh \
|
|
|
|
--replace "dub remove" "\"${dubvar}\" remove"
|
|
|
|
'';
|
2018-08-11 14:25:01 +01:00
|
|
|
|
2019-02-17 09:48:59 +00:00
|
|
|
nativeBuildInputs = [ dmd libevent rsync ];
|
|
|
|
buildInputs = [ curl ];
|
2017-11-25 18:27:49 +00:00
|
|
|
|
2019-02-17 09:48:59 +00:00
|
|
|
buildPhase = ''
|
|
|
|
export DMD=${dmd.out}/bin/dmd
|
|
|
|
./build.sh
|
|
|
|
'';
|
2017-11-25 18:27:49 +00:00
|
|
|
|
2019-04-23 03:49:34 +01:00
|
|
|
doCheck = !stdenv.isDarwin;
|
2019-02-17 09:48:59 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
export DUB=$NIX_BUILD_TOP/source/bin/dub
|
|
|
|
export PATH=$PATH:$NIX_BUILD_TOP/source/bin/
|
|
|
|
export DC=${dmd.out}/bin/dmd
|
|
|
|
export HOME=$TMP
|
|
|
|
|
|
|
|
rm -rf test/issue502-root-import
|
|
|
|
rm test/issue990-download-optional-selected.sh
|
|
|
|
rm test/timeout.sh
|
|
|
|
rm test/issue674-concurrent-dub.sh
|
|
|
|
rm test/issue672-upgrade-optional.sh
|
|
|
|
rm test/issue1574-addcommand.sh
|
|
|
|
rm test/issue1524-maven-upgrade-dependency-tree.sh
|
|
|
|
rm test/issue1416-maven-repo-pkg-supplier.sh
|
|
|
|
rm test/issue1037-better-dependency-messages.sh
|
|
|
|
rm test/interactive-remove.sh
|
|
|
|
rm test/fetchzip.sh
|
|
|
|
rm test/feat663-search.sh
|
|
|
|
rm test/ddox.sh
|
|
|
|
rm test/0-init-multi.sh
|
|
|
|
rm test/0-init-multi-json.sh
|
|
|
|
|
|
|
|
./test/run-unittest.sh
|
|
|
|
'';
|
2017-10-20 21:12:17 +01:00
|
|
|
|
2015-01-18 00:41:39 +00:00
|
|
|
installPhase = ''
|
2016-05-23 00:31:58 +01:00
|
|
|
mkdir $out
|
2019-02-17 09:48:59 +00:00
|
|
|
mkdir $out/bin
|
|
|
|
cp bin/dub $out/bin
|
2015-01-18 00:41:39 +00:00
|
|
|
'';
|
2017-12-08 21:12:11 +00:00
|
|
|
|
2019-02-17 09:48:59 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Package and build manager for D applications and libraries";
|
2020-03-27 23:05:50 +00:00
|
|
|
homepage = "https://code.dlang.org/";
|
2019-02-17 09:48:59 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ThomasMader ];
|
|
|
|
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
|
|
|
|
};
|
2015-01-18 00:41:39 +00:00
|
|
|
}
|