Commit Graph

50 Commits

Author SHA1 Message Date
Nikolay Amiantov
0c6db0ca48 cc-wrapper: add option to skip flags for native optimizations 2016-03-24 20:16:17 +03:00
Tim Cuthbertson
d05a3cd763 stdenv: don't overwrite $NIX_ENFORCE_PURITY setting
Close #13583.
2016-03-13 21:09:41 +01:00
Danny Wilson
850a1a3323 Fix "nix" stdenv (close #13554)
Broken by changes introduced in d96893647de5c519c458c1254f043f2d67d9b29c
2016-02-28 19:49:35 +01:00
Eric Seidel
395829686d add is{GNU,Clang} attrs to cc-wrapper.
These will be more pleasant to use than the existing

    (cc.cc.isClang or false)

nonsense we currently do.
2015-05-11 14:39:36 -07:00
Eric Seidel
48f63c2f2e rename gcc-wrapper to cc-wrapper.
also makes cc-wrapper compatible with clang in the darwin fork.
2015-01-14 20:26:56 -08:00
Eelco Dolstra
97e9d2b351 Remove dead code 2014-11-04 13:26:51 +01:00
Eelco Dolstra
be3fc3ae2f Prevent an unnecessary evaluation of lib 2014-08-09 12:45:18 +02:00
Eelco Dolstra
3e4a382d67 Doh 2014-07-28 09:37:23 +02:00
Eelco Dolstra
fb4e2e112f Export SDKROOT 2014-07-28 09:14:13 +02:00
Eelco Dolstra
ac8775dd96 $xcodePath -> $SDKROOT
SDKROOT is standard. In particular, this fixes the cmake build on
Mac OS X 10.9.
2014-07-24 21:53:46 +02:00
Eelco Dolstra
bf0d518c67 stdenv-darwin: Shut up some warnings from SDK headers
The Carbon headers spew out zillions of multichar / deprecations warnings,
which isn't very helpful. So turn them off.
2014-07-23 11:47:46 +02:00
Eelco Dolstra
fd1a5d8531 Set MACOSX_DEPLOYMENT_TARGET
This variable sets the minimal Mac OS X version required for
running binaries produced by the Darwin toolchain. Since it
defaults to the version of the user's SDK, setting it explicitly
should make our builds more deterministic. It's now set to 10.6
because that's what hydra.nixos.org runs.
2014-07-02 19:52:25 +02:00
Eelco Dolstra
0d8014f6fc Darwin: Search for libraries in $sdk/usr/lib
This required adding a new environment variable NIX_LDFLAGS_AFTER
that ensures that the -L.../usr/lib flag happens last.
2014-07-01 15:56:09 +02:00
Eelco Dolstra
89f8af55f1 Darwin: Use xcrun to get the path to the SDK
Recent versions of Xcode don't install headers in /usr/include but
in a directory like

  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include

So use that instead, falling back to /usr/include in case of an older
version of Xcode.
2014-07-01 11:01:36 +02:00
John Wiegley
27ecc1c9e9 Change stdenv on darwin to not set NIX_ENFORCE_PURITY 2014-05-29 02:43:10 -05:00
Danny Wilson
15e865ac09 GCC 4.7.2 + updated libraries compiles on Illumos/SmartOS!
- Add solaris native ld support to GCC build wrapper
- Add solaris ld wrapper that fixes -L argument order
2013-02-28 20:04:02 +01:00
Eelco Dolstra
f4ed8a3b91 Remove trailing whitespace 2012-12-28 16:41:56 +01:00
Eelco Dolstra
cf8daf6312 Add an option ‘stdenv.userHook’ to set a global stdenv setup hook
This allows various applications.  It allows users to set global
optimisation flags, e.g.

  stdenv.userHook = ''NIX_CFLAGS_COMPILE+=" -funroll-loops"'';

But the impetus is as an alternative to issue #229, allowing impure
stdenv setup for people who want to use distcc:

  stdenv.userHook = "source /my/impure/setup-script.sh";

This is probably a bad idea, but at least now it's a bad idea in
people's configuration and not in Nixpkgs. :-)
2012-12-28 16:36:09 +01:00
Ludovic Courtès
29bc53265d Darwin: Use GCC 4.6 in `stdenvNix'.
svn path=/nixpkgs/trunk/; revision=33894
2012-04-23 15:47:37 +00:00
Eelco Dolstra
94c7bec49d * Call all the stdenvs "stdenv" (rather than e.g. "stdenv-linux")
so that "nix-env -i stdenv" does the expected.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31742
2012-01-20 16:47:54 +00:00
Eelco Dolstra
3980444b2b * Reuse packages in the Darwin stdenv to prevent unnecessary rebuilds.
svn path=/nixpkgs/branches/stdenv-updates/; revision=31710
2012-01-19 18:25:35 +00:00
Eelco Dolstra
ee45e160b1 * Prepend the "prehook" rather than sourcing it.
* Don't call xargs with the -r flag in the Darwin bootstrap.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31703
2012-01-19 15:56:17 +00:00
Eelco Dolstra
3ea1c30846 * Remove the NIX_STRIP_DEBUG flag. It was undocumented and confusing
in its interaction with the ‘dontStrip’ attribute.

svn path=/nixpkgs/branches/stdenv-updates/; revision=30848
2011-12-12 14:02:12 +00:00
Lluís Batlle i Rossell
89fe676bb3 Updating from trunk.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18878
2009-12-10 14:48:45 +00:00
Rob Vermaas
746c502acc changes for x86_64-darwin support
svn path=/nixpkgs/trunk/; revision=18667
2009-11-27 10:56:07 +00:00
Lluís Batlle i Rossell
e10632e7d5 Trying to fix the stdenv used on i686-darwin, which stopped working after my
statement of the gcc-wrapper coreutils dependency on r17867.
I don't have i686-darwin to try this.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18490
2009-11-20 16:56:11 +00:00
Rob Vermaas
68d5a14183 * xargsFlag empty on darwin
svn path=/nixpkgs/trunk/; revision=15919
2009-06-10 11:08:53 +00:00
Eelco Dolstra
1dee2d3de0 * Fix stdenvNative/stdenvNix.
svn path=/nixpkgs/branches/stdenv-updates/; revision=13957
2009-02-02 15:03:38 +00:00
Eelco Dolstra
7bf0c5ba01 * Folded the Cygwin, powerpc-darwin and FreeBSD stdenv into the "native"
stdenv.

svn path=/nixpkgs/trunk/; revision=12147
2008-06-18 15:09:13 +00:00
Eelco Dolstra
e21b6b6ee5 * curl: build with OpenSSL (https) support by default.
* Some fetchurl-related refactoring.  The `realCurl' attribute is
  gone, `curl' is the real thing.  To prevent an infinite recursion in
  `fetchurl' (because it depends on curl and building curl needs
  fetchurl), curl and its dependencies (openssl, zlib, perl) use
  `fetchurlBoot', which is the fetchurl used by the previous bootstrap
  phase (e.g. the statically linked version of curl for
  stdenv-linux).  So as a result you can use https:// urls almost
  everywhere.

  There's also some hackery to prevent a different curl from being
  built in every stdenv-linux bootstrap phase (namely the
  stdenv.fetchurl attribute which allows fetchurl to be overriden
  everywhere).

svn path=/nixpkgs/trunk/; revision=11905
2008-05-27 07:49:55 +00:00
Eelco Dolstra
3bcc70349b svn path=/nixpkgs/branches/stdenv-updates-merge/; revision=10814 2008-02-21 17:26:46 +00:00
Eelco Dolstra
b342dcb13b * gcc-wrapper: separately store the flags necessary to find GCC and
Glibc.  This is useful when building GCC.
* gcc-wrapper: the dynamic linker has a different name on x86_64 and
  powerpc.
* gcc-wrapper: "glibc" -> "libc", because someday we might support
  different C libraries.
* gcc: don't do a multilib build (e.g., 32-bit support on x86_64),
  don't need it.
* gcc: merge in support for static builds.
* gcc: various simplifications in the compiler/linker flags, hope they
  work.

svn path=/nixpkgs/trunk/; revision=6823
2006-10-24 18:26:23 +00:00
Eelco Dolstra
76405f2b7f * `drv + /path' is deprecated, so don't do that anymore.
svn path=/nixpkgs/trunk/; revision=6754
2006-10-17 14:06:18 +00:00
Eelco Dolstra
bf1e734f85 * Don't use the subpath operator (~) anymore, it's subsumed by normal
concatenation (+).

svn path=/nixpkgs/trunk/; revision=6080
2006-08-09 15:05:30 +00:00
Eelco Dolstra
4c68a103e8 * Pass along realCurl.
svn path=/nixpkgs/trunk/; revision=5830
2006-07-20 15:21:36 +00:00
Eelco Dolstra
3defd9a3d3 * On Darwin, use Apple's gcc fork.
svn path=/nixpkgs/trunk/; revision=5715
2006-07-14 22:34:24 +00:00
Eelco Dolstra
bf7ca59eaa * Doh!
svn path=/nixpkgs/trunk/; revision=5708
2006-07-14 13:34:39 +00:00
Eelco Dolstra
dd325103df * Better stdenv for Darwin: uses gcc, coreutils etc. built in Nix, but
external binutils (i.e., Apple's cctools in /usr/bin).

svn path=/nixpkgs/trunk/; revision=5706
2006-07-14 11:59:38 +00:00
Eelco Dolstra
10d67f5c7a * Reviving stdenvNix.
svn path=/nixpkgs/trunk/; revision=5702
2006-07-14 09:28:09 +00:00
Eelco Dolstra
b2f6e204a2 * Remove redundant files, move path.nix around a bit.
svn path=/nixpkgs/trunk/; revision=5701
2006-07-14 08:35:59 +00:00
Eelco Dolstra
c067e6afa2 * Fix stdenv-nix.
svn path=/nixpkgs/trunk/; revision=5358
2006-05-31 15:08:25 +00:00
Eelco Dolstra
90c8e9fd50 * It's not necessary to add gcc and binutils to the path here.
svn path=/nixpkgs/trunk/; revision=1442
2004-09-18 17:12:30 +00:00
Eelco Dolstra
01a1658c6b * Finally we have a working stdenvLinux again.
On the downside, the build process of stdenvLinux builds gcc 9 times
  (3 x 3 bootstrap stages).  That's a bit excessive.

svn path=/nixpkgs/trunk/; revision=880
2004-03-30 12:46:52 +00:00
Eelco Dolstra
12ae5363ea * Remove trivial builders.
* Make builders unexecutable by removing the hash-bang line and
  execute permission.
* Convert calls to `derivation' to `mkDerivation'.
* Remove `system' and `stdenv' attributes from calls to
  `mkDerivation'.  These transformations were all done automatically,
  so it is quite possible I broke stuff.
* Put the `mkDerivation' function in stdenv/generic.

svn path=/nixpkgs/trunk/; revision=874
2004-03-29 17:23:01 +00:00
Eelco Dolstra
5941f66f0e * The stdenv setup script now defines a generic builder that allows
builders for typical Autoconf-style to be much shorten, e.g.,

    . $stdenv/setup
    genericBuild

  The generic builder does lots of stuff automatically:

  - Unpacks source archives specified by $src or $srcs (it knows about
    gzip, bzip2, tar, zip, and unpacked source trees).
  - Determines the source tree.
  - Applies patches specified by $patches.
  - Fixes libtool not to search for libraries in /lib etc.
  - Runs `configure'.
  - Runs `make'.
  - Runs `make install'.
  - Strips debug information from static libraries.
  - Writes nested log information (in the format accepted by
    `log2xml').

  There are also lots of hooks and variables to customise the generic
  builder.  See `stdenv/generic/docs.txt'.

* Adapted the base packages (i.e., the ones used by stdenv) to use the
  generic builder.

* We now use `curl' instead of `wget' to download files in `fetchurl'.

* Neither `curl' nor `wget' are part of stdenv.  We shouldn't
  encourage people to download stuff in builders (impure!).

* Updated some packages.

* `buildinputs' is now `buildInputs' (but the old name also works).

* `findInputs' in the setup script now prevents inputs from being
  processed multiple times (which could happen, e.g., if an input was
  a propagated input of several other inputs; this caused the size
  variables like $PATH to blow up exponentially in the worst case).

* Patched GNU Make to write nested log information in the format
  accepted by `log2xml'.  Also, prior to writing the build command,
  Make now writes a line `building X' to indicate what is being
  built.  This is unfortunately often obscured by the gigantic tool
  invocations in many Makefiles.  The actual build commands are marked
  `unimportant' so that they don't clutter pages generated by
  `log2html'.


svn path=/nixpkgs/trunk/; revision=845
2004-03-19 16:53:04 +00:00
Eelco Dolstra
de13527000 * Finally got stdenv-nix-linux working again. Still not perfect,
though.
* libxml2: upgrade to latest.
* octavefront/rna: keep debug info.

svn path=/nixpkgs/trunk/; revision=830
2004-03-11 17:26:14 +00:00
Eelco Dolstra
a1b3ae0c81 * stdenv-nix-linux should more-or-less work again now.
svn path=/nixpkgs/trunk/; revision=826
2004-03-09 17:16:02 +00:00
Eelco Dolstra
744c434349 * Missing semicolon.
svn path=/nixpkgs/trunk/; revision=729
2004-01-30 15:44:56 +00:00
Eelco Dolstra
026ff9466a * Rename .fix -> .nix.
svn path=/nixpkgs/trunk/; revision=511
2003-11-18 12:12:56 +00:00
Eelco Dolstra
48c3faca51 * Renamed pkgs-ng to pkgs.
svn path=/nixpkgs/trunk/; revision=502
2003-11-14 09:59:13 +00:00