commit
98df4f6351
@ -174,6 +174,7 @@ stdenv.mkDerivation {
|
|||||||
gappsWrapperArgs+=(--argv0 "$out/bin/.firefox-wrapped")
|
gappsWrapperArgs+=(--argv0 "$out/bin/.firefox-wrapped")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.execdir = "/bin";
|
||||||
passthru.ffmpegSupport = true;
|
passthru.ffmpegSupport = true;
|
||||||
passthru.gssSupport = true;
|
passthru.gssSupport = true;
|
||||||
# update with:
|
# update with:
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
## optional libraries
|
## optional libraries
|
||||||
|
|
||||||
, alsaSupport ? true, alsaLib
|
, alsaSupport ? stdenv.isLinux, alsaLib
|
||||||
, pulseaudioSupport ? true, libpulseaudio
|
, pulseaudioSupport ? true, libpulseaudio
|
||||||
, ffmpegSupport ? true, gstreamer, gst-plugins-base
|
, ffmpegSupport ? true, gstreamer, gst-plugins-base
|
||||||
, gtk3Support ? !isTorBrowserLike, gtk2, gtk3, wrapGAppsHook
|
, gtk3Support ? !isTorBrowserLike, gtk2, gtk3, wrapGAppsHook
|
||||||
@ -39,6 +39,10 @@
|
|||||||
, safeBrowsingSupport ? false
|
, safeBrowsingSupport ? false
|
||||||
, drmSupport ? false
|
, drmSupport ? false
|
||||||
|
|
||||||
|
# macOS dependencies
|
||||||
|
, xcbuild, CoreMedia, ExceptionHandling, Kerberos, AVFoundation, MediaToolbox
|
||||||
|
, CoreLocation, Foundation, AddressBook, libobjc, cups, rsync
|
||||||
|
|
||||||
## other
|
## other
|
||||||
|
|
||||||
# As stated by Sylvestre Ledru (@sylvestre) on Nov 22, 2017 at
|
# As stated by Sylvestre Ledru (@sylvestre) on Nov 22, 2017 at
|
||||||
@ -66,7 +70,14 @@ assert stdenv.cc.libc or null != null;
|
|||||||
|
|
||||||
let
|
let
|
||||||
flag = tf: x: [(if tf then "--enable-${x}" else "--disable-${x}")];
|
flag = tf: x: [(if tf then "--enable-${x}" else "--disable-${x}")];
|
||||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
|
||||||
|
default-toolkit = if stdenv.isDarwin then "cairo-cocoa"
|
||||||
|
else "cairo-gtk${if gtk3Support then "3" else "2"}";
|
||||||
|
|
||||||
|
execdir = if stdenv.isDarwin
|
||||||
|
then "/Applications/${browserName}.app/Contents/MacOS"
|
||||||
|
else "/bin";
|
||||||
|
browserName = if stdenv.isDarwin then "Firefox" else "firefox";
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation (rec {
|
stdenv.mkDerivation (rec {
|
||||||
@ -90,13 +101,27 @@ stdenv.mkDerivation (rec {
|
|||||||
++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed
|
++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed
|
||||||
++ lib.optionals ffmpegSupport [ gstreamer gst-plugins-base ]
|
++ lib.optionals ffmpegSupport [ gstreamer gst-plugins-base ]
|
||||||
++ lib.optional gtk3Support gtk3
|
++ lib.optional gtk3Support gtk3
|
||||||
++ lib.optional gssSupport kerberos;
|
++ lib.optional gssSupport kerberos
|
||||||
|
++ lib.optionals stdenv.isDarwin [ CoreMedia ExceptionHandling Kerberos
|
||||||
|
AVFoundation MediaToolbox CoreLocation
|
||||||
|
Foundation libobjc AddressBook cups ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss -I${glib.dev}/include/gio-unix-2.0";
|
NIX_CFLAGS_COMPILE = [ "-I${nspr.dev}/include/nspr"
|
||||||
|
"-I${nss.dev}/include/nss"
|
||||||
|
"-I${glib.dev}/include/gio-unix-2.0" ]
|
||||||
|
++ lib.optional stdenv.isDarwin [
|
||||||
|
"-isystem ${llvmPackages.libcxx}/include/c++/v1"
|
||||||
|
"-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10" ];
|
||||||
|
|
||||||
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace js/src/jsmath.cpp --replace 'defined(HAVE___SINCOS)' 0
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
[ autoconf213 which gnused pkgconfig perl python2 cargo rustc ]
|
[ autoconf213 which gnused pkgconfig perl python2 cargo rustc ]
|
||||||
++ lib.optional gtk3Support wrapGAppsHook ++ extraNativeBuildInputs;
|
++ lib.optional gtk3Support wrapGAppsHook
|
||||||
|
++ lib.optionals stdenv.isDarwin [ xcbuild rsync ]
|
||||||
|
++ extraNativeBuildInputs;
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
# remove distributed configuration files
|
# remove distributed configuration files
|
||||||
@ -111,10 +136,22 @@ stdenv.mkDerivation (rec {
|
|||||||
make -f client.mk configure-files
|
make -f client.mk configure-files
|
||||||
configureScript="$(realpath ./configure)"
|
configureScript="$(realpath ./configure)"
|
||||||
'') + ''
|
'') + ''
|
||||||
cxxLib=$( echo -n ${gcc}/include/c++/* )
|
export MOZCONFIG=$(pwd)/mozconfig
|
||||||
archLib=$cxxLib/$( ${gcc}/bin/gcc -dumpmachine )
|
|
||||||
|
|
||||||
test -f layout/style/ServoBindings.toml && sed -i -e '/"-DRUST_BINDGEN"/ a , "-cxx-isystem", "'$cxxLib'", "-isystem", "'$archLib'"' layout/style/ServoBindings.toml
|
# Set C flags for Rust's bindgen program. Unlike ordinary C
|
||||||
|
# compilation, bindgen does not invoke $CC directly. Instead it
|
||||||
|
# uses LLVM's libclang. To make sure all necessary flags are
|
||||||
|
# included we need to look in a few places.
|
||||||
|
# TODO: generalize this process for other use-cases.
|
||||||
|
|
||||||
|
BINDGEN_CFLAGS="$(< ${stdenv.cc}/nix-support/libc-cflags) \
|
||||||
|
$(< ${stdenv.cc}/nix-support/cc-cflags) \
|
||||||
|
${stdenv.cc.default_cxx_stdlib_compile} \
|
||||||
|
${lib.optionalString stdenv.cc.isClang "-idirafter ${stdenv.cc.cc}/lib/clang/${lib.getVersion stdenv.cc.cc}/include"} \
|
||||||
|
${lib.optionalString stdenv.cc.isGNU "-isystem ${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc} -isystem ${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc}/$(cc -dumpmachine)"} \
|
||||||
|
$NIX_CFLAGS_COMPILE"
|
||||||
|
|
||||||
|
echo "ac_add_options BINDGEN_CFLAGS='$BINDGEN_CFLAGS'" >> $MOZCONFIG
|
||||||
'' + lib.optionalString googleAPISupport ''
|
'' + lib.optionalString googleAPISupport ''
|
||||||
# Google API key used by Chromium and Firefox.
|
# Google API key used by Chromium and Firefox.
|
||||||
# Note: These are for NixOS/nixpkgs use ONLY. For your own distribution,
|
# Note: These are for NixOS/nixpkgs use ONLY. For your own distribution,
|
||||||
@ -146,7 +183,8 @@ stdenv.mkDerivation (rec {
|
|||||||
"--enable-jemalloc"
|
"--enable-jemalloc"
|
||||||
"--disable-maintenance-service"
|
"--disable-maintenance-service"
|
||||||
"--disable-gconf"
|
"--disable-gconf"
|
||||||
"--enable-default-toolkit=cairo-gtk${if gtk3Support then "3" else "2"}"
|
"--enable-default-toolkit=${default-toolkit}"
|
||||||
|
"--disable-xcode-checks"
|
||||||
]
|
]
|
||||||
++ lib.optional (lib.versionOlder version "61") "--enable-system-hunspell"
|
++ lib.optional (lib.versionOlder version "61") "--enable-system-hunspell"
|
||||||
++ lib.optionals (lib.versionAtLeast version "56" && !stdenv.hostPlatform.isi686) [
|
++ lib.optionals (lib.versionAtLeast version "56" && !stdenv.hostPlatform.isi686) [
|
||||||
@ -223,7 +261,12 @@ stdenv.mkDerivation (rec {
|
|||||||
paxmark m dist/bin/xpcshell
|
paxmark m dist/bin/xpcshell
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
installPhase = if stdenv.isDarwin then ''
|
||||||
|
mkdir -p $out/Applications
|
||||||
|
cp -LR dist/Firefox.app $out/Applications
|
||||||
|
'' else null;
|
||||||
|
|
||||||
|
postInstall = lib.optionalString stdenv.isLinux ''
|
||||||
# For grsecurity kernels
|
# For grsecurity kernels
|
||||||
paxmark m $out/lib/firefox*/{firefox,firefox-bin,plugin-container}
|
paxmark m $out/lib/firefox*/{firefox,firefox-bin,plugin-container}
|
||||||
|
|
||||||
@ -234,7 +277,7 @@ stdenv.mkDerivation (rec {
|
|||||||
gappsWrapperArgs+=(--argv0 "$out/bin/.firefox-wrapped")
|
gappsWrapperArgs+=(--argv0 "$out/bin/.firefox-wrapped")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = lib.optionalString stdenv.isLinux ''
|
||||||
# Fix notifications. LibXUL uses dlopen for this, unfortunately; see #18712.
|
# Fix notifications. LibXUL uses dlopen for this, unfortunately; see #18712.
|
||||||
patchelf --set-rpath "${lib.getLib libnotify
|
patchelf --set-rpath "${lib.getLib libnotify
|
||||||
}/lib:$(patchelf --print-rpath "$out"/lib/firefox*/libxul.so)" \
|
}/lib:$(patchelf --print-rpath "$out"/lib/firefox*/libxul.so)" \
|
||||||
@ -244,11 +287,10 @@ stdenv.mkDerivation (rec {
|
|||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
# Some basic testing
|
# Some basic testing
|
||||||
"$out/bin/firefox" --version
|
"$out${execdir}/${browserName}" --version
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
browserName = "firefox";
|
|
||||||
inherit version updateScript;
|
inherit version updateScript;
|
||||||
isFirefox3Like = true;
|
isFirefox3Like = true;
|
||||||
inherit isTorBrowserLike;
|
inherit isTorBrowserLike;
|
||||||
@ -256,6 +298,8 @@ stdenv.mkDerivation (rec {
|
|||||||
inherit nspr;
|
inherit nspr;
|
||||||
inherit ffmpegSupport;
|
inherit ffmpegSupport;
|
||||||
inherit gssSupport;
|
inherit gssSupport;
|
||||||
|
inherit execdir;
|
||||||
|
inherit browserName;
|
||||||
} // lib.optionalAttrs gtk3Support { inherit gtk3; };
|
} // lib.optionalAttrs gtk3Support { inherit gtk3; };
|
||||||
|
|
||||||
} // overrides)
|
} // overrides)
|
||||||
|
@ -36,7 +36,7 @@ rec {
|
|||||||
description = "A web browser built from Firefox source tree";
|
description = "A web browser built from Firefox source tree";
|
||||||
homepage = http://www.mozilla.com/en-US/firefox/;
|
homepage = http://www.mozilla.com/en-US/firefox/;
|
||||||
maintainers = with lib.maintainers; [ eelco ];
|
maintainers = with lib.maintainers; [ eelco ];
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.unix;
|
||||||
};
|
};
|
||||||
updateScript = callPackage ./update.nix {
|
updateScript = callPackage ./update.nix {
|
||||||
attrPath = "firefox-unwrapped";
|
attrPath = "firefox-unwrapped";
|
||||||
|
@ -98,24 +98,28 @@ let
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [makeWrapper]
|
nativeBuildInputs = [ makeWrapper lndir ];
|
||||||
++ lib.optional (browser ? gtk3) browser.gtk3;
|
buildInputs = lib.optional (browser ? gtk3) browser.gtk3;
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = lib.optionalString stdenv.isDarwin ''
|
||||||
if [ ! -x "${browser}/bin/${browserName}" ]
|
mkdir -p $out/Applications
|
||||||
|
cp -R --no-preserve=mode,ownership ${browser}/Applications/${browserName}.app $out/Applications
|
||||||
|
rm -f $out${browser.execdir}/${browserName}
|
||||||
|
'' + ''
|
||||||
|
if [ ! -x "${browser}${browser.execdir}/${browserName}" ]
|
||||||
then
|
then
|
||||||
echo "cannot find executable file \`${browser}/bin/${browserName}'"
|
echo "cannot find executable file \`${browser}${browser.execdir}/${browserName}'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
makeWrapper "$(readlink -v --canonicalize-existing "${browser}/bin/${browserName}")" \
|
makeWrapper "$(readlink -v --canonicalize-existing "${browser}${browser.execdir}/${browserName}")" \
|
||||||
"$out/bin/${browserName}${nameSuffix}" \
|
"$out${browser.execdir}/${browserName}${nameSuffix}" \
|
||||||
--suffix-each MOZ_PLUGIN_PATH ':' "$plugins" \
|
--suffix-each MOZ_PLUGIN_PATH ':' "$plugins" \
|
||||||
--suffix LD_LIBRARY_PATH ':' "$libs" \
|
--suffix LD_LIBRARY_PATH ':' "$libs" \
|
||||||
--suffix-each GTK_PATH ':' "$gtk_modules" \
|
--suffix-each GTK_PATH ':' "$gtk_modules" \
|
||||||
--suffix-each LD_PRELOAD ':' "$(cat $(filterExisting $(addSuffix /extra-ld-preload $plugins)))" \
|
--suffix-each LD_PRELOAD ':' "$(cat $(filterExisting $(addSuffix /extra-ld-preload $plugins)))" \
|
||||||
--prefix-contents PATH ':' "$(filterExisting $(addSuffix /extra-bin-path $plugins))" \
|
--prefix-contents PATH ':' "$(filterExisting $(addSuffix /extra-bin-path $plugins))" \
|
||||||
--suffix PATH ':' "$out/bin" \
|
--suffix PATH ':' "$out${browser.execdir}" \
|
||||||
--set MOZ_APP_LAUNCHER "${browserName}${nameSuffix}" \
|
--set MOZ_APP_LAUNCHER "${browserName}${nameSuffix}" \
|
||||||
--set MOZ_SYSTEM_DIR "$out/lib/mozilla" \
|
--set MOZ_SYSTEM_DIR "$out/lib/mozilla" \
|
||||||
${lib.optionalString (browser ? gtk3)
|
${lib.optionalString (browser ? gtk3)
|
||||||
@ -141,7 +145,7 @@ let
|
|||||||
|
|
||||||
mkdir -p $out/lib/mozilla
|
mkdir -p $out/lib/mozilla
|
||||||
for ext in ${toString nativeMessagingHosts}; do
|
for ext in ${toString nativeMessagingHosts}; do
|
||||||
${lndir}/bin/lndir -silent $ext/lib/mozilla $out/lib/mozilla
|
lndir -silent $ext/lib/mozilla $out/lib/mozilla
|
||||||
done
|
done
|
||||||
|
|
||||||
# For manpages, in case the program supplies them
|
# For manpages, in case the program supplies them
|
||||||
|
@ -337,6 +337,7 @@ stdenv.mkDerivation rec {
|
|||||||
$out/bin/tor-browser -version >/dev/null
|
$out/bin/tor-browser -version >/dev/null
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.execdir = "/bin";
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "An unofficial version of the tor browser bundle, built from source";
|
description = "An unofficial version of the tor browser bundle, built from source";
|
||||||
homepage = https://torproject.org/;
|
homepage = https://torproject.org/;
|
||||||
|
@ -294,8 +294,7 @@ runCommand "Platforms" {} ''
|
|||||||
install -D ${writeText "PackageTypes.xcspec" (toPlist {} PackageTypes)} $platform/Developer/Library/Xcode/Specifications/PackageTypes.xcspec
|
install -D ${writeText "PackageTypes.xcspec" (toPlist {} PackageTypes)} $platform/Developer/Library/Xcode/Specifications/PackageTypes.xcspec
|
||||||
install -D ${writeText "ProductTypes.xcspec" (toPlist {} ProductTypes)} $platform/Developer/Library/Xcode/Specifications/ProductTypes.xcspec
|
install -D ${writeText "ProductTypes.xcspec" (toPlist {} ProductTypes)} $platform/Developer/Library/Xcode/Specifications/ProductTypes.xcspec
|
||||||
|
|
||||||
# per-platform bins go here
|
ln -s $platform $platform/usr
|
||||||
mkdir -p $platform/usr/bin
|
|
||||||
|
|
||||||
mkdir -p $platform/Developer
|
mkdir -p $platform/Developer
|
||||||
ln -s ${sdks} $platform/Developer/SDKs
|
ln -s ${sdks} $platform/Developer/SDKs
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{ runCommand, lib, toolchainName, sdkName, writeText, version, xcodePlatform }:
|
{ stdenv, runCommand, lib, toolchainName, sdkName
|
||||||
|
, writeText, version, xcodePlatform, libcxx, symlinkJoin }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib.generators) toPlist;
|
inherit (lib.generators) toPlist;
|
||||||
@ -18,11 +19,11 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
runCommand "SDKs" {
|
runCommand "SDKs" {} ''
|
||||||
inherit version;
|
|
||||||
} ''
|
|
||||||
sdk=$out/${sdkName}.sdk
|
sdk=$out/${sdkName}.sdk
|
||||||
install -D ${writeText "SDKSettings.plist" (toPlist {} SDKSettings)} $sdk/SDKSettings.plist
|
install -D ${writeText "SDKSettings.plist" (toPlist {} SDKSettings)} $sdk/SDKSettings.plist
|
||||||
install -D ${writeText "SystemVersion.plist" (toPlist {} SystemVersion)} $sdk/System/Library/CoreServices/SystemVersion.plist
|
install -D ${writeText "SystemVersion.plist" (toPlist {} SystemVersion)} $sdk/System/Library/CoreServices/SystemVersion.plist
|
||||||
|
ln -s $sdk $sdk/usr
|
||||||
|
|
||||||
ln -s $sdk $out/${xcodePlatform}.sdk
|
ln -s $sdk $out/${xcodePlatform}.sdk
|
||||||
''
|
''
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ runCommand, toolchainName, fetchurl, makeWrapper, stdenv
|
{ runCommand, toolchainName, fetchurl, stdenv
|
||||||
, buildPackages, lib, writeText }:
|
, buildPackages, lib, writeText }:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -20,52 +20,52 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
runCommand "Toolchains" {
|
runCommand "Toolchains" {} (''
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
|
||||||
} (''
|
|
||||||
toolchain=$out/XcodeDefault.xctoolchain
|
toolchain=$out/XcodeDefault.xctoolchain
|
||||||
mkdir -p $toolchain
|
mkdir -p $toolchain
|
||||||
|
|
||||||
install -D ${writeText "ToolchainInfo.plist" (toPlist {} ToolchainInfo)} $toolchain/ToolchainInfo.plist
|
install -D ${writeText "ToolchainInfo.plist" (toPlist {} ToolchainInfo)} $toolchain/ToolchainInfo.plist
|
||||||
|
|
||||||
mkdir -p $toolchain/usr/include
|
ln -s $toolchain $toolchain/usr
|
||||||
mkdir -p $toolchain/usr/lib
|
|
||||||
mkdir -p $toolchain/usr/libexec
|
mkdir -p $toolchain/include
|
||||||
mkdir -p $toolchain/usr/share
|
mkdir -p $toolchain/lib
|
||||||
mkdir -p $toolchain/usr/bin
|
mkdir -p $toolchain/libexec
|
||||||
|
mkdir -p $toolchain/share
|
||||||
|
mkdir -p $toolchain/bin
|
||||||
|
|
||||||
for bin in ${getBin stdenv.cc}/bin/*; do
|
for bin in ${getBin stdenv.cc}/bin/*; do
|
||||||
ln -s $bin $toolchain/usr/bin
|
ln -s $bin $toolchain/bin
|
||||||
done
|
done
|
||||||
|
|
||||||
for bin in ${getBin stdenv.cc.bintools.bintools}/bin/*; do
|
for bin in ${getBin stdenv.cc.bintools.bintools}/bin/*; do
|
||||||
if ! [ -e "$toolchain/usr/bin/$(basename $bin)" ]; then
|
if ! [ -e "$toolchain/bin/$(basename $bin)" ]; then
|
||||||
ln -s $bin $toolchain/usr/bin
|
ln -s $bin $toolchain/bin
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
ln -s ${buildPackages.yacc}/bin/yacc $toolchain/usr/bin/yacc
|
ln -s ${buildPackages.yacc}/bin/yacc $toolchain/bin/yacc
|
||||||
ln -s ${buildPackages.yacc}/bin/bison $toolchain/usr/bin/bison
|
ln -s ${buildPackages.yacc}/bin/bison $toolchain/bin/bison
|
||||||
ln -s ${buildPackages.flex}/bin/flex $toolchain/usr/bin/flex
|
ln -s ${buildPackages.flex}/bin/flex $toolchain/bin/flex
|
||||||
ln -s ${buildPackages.flex}/bin/flex++ $toolchain/usr/bin/flex++
|
ln -s ${buildPackages.flex}/bin/flex++ $toolchain/bin/flex++
|
||||||
ln -s $toolchain/bin/flex $toolchain/usr/bin/lex
|
ln -s $toolchain/bin/flex $toolchain/bin/lex
|
||||||
|
|
||||||
ln -s ${buildPackages.m4}/bin/m4 $toolchain/usr/bin/m4
|
ln -s ${buildPackages.m4}/bin/m4 $toolchain/bin/m4
|
||||||
ln -s $toolchain/usr/bin/m4 $toolchain/usr/bin/gm4
|
ln -s $toolchain/bin/m4 $toolchain/bin/gm4
|
||||||
|
|
||||||
ln -s ${buildPackages.unifdef}/bin/unifdef $toolchain/usr/bin/unifdef
|
ln -s ${buildPackages.unifdef}/bin/unifdef $toolchain/bin/unifdef
|
||||||
ln -s ${buildPackages.unifdef}/bin/unifdefall $toolchain/usr/bin/unifdefall
|
ln -s ${buildPackages.unifdef}/bin/unifdefall $toolchain/bin/unifdefall
|
||||||
|
|
||||||
ln -s ${buildPackages.gperf}/bin/gperf $toolchain/usr/bin/gperf
|
ln -s ${buildPackages.gperf}/bin/gperf $toolchain/bin/gperf
|
||||||
ln -s ${buildPackages.indent}/bin/indent $toolchain/usr/bin/indent
|
ln -s ${buildPackages.indent}/bin/indent $toolchain/bin/indent
|
||||||
ln -s ${buildPackages.ctags}/bin/ctags $toolchain/usr/bin/ctags
|
ln -s ${buildPackages.ctags}/bin/ctags $toolchain/bin/ctags
|
||||||
'' + optionalString stdenv.isDarwin ''
|
'' + optionalString stdenv.isDarwin ''
|
||||||
for bin in ${getBin buildPackages.darwin.cctools}/bin/*; do
|
for bin in ${getBin buildPackages.darwin.cctools}/bin/*; do
|
||||||
if ! [ -e "$toolchain/usr/bin/$(basename $bin)" ]; then
|
if ! [ -e "$toolchain/bin/$(basename $bin)" ]; then
|
||||||
ln -s $bin $toolchain/usr/bin
|
ln -s $bin $toolchain/bin
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
ln -s ${buildPackages.darwin.bootstrap_cmds}/bin/mig $toolchain/usr/bin
|
ln -s ${buildPackages.darwin.bootstrap_cmds}/bin/mig $toolchain/bin
|
||||||
ln -s ${mkdep-darwin-src} $toolchain/usr/bin/mkdep
|
ln -s ${mkdep-darwin-src} $toolchain/bin/mkdep
|
||||||
'')
|
'')
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, buildPackages, makeWrapper, writeText, runCommand
|
{ stdenv, lib, buildPackages, makeWrapper, writeText, runCommand
|
||||||
, CoreServices, ImageIO, CoreGraphics
|
, CoreServices, ImageIO, CoreGraphics
|
||||||
, targetPlatform
|
, targetPlatform
|
||||||
, xcodePlatform ? targetPlatform.xcodePlatform or "MacOSX"
|
, xcodePlatform ? targetPlatform.xcodePlatform or "MacOSX"
|
||||||
@ -36,14 +36,14 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
xcode-select = writeText "xcode-select" ''
|
xcode-select = writeText "xcode-select" ''
|
||||||
#!/usr/bin/env sh
|
#!${stdenv.shell}
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | --help) ;; # noop
|
-h | --help) ;; # noop
|
||||||
-s | --switch) shift;; # noop
|
-s | --switch) shift;; # noop
|
||||||
-r | --reset) ;; # noop
|
-r | --reset) ;; # noop
|
||||||
-v | --version) echo xcode-select version ${xcodeSelectVersion} ;;
|
-v | --version) echo xcode-select version ${xcodeSelectVersion} ;;
|
||||||
-p | --print-path) echo @DEVELOPER_DIR@ ;;
|
-p | -print-path | --print-path) echo @DEVELOPER_DIR@ ;;
|
||||||
--install) ;; # noop
|
--install) ;; # noop
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
@ -51,7 +51,7 @@ done
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
xcrun = writeText "xcrun" ''
|
xcrun = writeText "xcrun" ''
|
||||||
#!/usr/bin/env sh
|
#!${stdenv.shell}
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--sdk | -sdk) shift ;;
|
--sdk | -sdk) shift ;;
|
||||||
@ -86,16 +86,20 @@ runCommand "xcodebuild-${xcbuild.version}" {
|
|||||||
inherit (xcbuild) meta;
|
inherit (xcbuild) meta;
|
||||||
|
|
||||||
# ensure that the toolchain goes in PATH
|
# ensure that the toolchain goes in PATH
|
||||||
propagatedBuildInputs = [ "${toolchains}/XcodeDefault.xctoolchain/usr" ];
|
propagatedBuildInputs = [ "${toolchains}/XcodeDefault.xctoolchain" ];
|
||||||
|
|
||||||
passthru = { inherit xcbuild; };
|
passthru = {
|
||||||
|
inherit xcbuild;
|
||||||
|
toolchain = "${toolchains}/XcodeDefault.xctoolchain";
|
||||||
|
sdk = "${sdks}/${sdkName}";
|
||||||
|
platform = "${platforms}/${xcodePlatform}.platform";
|
||||||
|
};
|
||||||
|
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
} ''
|
} ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
|
||||||
mkdir -p $out/usr
|
ln -s $out $out/usr
|
||||||
ln -s $out/bin $out/usr/bin
|
|
||||||
|
|
||||||
mkdir -p $out/Library/Xcode
|
mkdir -p $out/Library/Xcode
|
||||||
ln -s ${xcbuild}/Library/Xcode/Specifications $out/Library/Xcode/Specifications
|
ln -s ${xcbuild}/Library/Xcode/Specifications $out/Library/Xcode/Specifications
|
||||||
@ -108,7 +112,8 @@ runCommand "xcodebuild-${xcbuild.version}" {
|
|||||||
--add-flags "DERIVED_DATA_DIR=." \
|
--add-flags "DERIVED_DATA_DIR=." \
|
||||||
--set DEVELOPER_DIR "$out" \
|
--set DEVELOPER_DIR "$out" \
|
||||||
--set SDKROOT ${sdkName} \
|
--set SDKROOT ${sdkName} \
|
||||||
--run '[ "$1" = "-version" ] && (echo Xcode ${xcodeVer}; echo Build version ${sdkBuildVersion}) && exit 0'
|
--run '[ "$1" = "-version" ] && (echo Xcode ${xcodeVer}; echo Build version ${sdkBuildVersion}) && exit 0' \
|
||||||
|
--run '[ "$1" = "-license" ] && exit 0'
|
||||||
|
|
||||||
substitute ${xcode-select} $out/bin/xcode-select \
|
substitute ${xcode-select} $out/bin/xcode-select \
|
||||||
--subst-var-by DEVELOPER_DIR $out
|
--subst-var-by DEVELOPER_DIR $out
|
||||||
|
@ -16306,6 +16306,10 @@ with pkgs;
|
|||||||
python = python2;
|
python = python2;
|
||||||
gnused = gnused_422;
|
gnused = gnused_422;
|
||||||
icu = icu59;
|
icu = icu59;
|
||||||
|
inherit (darwin.apple_sdk.frameworks) CoreMedia ExceptionHandling
|
||||||
|
Kerberos AVFoundation MediaToolbox
|
||||||
|
CoreLocation Foundation AddressBook;
|
||||||
|
inherit (darwin) libobjc;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ let
|
|||||||
constituents =
|
constituents =
|
||||||
[ jobs.tarball
|
[ jobs.tarball
|
||||||
jobs.cabal2nix.x86_64-darwin
|
jobs.cabal2nix.x86_64-darwin
|
||||||
jobs.emacs.x86_64-darwin
|
|
||||||
jobs.ghc.x86_64-darwin
|
jobs.ghc.x86_64-darwin
|
||||||
jobs.git.x86_64-darwin
|
jobs.git.x86_64-darwin
|
||||||
jobs.go.x86_64-darwin
|
jobs.go.x86_64-darwin
|
||||||
@ -57,9 +56,20 @@ let
|
|||||||
jobs.python3.x86_64-darwin
|
jobs.python3.x86_64-darwin
|
||||||
jobs.ruby.x86_64-darwin
|
jobs.ruby.x86_64-darwin
|
||||||
jobs.rustc.x86_64-darwin
|
jobs.rustc.x86_64-darwin
|
||||||
|
jobs.stack.x86_64-darwin
|
||||||
jobs.stdenv.x86_64-darwin
|
jobs.stdenv.x86_64-darwin
|
||||||
jobs.vim.x86_64-darwin
|
jobs.vim.x86_64-darwin
|
||||||
|
|
||||||
|
# UI apps
|
||||||
|
jobs.firefox.x86_64-darwin
|
||||||
|
jobs.qt5.qtmultimedia.x86_64-darwin
|
||||||
|
jobs.inkscape.x86_64-darwin
|
||||||
|
# jobs.gimp.x86_64-darwin
|
||||||
|
jobs.emacs.x86_64-darwin
|
||||||
|
# jobs.wireshark.x86_64-darwin
|
||||||
|
jobs.transmision-gtk.x86_64-darwin
|
||||||
|
|
||||||
|
# Tests
|
||||||
jobs.tests.cc-wrapper.x86_64-darwin
|
jobs.tests.cc-wrapper.x86_64-darwin
|
||||||
jobs.tests.cc-wrapper-clang.x86_64-darwin
|
jobs.tests.cc-wrapper-clang.x86_64-darwin
|
||||||
jobs.tests.cc-wrapper-libcxx.x86_64-darwin
|
jobs.tests.cc-wrapper-libcxx.x86_64-darwin
|
||||||
|
Loading…
Reference in New Issue
Block a user