Commit Graph

155 Commits

Author SHA1 Message Date
Tobias Mayer
bb71bb15ce pkgsStatic: propagate all buildInputs 2019-07-24 16:04:51 +02:00
Tobias Mayer
3c12ae1d35 Signal static build option in makeStaticLibraries
This flag can replace the extra static parameter to packages that
don't work automatically with this adapter.
2019-07-21 06:44:50 +02:00
Vladimír Čunát
b4ae841b23
Merge branch 'staging-next' into staging 2019-05-26 09:48:55 +02:00
Matthew Bauer
fea2422398 static: set default_library flag for meson in makeStaticLibrary
Adds support for building static libraries with meson.
2019-05-08 21:52:59 -04:00
Daniel Schaefer
786f02f7a4 treewide: Remove usage of isNull
isNull "is deprecated; just write e == null instead" says the Nix manual
2019-04-29 14:05:50 +02:00
James Kay
eb76dd37a7
makeStaticBinaries: add a static glibc when performing a mkDerivation 2018-12-14 11:02:18 +00:00
Matthew Bauer
8726f6a558 stdenv/adapters.nix: fixup makeStaticBinaries
- makeStaticBinaries don’t work on Darwin (no stable ABI!)
- Need to make sure NIX_CFLAGS_LINK appends
- isStatic is not used anymore
2018-12-04 21:12:17 -06:00
Yegor Timoshenko
cd0c8739d7
Merge pull request #37600 from abbradar/impureusenative
impureUseNativeOptimizations: add stdenv adapter
2018-10-13 14:09:55 +00:00
John Ericson
3e034bac1a stdenv adapter: Keep configureFlags a list 2018-08-03 17:06:03 -04:00
John Ericson
b81ee9df9f makeStdenvCross: Remove
It is inlined into the cross stdenv, which is its last use-case after
the previous commit.
2018-07-24 20:01:43 -04:00
John Ericson
c12b50b267 stdenv cross adapter: Use extraNativeBuildInputs
This means we don't need to hackily avoid overwriting `mkDerivation`.
2018-07-24 20:01:43 -04:00
John Ericson
87b4a5d6a7 stdenv: Remove crossAttrs, now that it is no longer used
Fix #33302
2018-07-24 20:01:43 -04:00
John Ericson
5a860c20f3 stdenv cross adapter: Don't define crossConfig
All its uses have been removed.
2018-05-14 23:33:12 -04:00
Nikolay Amiantov
15bfee85f3 impureUseNativeOptimizations: add stdenv adapter
This allows one to force a compiler to use native machine optimizations. This
goes contrary to all the usual guarantees of Nix and so should be used only by
end-user and only in specific cases when they know what are they doing.

In my case this is needed to get a noticeable FPS boost in RPCS3 which is very
CPU-hungry PlayStation 3 emulator.
2018-04-17 13:12:07 +03:00
John Ericson
8f54d931cd
Merge pull request #36401 from obsidiansystems/no-stdenv-cross-adapter
stdenv cross adapter: Get rid if `selfNativeBuildInput`
2018-03-06 20:17:13 -05:00
John Ericson
8d58008039 stdenv cross adapter: Get rid if selfNativeBuildInput
It is finally no longer used anywhere

Fixes #30587
2018-03-06 20:05:13 -05:00
Daniel Barlow
9c50ae6898 lib, treewide: Add missing MIPS arches, and fix existing usage
Existing "mips64el" should be "mipsel".

This is just the barest minimum so that nixpkgs can recognize them as
systems - although required for building individual derivations onto
MIPS boards, it is not sufficient if you want to actually build nixos on
those targets
2018-02-23 20:43:42 -05:00
Will Dietz
5dcf3cdf37 stdenv: automatically update config.sub for musl 2018-02-13 09:44:36 -06:00
John Ericson
1cde06acf6 stdenv cross adapter: Get rid of extra propagatation of buildInputs
Binutils is patched so we don't rely on `--rpath-link`.
2017-12-29 17:32:28 -05:00
John Ericson
7a733ceda4 cross stdenv: No more native-fishing hack.
The comment says it was put there for pkgconfig, but now pkgconfig has
been dealt with.
2017-09-21 15:49:54 -04:00
John Ericson
3af3d6efc2 stdenv cross adapater: Remove old extraBuildInputs
They, unlike their native counterparts, run on the wrong platform and
are therefore invalid.
2017-09-21 14:52:42 -04:00
John Ericson
05ef1034c7 stdenv cross adaptor: Add optional overrides parameter
By default, all previous overrides are discarded as before, as they
would only apply to the old host platform. But sometimes it is useful to
add some new ones, and this optional parameter allows that.
2017-09-21 14:52:07 -04:00
John Ericson
738bb4777c stdenv: Update autotools scripts on all Aarch64, not just Linux
This is needed when cross-compiling for iOS (Aarch64 + Darwin). I also
changed the syntax of the Linux stdenv for visual consistency, though
that has no effect on semantics as the os is already guaranteed to be
Linux.
2017-09-21 14:40:40 -04:00
John Ericson
e826a6a247 stdenv: Move some logic from cross adapter to stdenv proper
Eventually the adapter will be removed.  Moved is

 - Name suffix from hostPlatform

 - configurePlatforms

   To not cause more breakage, the default is currently [], but
   eventually it will be [ "build" "host" ], as the cross adapter makes
   it today.
2017-07-13 19:05:36 -04:00
John Ericson
a302d7360f top-level: {build,host,target}Platform are defined in the stdenv instead
See #27069 for a discussion of this
2017-07-07 12:55:02 -04:00
John Ericson
e0492d58a6 cross stdenv adaptor: Disable checkPhase by default
Before gcc-cross-wrapper did this unconditionally
2017-06-22 17:52:28 -04:00
John Ericson
594d264205 cross stdenv adaptor: Support --host --build --target across the board
Packages get --host and --target by default, but can explicitly request
any subset to be passed as needed. See docs for more info.

rustc: Avoid hash breakage by using the old (ignored)
dontSetConfigureCross when not cross building
2017-06-22 17:52:28 -04:00
John Ericson
9bfd03eff7 cross stdenv adaptor: Remove ccCross binutils attrs and binutils extra buildDepends
It now has the correct wrapped tools and nothing else is needed.
2017-06-22 17:52:28 -04:00
John Ericson
295315cc87 binutilsCross: Remove and use binutils instead always
See previous commit for what was done to `binutils` to make this
possible.

There were some uses of `forcedNativePackages` added. The
combination of overrides with that attribute is highly spooky: it's
often important that if an overridden package comes from it, the
replaced arguments for that package come from it. Long term this
package set and all the spookiness should be gone and irrelevant:

  "Move along, nothing to see here!"

No hashes should be changed with this commit
2017-04-25 21:36:19 -04:00
John Ericson
49c99b70cf cross-stdenv: Only prune most overrides in the final stage
Before all overrides were also pruned in the previous stage, now
only gcc and binutils are, because they alone care about about the
target platform. The rest of the overrides don't, so it's better to
preserve them in order to avoid spurious rebuilds.
2017-04-24 16:31:53 -04:00
Eelco Dolstra
9d6a55aefd
~/.nixpkgs -> ~/.config/nixpkgs
The former is still respected as a fallback for config.nix for
backwards compatibility (but not for overlays because they're a new
feature).
2017-02-01 16:07:55 +01:00
Tuomas Tynkkynen
c909f1b18e stdenv: Add updateAutoconfGnuConfigScriptsHook for aarch64
This is required for Aarch64 since a lot of source tarballs ship with
outdated configure scripts that don't recognize aarch64. Simply
replacing the config.guess and config.sub with new versions from
upstream makes them build again.

This same approach is used by at least Buildroot and Fedora. In
principle this could be enabled for all architectures but
conditionalizing this on aarch64 avoids a mass rebuild on x86.
2017-01-25 00:01:52 +02:00
John Ericson
1c0365bd88 cross-stdenv: Inline useless bindings and reindent
Semantics should be unchanged
2017-01-24 11:37:56 -05:00
John Ericson
92edcb7ebb top-level: Lay the groundwork for {build,host,target}Platform
The long term goal is a big replace:
  { inherit system platform; } => buildPlatform
  crossSystem => hostPlatform
  stdenv.cross => targetPlatform
And additionally making sure each is defined even when not cross compiling.

This commit refactors the bootstrapping code along that vision, but leaves
the old identifiers with their null semantics in place so packages can be
modernized incrementally.
2017-01-24 11:37:56 -05:00
John Ericson
bf17d6dacf top-level: Introduce buildPackages for resolving build-time deps
[N.B., this package also applies to the commits that follow it in the same
PR.]

In most cases, buildPackages = pkgs so things work just as before. For
cross compiling, however, buildPackages is resolved as the previous
bootstrapping stage. This allows us to avoid the mkDerivation hacks cross
compiling currently uses today.

To avoid a massive refactor, callPackage will splice together both package
sets. Again to avoid churn, it uses the old `nativeDrv` vs `crossDrv` to do
so. So now, whether cross compiling or not, packages with get a `nativeDrv`
and `crossDrv`---in the non-cross-compiling case they are simply the same
derivation. This is good because it reduces the divergence between the
cross and non-cross dataflow. See `pkgs/top-level/splice.nix` for a comment
along the lines of the preceding paragraph, and the code that does this
splicing.

Also, `forceNativeDrv` is replaced with `forceNativePackages`. The latter
resolves `pkgs` unless the host platform is different from the build
platform, in which case it resolves to `buildPackages`. Note that the
target platform is not important here---it will not prevent
`forcedNativePackages` from resolving to `pkgs`.

--------

Temporarily, we make preserve some dubious decisions in the name of preserving
hashes:

Most importantly, we don't distinguish between "host" and "target" in the
autoconf sense. This leads to the proliferation of *Cross derivations
currently used. What we ought to is resolve native deps of the cross "build
packages" (build = host != target) package set against the "vanilla
packages" (build = host = target) package set. Instead, "build packages"
uses itself, with (informally) target != build in all cases.

This is wrong because it violates the "sliding window" principle of
bootstrapping stages that shifting the platform triple of one stage to the
left coincides with the next stage's platform triple. Only because we don't
explicitly distinguish between "host" and "target" does it appear that the
"sliding window" principle is preserved--indeed it is over the reductionary
"platform double" of just "build" and "host/target".

Additionally, we build libc, libgcc, etc in the same stage as the compilers
themselves, which is wrong because they are used at runtime, not build
time. Fixing this is somewhat subtle, and the solution and problem will be
better explained in the commit that does fix it.

Commits after this will solve both these issues, at the expense of breaking
cross hashes. Native hashes won't be broken, thankfully.

--------

Did the temporary ugliness pan out? Of the packages that currently build in
`release-cross.nix`, the only ones that have their hash changed are
`*.gcc.crossDrv` and `bootstrapTools.*.coreutilsMinimal`. In both cases I
think it doesn't matter.

 1. GCC when doing a `build = host = target = foreign` build (maximally
    cross), still defines environment variables like `CPATH`[1] with
    packages.  This seems assuredly wrong because whether gcc dynamically
    links those, or the programs built by gcc dynamically link those---I
    have no idea which case is reality---they should be foreign. Therefore,
    in all likelihood, I just made the gcc less broken.

 2. Coreutils (ab)used the old cross-compiling infrastructure to depend on
    a native version of itself. When coreutils was overwritten to be built
    with fewer features, the native version it used would also be
    overwritten because the binding was tight. Now it uses the much looser
    `BuildPackages.coreutils` which is just fine as a richer build dep
    doesn't cause any problems and avoids a rebuild.

So, in conclusion I'd say the conservatism payed off. Onward to actually
raking the muck in the next PR!

[1]: https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
2017-01-24 11:37:56 -05:00
John Ericson
5b7bdb2861 Remove more dead code: stdenvDarwinNaked no longer exists 2016-06-20 23:53:09 -07:00
John Ericson
47d95a7571 Remove dead code in stdenvCross adaptor 2016-06-20 23:53:09 -07:00
Vladimír Čunát
8b292a1b35 stdenv on mingw: fix 64-bin DLL detection in some cases
In particular, this makes 64-bit libpng create DLL now,
and thus depending packages won't fail anymore (e.g. freetype).
2016-04-23 10:52:01 +02:00
Eelco Dolstra
13a1c7b8c1 useOldCXXAbi: Change into a setup hook
Stdenv adapters considered weird.
2016-04-01 13:36:59 +02:00
Nikolay Amiantov
9134f9358a stdenvAdapters.useOldCXXAbi: add new adapter 2016-03-31 19:52:33 +03:00
Vladimír Čunát
5ad448df3a enableDebugging: use more suitable gcc flags
-ggdb is supposed to provide better symbol information when used with gdb
-Og is the recommended optimization level for debugging purposes
2015-08-10 09:11:30 +02:00
Eelco Dolstra
a58356c953 useGoldLinker: Fix appending to $NIX_CFLAGS_LINK 2015-05-04 14:00:45 +02:00
Ambroz Bizjak
0a8ca604b4 Fix cross compiling regression due to gcc->cc renaming. 2015-02-05 21:25:25 +01: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
Shea Levy
bbd2be6075 Restore accidentally-dropped stdenv adapter 2014-12-26 12:38:18 -05:00
John Wiegley
28b6fb61e6 Change occurrences of gcc to the more general cc
This is done for the sake of Yosemite, which does not have gcc, and yet
this change is also compatible with Linux.
2014-12-26 11:06:21 -06:00
Eelco Dolstra
a0f3faf34e Merge remote-tracking branch 'origin/glibc-2.20' into staging 2014-11-16 22:17:36 +01:00
Eelco Dolstra
7a05d33386 useGoldLinker: Don't set dontStrip
Probably caused by a bad cut&paste...
2014-11-12 15:10:54 +01:00
Eelco Dolstra
d135422009 Remove obsolete useKlibc stdenv adapter 2014-10-29 13:43:00 +01:00
Eelco Dolstra
5cc92eb0d8 Remove obsolete useDietLibC stdenv adapter 2014-10-29 13:43:00 +01:00
Eelco Dolstra
ffbdcbfe29 gcc-wrapper: Wrap ld.gold
This ensures that gcc's ‘-fuse-ld=gold’ flag works.
2014-10-10 14:55:17 +02:00
Eelco Dolstra
811de3bfaa Merge remote-tracking branch 'origin/staging' into darwin-clang-stdenv
Conflicts:
	pkgs/tools/security/gnupg/default.nix
2014-10-09 10:57:57 +02:00
Eelco Dolstra
14d6454b9a stdenv-linux: Turn allowedRequisites back on 2014-10-06 22:11:05 +02:00
Joel Taylor
afa1db198b fix even more clang builds 2014-09-09 13:54:57 -07:00
Eelco Dolstra
5ba24cc8ea Typo/comment 2014-04-22 18:42:44 +02:00
Eelco Dolstra
497997cc38 Move generation of coverage reports from nixos/lib/testing to releaseTools
Also, turn some stdenv adapters into setup hooks.
2014-03-03 13:57:08 +01:00
Eelco Dolstra
80647127a3 Turn the coverage analysis stdenv adapters into setup hooks
Stdenv adapters are kinda weird and un-idiomatic (especially when they
don't actually change stdenv).  It's more idiomatic to say

  buildInputs = [ makeCoverageAnalysisReport ];
2014-02-05 19:18:33 +01:00
Eelco Dolstra
bea2b3c517 addCoverageInstrumentation: Set NIX_CFLAGS_COMPILE as an attribute
This allows it to show up in nix-shell.
2014-02-05 19:18:33 +01:00
Eelco Dolstra
c3d84d15ce Apply makeOverridable to stdenv
This removes the need for hacks like stdenv.regenerate.  It also
ensures that overrideGCC is now stackable (so ‘stdenv = useGoldLinker
clangStdenv’ works).
2014-02-05 19:18:33 +01:00
Eelco Dolstra
7703f04b75 Add a stdenv adapter ‘useGoldLinker’ to force use of Gold 2014-02-05 19:18:33 +01:00
Eelco Dolstra
e2d505b24e More renames 2012-12-28 19:42:10 +01:00
Eelco Dolstra
dcdef5a0fe More random cleanup 2012-12-28 19:37:42 +01:00
Eelco Dolstra
22ba03c123 Random cleanup: use "or" in adapters.nix 2012-12-28 19:35:35 +01:00
Eelco Dolstra
ab3eeabfed Rename buildNativeInputs -> nativeBuildInputs
Likewise for propagatedBuildNativeInputs, etc.  "buildNativeInputs"
sounds like an imperative rather than a noun phrase.
2012-12-28 19:20:09 +01:00
Eelco Dolstra
5be0a9acd7 Rename hostDrv -> crossDrv, buildDrv -> nativeDrv
This is for consistency with terminology in stdenv (and the terms
"hostDrv" and "buildDrv" are not very intuitive, even if they're
consistent with GNU terminology).
2012-12-28 19:08:19 +01:00
Eelco Dolstra
ccd44e84c8 Add a stdenv adapter ‘keepDebugInfo’ to make a debug build
This adapter causes the resulting binaries to have debug info and no
optimisations.  Example use (in all-packages.nix):

  foo = callPackage ./foo.nix {
    stdenv = keepDebugInfo stdenv;
  };
2012-10-31 13:46:51 +01:00
Eelco Dolstra
c556a6ea46 * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless
function, so obsolete it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2012-01-18 20:16:00 +00:00
Eelco Dolstra
cfde88976b * Streamline the stdenv bootstrap and resulting closure by removing
some redundant builds (e.g., GMP was built three times).
* Updated GMP to 5.0.2.
* Updated PPL to 0.11.2.
* Remove ad hoc flags to build GCC's dependencies statically.
  Instead, use the ‘makeStaticLibraries’ stdenv adapter.
* Build GMP with C++ support by default.

svn path=/nixpkgs/branches/stdenv-updates/; revision=30891
2011-12-14 14:31:56 +00:00
Ludovic Courtès
4122bd643e validateLicenses: Warn about derivations lacking licensing information.
svn path=/nixpkgs/trunk/; revision=30496
2011-11-20 20:53:15 +00:00
Ludovic Courtès
2448161213 stdenv adapters: Use toString' instead of exprToString'.
svn path=/nixpkgs/trunk/; revision=30494
2011-11-20 20:42:05 +00:00
Shea Levy
94dbab27a3 Bootstrap clang with itself
svn path=/nixpkgs/trunk/; revision=29901
2011-10-19 17:11:26 +00:00
Eelco Dolstra
58a0e8fcdc * Typo.
svn path=/nixpkgs/trunk/; revision=27569
2011-07-01 09:50:34 +00:00
Eelco Dolstra
569d38ad69 * makeStaticBinaries: handle the case where configureFlags is
an array.

svn path=/nixpkgs/trunk/; revision=25641
2011-01-20 09:40:17 +00:00
Lluís Batlle i Rossell
0196bb720e Making the addCoverageInformation stdenv adapter better in the sense that it
does not override NIX_CFLAGS_COMPILE anymore in the mkDerivation parameter
attributes. This way, apacheHttpd can be built properly with coverage
information.
An indication of this problem came from the nixos tests.subversion failure.


svn path=/nixpkgs/branches/stdenv-updates/; revision=24938
2010-11-30 14:10:52 +00:00
Lluís Batlle i Rossell
46082f25f9 Updating from trunk
svn path=/nixpkgs/branches/stdenv-updates/; revision=23027
2010-08-07 20:14:04 +00:00
Yury G. Kudryashov
1aa8b54c41 Typos
svn path=/nixpkgs/trunk/; revision=23011
2010-08-06 20:23:35 +00:00
Lluís Batlle i Rossell
f36f99e368 Making gcc cross-buildable, at least for glibc.
svn path=/nixpkgs/branches/stdenv-updates/; revision=20454
2010-03-06 21:41:01 +00:00
Lluís Batlle i Rossell
8a080a699e Fixing the cross build stdenv adapter so it tolerates buildInputs with 'null' elements.
svn path=/nixpkgs/trunk/; revision=20381
2010-03-04 14:44:38 +00:00
Lluís Batlle i Rossell
fca769846a Adding a new special attribute for mkDerivation: crossAttrs. It sits next to
"meta" and "passthru", and these attributes will be appended to the usual
mkDerivation attributes only if the package is cross built.
This allows putting some of the cross-building logic in the mkDerivation
nix parameters, and not only in the final builder script, as it was until now.

svn path=/nixpkgs/trunk/; revision=20272
2010-02-27 17:35:42 +00:00
Eelco Dolstra
4430ce1952 * Fix splashutils.
svn path=/nixpkgs/branches/stdenv-updates/; revision=19662
2010-01-26 10:56:21 +00:00
Eelco Dolstra
ed3ebb7c2c * libjpeg updated to version 8.
* libpng updated to 1.4.0.
* For libjpegStatic, use a stdenv adapter to build a static library.

svn path=/nixpkgs/branches/stdenv-updates/; revision=19605
2010-01-21 21:42:17 +00:00
Lluís Batlle i Rossell
9183f21f7e Merging from trunk.
I fixed conflicts regarding the renaming 'kernel' -> 'linux' in all-packages.
Also a small conflict in all-packages about making openssl overridable.
And I some linux 2.6.31-zen kernel files also marked in conflict.


svn path=/nixpkgs/branches/stdenv-updates/; revision=19438
2010-01-14 14:49:31 +00:00
Eelco Dolstra
6259721697 * Linux 2.6.32 generates weirdly named gcno files.
svn path=/nixpkgs/trunk/; revision=19206
2010-01-04 13:15:04 +00:00
Lluís Batlle i Rossell
a3403e6828 Finishing the update from trunk, having resolved the eclipse related directory
renaming.
I think directory renaming breaks the usual merges... because it leaves the
'to be removed' directory in the working directory still. A manual 'rm' of the
'to be removed' directory fixed the commit.

svn merge  ^/nixpkgs/trunk


svn path=/nixpkgs/branches/stdenv-updates/; revision=18661
2009-11-26 21:46:08 +00:00
Lluís Batlle i Rossell
1ec11edce5 I should learn to concatenate lists.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18579
2009-11-23 23:40:24 +00:00
Lluís Batlle i Rossell
eadcd4462d Making, in cross-builds, every buildInput a propagatedBuildInput. We need
this because 'ld' wants to know the path of every library involved in a dynamic
linking. I imagine that ld does not need that in native builds because it can
call the loader for it to resolve the library rpaths, but this is not the case
for cross-building.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18577
2009-11-23 23:16:40 +00:00
Lluís Batlle i Rossell
45886e474d On native builds:
- Disabling guile test, because one fails. I commented on that in the source.
On cross builds:
- Adding stripping
- Updating the glibc-2.11 expression to match the parameters of glibc-2.9,
  which I was updating more.
- Renaming from selfNativeBuildInput to selfBuildNativeInput, so this matches
  better the pattern buildNativeInputs.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18550
2009-11-22 22:48:43 +00:00
Lluís Batlle i Rossell
585ba8c27f Big fixes in the cross build:
- Before this changes, cflags and ldflags for the native and the cross compiler
  got mixed. Not all the gcc-wrapper/gcc-cross-wrapper variables are
  independant now, but enough, I think.
- Fixed the generic stdenv expression, which did a big mess on buildInputs and
  buildNativeInputs. Now it distinguishes when there is a stdenvCross or not.
  Maybe we should have a single stdenv and forget about the stdenvCross
  adapter - this could end in a stdenv a bit complex, but simpler than the
  generic stdenv + adapter.
- Added basic support in pkgconfig for cross-builds: a single PKG_CONFIG_PATH
  now works for both the cross and the native compilers, but I think this
  should work well for most cases I can think of.
- I tried to fix the guile expression to cross-biuld; guile is built, but not
  its manual, so the derivation still fails. Guile requires patching to
  cross-build, as far as I understnad.
- Made the glibcCross build to be done through the usage of a
  gcc-cross-wrapper over the gcc-cross-stage-static, instead of using it
  directly.
- Trying to make physfs (a neverball dependency) cross build.
- Updated the gcc expression to support building a cross compiler without getting
  derivation variables mixed with those of the stdenvCross.

svn path=/nixpkgs/branches/stdenv-updates/; revision=18534
2009-11-22 19:51:45 +00:00
Nicolas Pierron
b29073af25 * Add an adapter which abort an install if the installed package depends
on a derivation with a meta.license attribute which does not satisfy the
  license predicate.

With this adapter you can abort any install which depends on software
which are not free by default.  You can try it with MPlayer, because
MPlayer depends of win32codecs flagged as "unfree".

svn path=/nixpkgs/trunk/; revision=18530
2009-11-22 17:04:33 +00:00
Nicolas Pierron
00efa9c2dd * Add a script to retrieve licenses of the current derivation and of all
its dependencies.  To make it works, you need to change the default
  stdenv as documented in the error message.

	./maintainers/scripts/dep-licenses.sh <attribute name>

svn path=/nixpkgs/trunk/; revision=18508
2009-11-21 17:50:00 +00:00
Lluís Batlle i Rossell
28d9e73d34 Adding a new mkDerivation flag for the cross stdenv, selfNativeBuildInput =
true/false, which tells whether the derivation needs itself as
buildNativeInput.
For example, in order to build cross ncurses, we need the a native build
ncurses.
(As libtool does not work in stdenv, I have not tested this change, to check
whether finally ncurses cross-build)


svn path=/nixpkgs/branches/stdenv-updates/; revision=18489
2009-11-20 16:38:01 +00:00
Lluís Batlle i Rossell
4497215410 Allowing in the cross stdenv adapter the calls to mkDerivation without name.
I don't know why there are such calls, but there are.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18482
2009-11-20 12:33:43 +00:00
Lluís Batlle i Rossell
6f3630e128 Attention, people who care on the builders for native builds. In the stdenv
derivation, the "buildInputs" in every stdenv mkDerivation don't map now
directly to the environment
variable "buildInputs" in the builder, but "buildNativeInputs". So, the inputs
build by the native compiler.
When cross compiling, they will map to the environment variable "buildInputs"
(yes, now the same name), which means does to be built with the cross compiler.

I think I improved the naming of variables a bit. There was a big mess,
specially in the stdenv adapter for cross building, and also in the default
builder script.

I also tried to add proper manager of propagatedInputBuilds, these being
propagated considering the host or build origin of that input build (so, at the
end, being those propagatedInputBuilds being propagated properly to the native
or the cross compiler.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18477
2009-11-19 23:05:11 +00:00
Lluís Batlle i Rossell
e85500987b Merging from trunk. I had to do two manual merges, quite trivial I think.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18472
2009-11-19 19:09:10 +00:00
Lluís Batlle i Rossell
7ade207f6b - Removed all *NoCross expressions I dupilcated in nixpkgs, while maintaining
the cross compilation functionality.
- I renamed some expected stdenv.mkDerivation parameter attributes so we can
  keep this branch properly updated from trunk. We agreed with Nicolas Pierron
  doing a massive renaming, so all current buildInputs become hostInputs (input
  as build for the host machine, in autotools terminology) , and
  then buildInputs would mean "input as for the build machine".
  By now, the specific "input as for the build machine" is specified through
  buildNativeInputs. We should fix this in the merge to trunk.
- I made the generic stdenv understand the buildNativeInputs, otherwise if
  we start changing nixpkgs expressions so they distinguish the current
  buildInputs into buildInputs and buildNativeInputs, we could break even more
  nixpkgs for other platforms.
- I changed the default result of mkDerivation so it becomes the derivation for
  to be run in the build machine. This allows, without any special rewriting,
  "fetchurl" derivations to be always results for the build machine to use
  them.
- The change above implies that, for anyone wanting to cross-compile, has to
  build the hostDrv of the wanted derivation. For example, after this commit,
  the usual test of "nix-build -A bison.hostDrv arm.nix" works. I described
  the contents of this arm.nix in r18398.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18471
2009-11-19 19:03:34 +00:00
Lluís Batlle i Rossell
8c638e5e68 Fixing what I broke in the last commit in setup.sh.
I made the stdenvCross adapter simpler, according to Nicolas Pierron comments,
and I commented it a bit.

There are still jobs to do. At least:
- Plan for the general renaming from buildInputs to hostInputs
  - We should not break merges from trunk.
- Make the generic stdenv understand about host/buildInputs, at least for
  native builds, because it is used in the always-native building of
  stdenvLinux. This should allow us to remove all duplications of "*NoCross" in
  nixpkgs.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18449
2009-11-18 19:25:57 +00:00
Lluís Batlle i Rossell
e7c8e8da4f I made the whole nixpkgs dependencies available to the cross compiler, no
needing to keep a new tree of expressions apart for the expressions to get
cross-compiled.

I changed the whole way of using cross compilation with nixpkgs, which before
was done through a simple adapter.

Now the adapter became complex, and I've tried to avoid the most obvious
recursivities. For example, the fetchurl expression should
never be cross-compiled, as the gmp, mpfr, and some others, like
some ncurses, perl, ... I made overrided copies of those necessary as
perlNoCross, ncursesNoCross, as stdenvNoCross, keeping in mind that
the stdenv (capable of cross compilation) is built upon stdenvNoCross using
an adapter.

So, to cross compile, instead of building using "nixpkgs/default.nix",
you should build with your
own "myarchiteture.nix", which should have contents like these, for example:

import /etc/nixos/nixpkgs/default.nix
{
    crossSystem = {
        config = "armv5tel-unknown-linux-gnueabi";
        bigEndian = false;
        arch = "arm";
        float = "soft";
    };
}


svn path=/nixpkgs/branches/stdenv-updates/; revision=18398
2009-11-17 22:58:48 +00:00
Lluís Batlle i Rossell
0c631f6181 Trying to move all stdenv cross-compiling details out of the stdenv expression,
into a stdenv adapater.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18397
2009-11-17 21:14:57 +00:00
Nicolas Pierron
01e98e49b1 * Add a stdenv adapter which can remove all maintainers fields. This can
be used to remove error reports from development branches.

svn path=/nixpkgs/trunk/; revision=18377
2009-11-16 22:23:11 +00:00
Eelco Dolstra
f782f14e58 * Factor out an adapter to clean up the build tree.
svn path=/nixpkgs/trunk/; revision=16920
2009-09-02 06:31:13 +00:00