diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix index 8b0f2509a911..1cd894372bb9 100644 --- a/pkgs/development/compilers/dmd/default.nix +++ b/pkgs/development/compilers/dmd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, unzip, curl }: +{ stdenv, fetchurl, unzip, curl, makeWrapper, gcc }: stdenv.mkDerivation { name = "dmd-2.067.1"; @@ -8,7 +8,7 @@ stdenv.mkDerivation { sha256 = "0ny99vfllvvgcl79pwisxcdnb3732i827k9zg8c0j4s0n79k5z94"; }; - buildInputs = [ unzip curl ]; + buildInputs = [ unzip curl makeWrapper ]; # Allow to use "clang++", commented in Makefile postPatch = stdenv.lib.optionalString stdenv.isDarwin '' @@ -48,6 +48,8 @@ stdenv.mkDerivation { cp -r std $out/include/d2 cp -r etc $out/include/d2 + wrapProgram $out/bin/dmd --prefix PATH ":" "${gcc}/bin/" + cd $out/bin tee dmd.conf << EOF [Environment]