2015-09-21 07:55:32 +01:00
|
|
|
{ stdenv, fetchFromGitHub, curl, dmd, gcc }:
|
2015-01-18 00:41:39 +00:00
|
|
|
|
2015-09-21 07:55:32 +01:00
|
|
|
let version = "0.9.24"; in
|
2015-01-18 00:41:39 +00:00
|
|
|
stdenv.mkDerivation {
|
2015-09-21 07:55:32 +01:00
|
|
|
name = "dub-${version}";
|
2015-01-18 00:41:39 +00:00
|
|
|
|
2015-09-21 07:55:32 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
sha256 = "1j2cs2mvaj6bjjicabq6lh97nx0v4b2k6pj4cmywki7hf3i1p8yy";
|
|
|
|
rev = "v${version}";
|
|
|
|
repo = "dub";
|
|
|
|
owner = "D-Programming-Language";
|
2015-01-18 00:41:39 +00:00
|
|
|
};
|
|
|
|
|
2015-09-21 07:55:32 +01:00
|
|
|
buildInputs = [ curl ];
|
2015-01-18 00:41:39 +00:00
|
|
|
propagatedBuildInputs = [ gcc dmd ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
# Avoid that the version file is overwritten
|
|
|
|
substituteInPlace build.sh \
|
|
|
|
--replace source/dub/version_.d /dev/null
|
|
|
|
./build.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
mkdir $out/bin
|
|
|
|
cp bin/dub $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2015-09-21 07:55:32 +01:00
|
|
|
inherit version;
|
2015-01-18 00:41:39 +00:00
|
|
|
description = "Build tool for D projects";
|
|
|
|
homepage = http://code.dlang.org/;
|
2015-09-21 07:55:32 +01:00
|
|
|
license = licenses.mit;
|
2015-01-18 00:41:39 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|