Skip to content

Commit

Permalink
I wish this worked
Browse files Browse the repository at this point in the history
  • Loading branch information
TimePath committed May 21, 2017
1 parent 28e05a0 commit 700f827
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pkgs/development/libraries/libuv/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub, autoconf, automake, libtool, pkgconfig
, ApplicationServices, CoreServices }:
, ApplicationServices, CoreServices, targetPlatform, buildPlatform }:

stdenv.mkDerivation rec {
version = "1.11.0";
Expand Down Expand Up @@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
# These should be turned back on, but see https://github.com/NixOS/nixpkgs/issues/23651
# For now the tests are just breaking large swaths of the nixpkgs binary cache for Darwin,
# and I'd rather have everything else work at all than have stronger assurance here.
doCheck = !stdenv.isDarwin;
doCheck = !(stdenv.isDarwin /*|| (targetPlatform != buildPlatform)*/);

meta = with lib; {
description = "A multi-platform support library with a focus on asynchronous I/O";
Expand Down
3 changes: 3 additions & 0 deletions pkgs/os-specific/darwin/binutils/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ stdenv.mkDerivation {
for i in ${stdenv.lib.concatStringsSep " " (builtins.map (e: prefix + e) cmds)}; do
ln -sf "${cctools}/bin/$i" "$out/bin/$i"
done
for i in dsymutil; do
ln -sf "${cctools}/bin/$i" "$out/bin/$i"
done
for i in ${binutils-raw.dev or binutils-raw.out}/include/*.h; do
ln -s "$i" "$out/include/$(basename $i)"
Expand Down
8 changes: 7 additions & 1 deletion pkgs/os-specific/darwin/cctools/port.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ let
substituteInPlace cctools/include/Makefile \
--replace "/bin/" ""
substituteInPlace cctools/as/driver.c \
--replace 'if(arch_name == NULL){' 'if (arch_name == NULL) {arch_name = "x86_64";} if(arch_name == NULL){'
patchShebangs tools
sed -i -e 's/which/type -P/' tools/*.sh
Expand Down Expand Up @@ -99,8 +102,11 @@ let
chmod +x $out/bin/dsymutil
''
else ''
. ${makeWrapper}/nix-support/setup-hook
wrapProgram "$out/bin/${targetPlatform.config}-as" \
--suffix PATH : ${stdenv.lib.makeBinPath [ clang ]}
for tool in dyldinfo dwarfdump dsymutil; do
${makeWrapper}/bin/makeWrapper "${maloader}/bin/ld-mac" "$out/bin/${targetPlatform.config}-$tool" \
makeWrapper "${maloader}/bin/ld-mac" "$out/bin/${targetPlatform.config}-$tool" \
--add-flags "${xctoolchain}/bin/$tool"
ln -s "$out/bin/${targetPlatform.config}-$tool" "$out/bin/$tool"
done
Expand Down
9 changes: 6 additions & 3 deletions pkgs/os-specific/darwin/maloader/default.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
{ stdenv, fetchgit, opencflite, clang, libcxx }:
{ stdenv, fetchgit, opencflite, clang, libcxx, libcxxabi }:

stdenv.mkDerivation {
name = "maloader-0git";

src = fetchgit {
url = "git://github.com/shinh/maloader.git";
rev = "5f220393e0b7b9ad0cf1aba0e89df2b42a1f0442";
sha256 = "07j9b7n0grrbxxyn2h8pnk6pa8b370wq5z5zwbds8dlhi7q37rhn";
sha256 = "0dd1pn07x1y8pyn5wz8qcl1c1xwghyya4d060m3y9vx5dhv9xmzw";
};

postPatch = ''
sed -i \
-e '/if.*loadLibMac.*mypath/s|mypath|"'"$out/lib/"'"|' \
-e 's|libCoreFoundation\.so|${opencflite}/lib/&|' \
ld-mac.cc
substituteInPlace Makefile \
--replace "-Werror" "" \
;
'';

NIX_CFLAGS_COMPILE = "-I${libcxx}/include/c++/v1";
buildInputs = [ clang libcxx ];
buildInputs = [ clang libcxx libcxxabi ];
buildFlags = [ "USE_LIBCXX=1" "release" ];

installPhase = ''
Expand Down
4 changes: 2 additions & 2 deletions pkgs/os-specific/darwin/opencflite/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, icu, libuuid, tzdata }:

{ stdenv, fetchurl, icu, libuuid, tzdata, utillinux, clang }:
let libuuid = (utillinux.override { systemd = null; }).dev; in
stdenv.mkDerivation rec {
name = "opencflite-${version}";
version = "476.19.0";
Expand Down
4 changes: 4 additions & 0 deletions pkgs/os-specific/darwin/xcode/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ with stdenv.lib;

let
osxVersion = "10.9";
# this path comes from a manual install of an older version, because the current one segfaults
# nix-env -iA xpwn
# readlink `type -P xpwntool`
xpwn = "/nix/store/xj6bcqgn7wxidnj08yrmdbbhzr57lfc9-xpwn-0.5.8git";
in stdenv.mkDerivation rec {
name = "xcode-${version}";
version = "5.1";
Expand Down

0 comments on commit 700f827

Please sign in to comment.