mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 14:41:17 +00:00
darwin purity: nodejs-0.10
This commit is contained in:
parent
097ffe89cd
commit
f72beea75e
|
@ -1,13 +1,11 @@
|
|||
{ stdenv, fetchurl, openssl, python, zlib, v8, utillinux, http-parser, c-ares
|
||||
, pkgconfig, runCommand, which
|
||||
, pkgconfig, runCommand, which, libtool
|
||||
|
||||
# apple frameworks
|
||||
, CoreServices, ApplicationServices, Carbon, Foundation
|
||||
}:
|
||||
|
||||
let
|
||||
dtrace = runCommand "dtrace-native" {} ''
|
||||
mkdir -p $out/bin
|
||||
ln -sv /usr/sbin/dtrace $out/bin
|
||||
'';
|
||||
|
||||
version = "0.10.38";
|
||||
|
||||
# !!! Should we also do shared libuv?
|
||||
|
@ -37,21 +35,23 @@ in stdenv.mkDerivation {
|
|||
sha256 = "12xpa9jzry5g0j41908498qqs8v0q6miqkv6mggyzas8bvnshgai";
|
||||
};
|
||||
|
||||
configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps);
|
||||
configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps) ++
|
||||
stdenv.lib.optional stdenv.isDarwin "--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;
|
||||
patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode.patch;
|
||||
|
||||
postPatch = if stdenv.isDarwin then ''
|
||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
(cd tools/gyp; patch -Np1 -i ${../../python-modules/gyp/no-darwin-cflags.patch})
|
||||
'' else null;
|
||||
'';
|
||||
|
||||
buildInputs = [ python which ]
|
||||
++ (optional stdenv.isLinux utillinux)
|
||||
++ optionals stdenv.isDarwin [ pkgconfig openssl dtrace ];
|
||||
++ optionals stdenv.isDarwin [ pkgconfig openssl libtool CoreServices ApplicationServices Foundation ];
|
||||
propagatedBuildInputs = optionals stdenv.isDarwin [ Carbon ];
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
passthru.interpreterName = "nodejs-0.10";
|
||||
|
|
|
@ -108,7 +108,8 @@ with frameworks; with libs; {
|
|||
# Umbrellas
|
||||
Accelerate = [ CoreWLAN IOBluetooth ];
|
||||
ApplicationServices = [ CoreFoundation CoreServices CoreText ImageIO ];
|
||||
Carbon = [ ApplicationServices CoreFoundation CoreServices IOKit Security ];
|
||||
Carbon = [ ApplicationServices CoreFoundation CoreServices IOKit Security QuartzCore ];
|
||||
CoreBluetooth = [];
|
||||
CoreServices = [ CFNetwork CoreAudio CoreData CoreFoundation DiskArbitration Security NetFS OpenDirectory ServiceManagement ];
|
||||
IOBluetooth = [ IOKit ];
|
||||
JavaVM = [];
|
||||
|
|
|
@ -54,6 +54,7 @@ rec {
|
|||
];
|
||||
QuartzCore = [
|
||||
"/System/Library/Frameworks/QuartzCore.framework"
|
||||
"/System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport"
|
||||
];
|
||||
PCSC = [
|
||||
"/System/Library/Frameworks/PCSC.framework"
|
||||
|
@ -131,6 +132,14 @@ rec {
|
|||
];
|
||||
Carbon = [
|
||||
"/System/Library/Frameworks/Carbon.framework"
|
||||
"/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI"
|
||||
"/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv"
|
||||
"/System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices"
|
||||
"/System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary"
|
||||
"/System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity"
|
||||
"/System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing"
|
||||
"/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211"
|
||||
"/System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage"
|
||||
];
|
||||
CoreAudio = [
|
||||
"/System/Library/Frameworks/CoreAudio.framework"
|
||||
|
@ -169,7 +178,9 @@ rec {
|
|||
];
|
||||
IOBluetooth = [
|
||||
"/System/Library/Frameworks/IOBluetooth.framework"
|
||||
"/System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth"
|
||||
] ++ AudioUnit ++ CoreBluetooth;
|
||||
CoreBluetooth = [
|
||||
"/System/Library/Frameworks/CoreBluetooth.framework"
|
||||
];
|
||||
SecurityFoundation = [
|
||||
"/System/Library/Frameworks/SecurityFoundation.framework"
|
||||
|
|
|
@ -2007,9 +2007,12 @@ let
|
|||
libtool = darwin.cctools;
|
||||
};
|
||||
nodejs-unstable = callPackage ../development/web/nodejs { libuv = libuvVersions.v1_2_0; unstableVersion = true; };
|
||||
nodejs-0_10 = callPackage ../development/web/nodejs/v0_10.nix { };
|
||||
nodejs-0_10 = callPackage ../development/web/nodejs/v0_10.nix {
|
||||
libtool = darwin.cctools;
|
||||
inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices Carbon Foundation;
|
||||
};
|
||||
|
||||
nodejs = if stdenv.system == "armv5tel-linux" then
|
||||
nodejs = if stdenv.system == "armv5tel-linux" || stdenv.isDarwin then
|
||||
nodejs-0_10
|
||||
else
|
||||
nodejs-0_12;
|
||||
|
|
Loading…
Reference in a new issue