darwin purity: nodejs-0.10

+31 -16
+12 -12
pkgs/development/web/nodejs/v0_10.nix
··· 1 1 { stdenv, fetchurl, openssl, python, zlib, v8, utillinux, http-parser, c-ares 2 - , pkgconfig, runCommand, which 2 + , pkgconfig, runCommand, which, libtool 3 + 4 + # apple frameworks 5 + , CoreServices, ApplicationServices, Carbon, Foundation 3 6 }: 4 7 5 8 let 6 - dtrace = runCommand "dtrace-native" {} '' 7 - mkdir -p $out/bin 8 - ln -sv /usr/sbin/dtrace $out/bin 9 - ''; 10 - 11 9 version = "0.10.38"; 12 10 13 11 # !!! Should we also do shared libuv? ··· 37 35 sha256 = "12xpa9jzry5g0j41908498qqs8v0q6miqkv6mggyzas8bvnshgai"; 38 36 }; 39 37 40 - configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps); 38 + configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps) ++ 39 + stdenv.lib.optional stdenv.isDarwin "--without-dtrace"; 41 40 42 41 prePatch = '' 43 - sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i configure 42 + patchShebangs . 44 43 ''; 45 44 46 - patches = if stdenv.isDarwin then [ ./no-xcode.patch ] else null; 45 + patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode.patch; 47 46 48 - postPatch = if stdenv.isDarwin then '' 47 + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' 49 48 (cd tools/gyp; patch -Np1 -i ${../../python-modules/gyp/no-darwin-cflags.patch}) 50 - '' else null; 49 + ''; 51 50 52 51 buildInputs = [ python which ] 53 52 ++ (optional stdenv.isLinux utillinux) 54 - ++ optionals stdenv.isDarwin [ pkgconfig openssl dtrace ]; 53 + ++ optionals stdenv.isDarwin [ pkgconfig openssl libtool CoreServices ApplicationServices Foundation ]; 54 + propagatedBuildInputs = optionals stdenv.isDarwin [ Carbon ]; 55 55 setupHook = ./setup-hook.sh; 56 56 57 57 passthru.interpreterName = "nodejs-0.10";
+2 -1
pkgs/os-specific/darwin/apple-sdk/frameworks.nix
··· 108 108 # Umbrellas 109 109 Accelerate = [ CoreWLAN IOBluetooth ]; 110 110 ApplicationServices = [ CoreFoundation CoreServices CoreText ImageIO ]; 111 - Carbon = [ ApplicationServices CoreFoundation CoreServices IOKit Security ]; 111 + Carbon = [ ApplicationServices CoreFoundation CoreServices IOKit Security QuartzCore ]; 112 + CoreBluetooth = []; 112 113 CoreServices = [ CFNetwork CoreAudio CoreData CoreFoundation DiskArbitration Security NetFS OpenDirectory ServiceManagement ]; 113 114 IOBluetooth = [ IOKit ]; 114 115 JavaVM = [];
+12 -1
pkgs/os-specific/darwin/apple-sdk/impure-deps.nix
··· 54 54 ]; 55 55 QuartzCore = [ 56 56 "/System/Library/Frameworks/QuartzCore.framework" 57 + "/System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport" 57 58 ]; 58 59 PCSC = [ 59 60 "/System/Library/Frameworks/PCSC.framework" ··· 131 132 ]; 132 133 Carbon = [ 133 134 "/System/Library/Frameworks/Carbon.framework" 135 + "/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI" 136 + "/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv" 137 + "/System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices" 138 + "/System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary" 139 + "/System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity" 140 + "/System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing" 141 + "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211" 142 + "/System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage" 134 143 ]; 135 144 CoreAudio = [ 136 145 "/System/Library/Frameworks/CoreAudio.framework" ··· 169 178 ]; 170 179 IOBluetooth = [ 171 180 "/System/Library/Frameworks/IOBluetooth.framework" 172 - "/System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth" 181 + ] ++ AudioUnit ++ CoreBluetooth; 182 + CoreBluetooth = [ 183 + "/System/Library/Frameworks/CoreBluetooth.framework" 173 184 ]; 174 185 SecurityFoundation = [ 175 186 "/System/Library/Frameworks/SecurityFoundation.framework"
+5 -2
pkgs/top-level/all-packages.nix
··· 2007 2007 libtool = darwin.cctools; 2008 2008 }; 2009 2009 nodejs-unstable = callPackage ../development/web/nodejs { libuv = libuvVersions.v1_2_0; unstableVersion = true; }; 2010 - nodejs-0_10 = callPackage ../development/web/nodejs/v0_10.nix { }; 2010 + nodejs-0_10 = callPackage ../development/web/nodejs/v0_10.nix { 2011 + libtool = darwin.cctools; 2012 + inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices Carbon Foundation; 2013 + }; 2011 2014 2012 - nodejs = if stdenv.system == "armv5tel-linux" then 2015 + nodejs = if stdenv.system == "armv5tel-linux" || stdenv.isDarwin then 2013 2016 nodejs-0_10 2014 2017 else 2015 2018 nodejs-0_12;