From 5b3e50dedc0a1f03bddd7bc82f1d615300b7b0c5 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Thu, 9 Jul 2015 15:43:01 -0700 Subject: [PATCH] use lib functions to clean up nodejs --- pkgs/development/web/nodejs/default.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pkgs/development/web/nodejs/default.nix b/pkgs/development/web/nodejs/default.nix index 3f8d1c1f00a..daa37d5d246 100644 --- a/pkgs/development/web/nodejs/default.nix +++ b/pkgs/development/web/nodejs/default.nix @@ -37,15 +37,10 @@ in stdenv.mkDerivation { configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps) ++ [ "--without-dtrace" ]; prePatch = '' - sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i configure + patchShebangs . ''; - patches = if stdenv.isDarwin then [ ./no-xcode.patch ] else null; - - - preBuild = if stdenv.isDarwin then '' - patchShebangs . - '' else null; + patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode.patch; buildInputs = [ python which ] ++ (optional stdenv.isLinux utillinux)