nixpkgs/pkgs/development/tools/build-managers/dub/default.nix

39 lines
835 B
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, curl, dmd, gcc }:
2016-05-23 01:31:58 +02:00
stdenv.mkDerivation rec {
name = "dub-${version}";
2016-11-04 15:21:45 +01:00
version = "1.1.0";
src = fetchFromGitHub {
2016-11-04 15:21:45 +01:00
sha256 = "1smzlfs5gjmrlghccdgn04qzy5b8l0xm8y2virayb2adrwqviscm";
rev = "v${version}";
repo = "dub";
owner = "D-Programming-Language";
};
buildInputs = [ curl ];
propagatedBuildInputs = [ gcc dmd ];
buildPhase = ''
2016-05-23 01:31:58 +02:00
# Avoid that the version file is overwritten
substituteInPlace build.sh \
--replace source/dub/version_.d /dev/null
patchShebangs ./build.sh
./build.sh
'';
installPhase = ''
2016-05-23 01:31:58 +02:00
mkdir $out
mkdir $out/bin
cp bin/dub $out/bin
'';
meta = with stdenv.lib; {
description = "Build tool for D projects";
homepage = http://code.dlang.org/;
license = licenses.mit;
platforms = platforms.unix;
};
}