Commit graph

19 commits

Author SHA1 Message Date
aszlig a6621202af
xcode: Drop use of weak_import on enumerators.
GCC doesn't support attributes on enumerators, which could pose a
problem but fortunately not in this case. Here a
__attribute__((weak_import)) is used, which doesn't make much sense for
enumerators anyway (noone will die because the corresponding enumerator
won't be referenced either in older OS X versions).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-03-12 10:00:49 +01:00
aszlig 3940b21988
cctools-port: Pass through wrapped XCToolchain.
At the moment, this includes only dyldinfo, dwarfdump and dsymutil, but
we'll see whether we need more of these utilities later.

Tho reason those are wrapped in cctools-port is because it is the
binutils used to cross-compile for Mac OS X.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-03-12 10:00:46 +01:00
aszlig 45cd9994bc
darwin: Add new package maloader.
This is the mentioned Mach-O loader that we're yoing to use to execute
Apple's proprietary binaries.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-03-12 10:00:45 +01:00
aszlig 53a267e535
darwin: Add new package opencflite.
This provides a port of Mac OS X's CoreFoundation and is needed if we
want to be able to run dsymutil using maloader.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-03-12 10:00:45 +01:00
aszlig c0d55fcc6a
xcode: Provide the commandline toolchain as well.
This toolchain contains Mach-O binaries and might not be useful in the
first place, but there are programs like dsymutil, where Apple didn't
release the source code, so we need a Mach-O loader...

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-03-12 10:00:45 +01:00
aszlig dd10bb3181
Add a cross-platform port of cctools.
This basically is binutils for Mac OS X, but ported to work on
(GNU/)Linux and FreeBSD.

And it's up-to-date as well! I'm mentioning this, because it was quite
hard to find a recent port of it and I just accidentally stumbled on it
while trying to do the port by myself.

So thanks to @tpoechtrager for doing this.

Also, I've added two more patches, which essentially are:

 * ld-rpath-nonfinal:
     This allows -rpath to be used for linking non-final builds, which
     was allowed for earlier versions of cctools and got a check for
     that in more recent versions.

 * ld-ignore-rpath-link:
     Ignores the -rpath-link option, because the cross-wrapper uses it
     in different places. Unfortunately, the cctools linker doesn't
     support it, so we might need to implement this later if it's
     possible (I'm not a Mach-O man^H^H^Hexpert).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-03-12 10:00:44 +01:00
aszlig 83dd414ca2
Add new package for Apple's XCode.
This package provides the SDK and standard library needed for
cross-compiling to Mac US X. We're using xpwn here to extract the DMG.

Also, this version (XCode 5.0.2) only contains the SDKs for version 10.9
and 10.8, so we might need to add requireFile directives for older
versions as well.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-03-12 10:00:43 +01:00
Eric Kow 1be6aae4b4 darwin x11/opengl: only copy subset of files (close #1165)
Copy only the pc files related to X11 and OpenGL.

This should allow us to build our own version of libraries like
cairo without having the native ones be accidentally dynamically
linked in to things that depend on them.

Before this patch if we `dyldinfo -dylibs libpangocairo` we can
see that it was dynamically linked against the OS X (but seemingly
built against include files from the nix one, as we would get a
runtime complaint about missing symbols)
2013-11-07 10:39:28 +01:00
Peter Simons e761405c50 os-specific/darwin/setfile: drop the "unfree" license
Setfile is included by other derivation, which in turns makes them unfree, too.
This causes plenty of evaluation errors on Hydra, i.e.:

  at `haskellPackages_ghc763_profiling.wx.x86_64-darwin' [nixpkgs = ..., officialRelease = false]:
  user-thrown exception: package ‘setfile’ has an unfree license, refusing to evaluate

Now, it's true that "setfile" is unfree, but this doesn't affect us: our
derivation doesn't include the actual binary -- it just contains a symlink to
"/usr/bin/SetFile". Arguably, our setfile derivation is free and we can
re-distribute it.
2013-09-11 13:08:46 +02:00
Vladimír Čunát 11c8ca0a1a otool: fix licenses, adding the new APSL 2.0 as well
Now Hydra can build glib introspection and all that depends on it
(just darwin).
2013-08-13 07:34:37 +02:00
Rok Garbas 5d3a07f57e Merge pull request #723 from lovek323/darwin-tools
otool and setfile: cleanup
2013-07-07 04:49:04 -07:00
Jason "Don" O'Conal 525a6856f2 otool and setfile: cleanup 2013-07-07 18:58:29 +10:00
Jason "Don" O'Conal 2da7f32b25 install_name_tool: add expression 2013-07-06 19:14:45 +10:00
Peter Simons e5b51648b1 Move "darwin-native-x11-and-opengl" package into the "os-specific" hierarchy. 2013-01-30 14:53:04 +01:00
Ludovic Courtès 04600bbec1 Darwin: Add mig', lipo', etc. to `stdenvNative'.
Consequently, remove `darwinLipoUtility', `darwinArchUtility', etc.

svn path=/nixpkgs/trunk/; revision=33893
2012-04-23 15:47:31 +00:00
Peter Simons dd123060c0 Add an expression for Darwin's install_name_tool utility, which is required by several other builds.
svn path=/nixpkgs/trunk/; revision=26509
2011-03-25 12:55:15 +00:00
Peter Simons 85b7c134cb pkgs/os-specific/darwin/lipo: add support for running the native Darwin lipo utility
svn path=/nixpkgs/trunk/; revision=21426
2010-04-29 14:56:44 +00:00
Peter Simons 4d675a283e pkgs/development/interpreters/python/2.6/default.nix: fixed build on Darwin
svn path=/nixpkgs/trunk/; revision=18136
2009-11-05 13:44:30 +00:00
Peter Simons 90dd9d14bf python-2.6: fixed build on Darwin
* Dropped "nolongdouble.patch". The patch no longer applies to Python 2.6, and
   apparently isn't required anymore either.

 * Added access to native Darwin arch utility. Python tries to run 'arch' in
   the configure stage, but that binary reside in /usr/bin. To make it
   available to the expression, the small wrapper darwinArchUtility is added as
   a buildInput if appropriate.

 * Don't pass --enable-shared. The build fails if we try to enable building of
   shared libraries, apparently because some required libraries aren't linked,
   i.e. the linker call isn't right.

TODO:

 * Figure out how to enable shared linking.

 * The resulting binary on Darwin seem to lack the binascii module.

svn path=/nixpkgs/trunk/; revision=17894
2009-10-20 12:13:49 +00:00