From 2bc69990ccfe2b02163ed9a745e6d3d1f131cf67 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Sat, 2 May 2015 11:05:43 +0200 Subject: [PATCH 1/2] dmd: Tweaks so that it compiles on darwin - Patching the makefile so use "clang++" as compiler. This was commented out inside of the makefile. - Fix the path to copy libphobos from. --- pkgs/development/compilers/dmd/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix index 068b29d47ce..c57cf2551aa 100644 --- a/pkgs/development/compilers/dmd/default.nix +++ b/pkgs/development/compilers/dmd/default.nix @@ -10,6 +10,11 @@ stdenv.mkDerivation { buildInputs = [ unzip curl ]; + # Allow to use "clang++", commented in Makefile + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace src/dmd/posix.mak --replace g++ clang++ + ''; + buildPhase = '' cd src/dmd make -f posix.mak INSTALL_DIR=$out @@ -34,8 +39,9 @@ stdenv.mkDerivation { cd ../phobos mkdir $out/lib - ${let bits = if stdenv.is64bit then "64" else "32"; in - "cp generated/linux/release/${bits}/libphobos2.a $out/lib" + ${let bits = if stdenv.is64bit then "64" else "32"; + osname = if stdenv.isDarwin then "osx" else "linux"; in + "cp generated/${osname}/release/${bits}/libphobos2.a $out/lib" } cp -r std $out/include/d2 @@ -55,4 +61,3 @@ stdenv.mkDerivation { platforms = platforms.unix; }; } - From 2e658c1c6357443ab778653dfc62753677bafe4f Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Sat, 2 May 2015 11:20:45 +0200 Subject: [PATCH 2/2] dmd: Update version to 2.067.1 --- pkgs/development/compilers/dmd/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix index c57cf2551aa..fb4666de4c2 100644 --- a/pkgs/development/compilers/dmd/default.nix +++ b/pkgs/development/compilers/dmd/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, unzip, curl }: stdenv.mkDerivation { - name = "dmd-2.067.0"; + name = "dmd-2.067.1"; src = fetchurl { - url = http://downloads.dlang.org/releases/2015/dmd.2.067.0.zip; - sha256 = "0b1b65694846ef3430de1de341c8cf353151a1a39656e6a1065fe56bc90fb60b"; + url = http://downloads.dlang.org/releases/2015/dmd.2.067.1.zip; + sha256 = "0ny99vfllvvgcl79pwisxcdnb3732i827k9zg8c0j4s0n79k5z94"; }; buildInputs = [ unzip curl ];