From c3ffae477767d22fd0e714e4071fb25e4f3ec8d7 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Thu, 14 Jul 2016 12:56:45 +0000 Subject: [PATCH] nodejs: implement a darwin-specific fix that properly refers to tr1/type_traits --- pkgs/development/web/nodejs/nodejs.nix | 5 ++--- pkgs/development/web/nodejs/v6.nix | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index a04a0ed971bb..cae7648e6e93 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -2,6 +2,7 @@ , pkgconfig, runCommand, which, libtool , version , src +, preBuild ? "" , ... }: @@ -25,9 +26,7 @@ let in stdenv.mkDerivation { - inherit version; - - inherit src; + inherit version src preBuild; name = "nodejs-${version}"; diff --git a/pkgs/development/web/nodejs/v6.nix b/pkgs/development/web/nodejs/v6.nix index 43a39451f9b1..bde9065d085a 100644 --- a/pkgs/development/web/nodejs/v6.nix +++ b/pkgs/development/web/nodejs/v6.nix @@ -9,4 +9,8 @@ import ./nodejs.nix (args // rec { url = "https://nodejs.org/download/release/v${version}/node-v${version}.tar.xz"; sha256 = "2dfeeddba750b52a528b38a1c31e35c1fb40b19cf28fbf430c3c8c7a6517005a"; }; + preBuild = stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") '' + sed -i -e "s|tr1/type_traits|type_traits|g" \ + -e "s|std::tr1|std|" src/util.h + ''; })