darwin purity: nodejs-0.10

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