Commit Graph

231 Commits

Author SHA1 Message Date
Vladimír Čunát
09af15654f Merge master into closure-size
The kde-5 stuff still didn't merge well.
I hand-fixed what I saw, but there may be more problems.
2016-03-08 09:58:19 +01:00
zimbatm
5e5494a852 make-wrapper.sh: add an --unset argument
`--set FOO ""` is not strictly equivalent to `--unset FOO`. In the former case
the environment variable still exists with an empty string as a value.
2016-03-06 22:48:14 +00:00
Eelco Dolstra
d5bb6a1f9c glibc: Enable separate debug symbols
The importance of glibc makes it worthwhile to provide debug
symbols. However, this revealed an issue with separateDebugInfo: it
was indiscriminately adding --build-id to all ld invocations, while in
fact it should only do that for final links. Glibc also uses non-final
("relocatable") links, leading to subsequent failure to apply a build
ID ("Cannot create .note.gnu.build-id section, --build-id
ignored"). So now ld-wrapper.sh only passes --build-id for final
links.
2016-02-28 02:57:37 +01:00
Eelco Dolstra
69a337edae separateDebugInfo: Compress debug sections at compile/link time 2016-02-28 01:54:55 +01:00
Eelco Dolstra
d71a4851e8 Don't try to apply patchelf to non-ELF binaries 2016-02-18 22:54:11 +01:00
Eelco Dolstra
bf63de1613 separateDebugInfo: Handle weird filenames properly 2016-02-18 22:54:11 +01:00
Eelco Dolstra
076de98c94 separateDebugInfo: Restore ELF check 2016-02-18 21:37:26 +01:00
Vladimír Čunát
ae74c356d9 Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
2016-02-03 16:57:19 +01:00
zimbatm
48a5bb703d stdenv: fix set-source-date-epoch-to-latest (close #12602)
In some cases the $sourceRoot is missing. Skip the hook instead
of showing the following cryptic error:

    find: cannot search `': No such file or directory
    /nix/store/0p1afvl8jcpi6dvsq2n58i90w9c59vz1-set-source-date-epoch-to-latest.sh: line 12: [: : integer expression expected

vcunat removed the warning; the hook will just skip silently in these cases.
Perhaps someone can improve on it some time.
2016-01-29 12:03:48 +01:00
Vladimír Čunát
716aac2519 Merge branch 'staging' into closure-size 2016-01-19 09:55:31 +01:00
Vladimír Čunát
620c147cce Merge branch 'master' into staging 2016-01-18 09:48:49 +01:00
Eelco Dolstra
2fcee55e5f separateDebugInfo: Create symlinks matching original binaries
For instance, a binary like libfoo.so will cause a symlink
lib/debug/libfoo.so.debug -> .build-id/<build-ID>.debug to be
created. This is primarily useful for use with eu-addr2line, if you
know the name of a binary and the relative address, but not the build
ID.
2016-01-15 16:16:11 +01:00
Vladimír Čunát
19d22184d3 stdenv/multiple-outputs.sh: small tweaks
- fix in silencing some moveToOutput messages
- allow removing (developer) documentation even without defining outputs
  (note: some paths are auto-removed by default, e.g. gtk-doc and man3)
2016-01-12 23:57:47 +01:00
Eelco Dolstra
38460cfe72 set-source-date-epoch-to-latest.sh: Support Darwin 2016-01-06 00:31:27 +01:00
Eelco Dolstra
81e530a749 Set SOURCE_DATE_EPOCH to latest source file
This provides a timestamp that's more useful than 1970-01-01 yet still
deterministic.
2016-01-05 17:21:48 +01:00
Luca Bruno
5b0352a6a4 Merge branch 'master' into closure-size 2015-12-11 18:31:00 +01:00
Luca Bruno
e289717414 rename moveToOutput and propagatedBuildInputs 2015-12-02 10:05:36 +01:00
Vladimír Čunát
333d69a5f0 Merge staging into closure-size
The most complex problems were from dealing with switches reverted in
the meantime (gcc5, gmp6, ncurses6).
It's likely that darwin is (still) broken nontrivially.
2015-11-20 14:32:58 +01:00
Danny Wilson
f9134ca9df Fix patchShebangs on SmartOS
Tail is very picky about the space after -c
 when compiled by Nix on Illumos (no idea why).
2015-11-16 17:20:14 +01:00
Vladimír Čunát
d10b9108f2 wrapGAppsHook: fix $gappsWrapperArgs as intended
i.e. define it even if $dontWrapGApps is set, and document the intention.
2015-11-09 15:40:20 +01:00
Vladimír Čunát
3f074b8a1e wrapGAppsHook: avoid running multiple times
/cc #10351 and @lethalman.
2015-11-09 15:19:41 +01:00
Vladimír Čunát
64cdc48d1d stdenv/multiple-outputs: add REMOVE target, use for docdev
Now any developer docs are removed by default, unless "docdev"
is in $outputs or $outputDocdev is defined.
Currently devdoc consists of just man3 and gtk-doc.
2015-10-28 10:15:54 +01:00
Vladimír Čunát
689d9757c5 stdenv/multiple-outputs: autoremove empty directories
i.e. remove chains of empty dirs after moving contents out of them.
2015-10-28 10:15:53 +01:00
Vladimír Čunát
b95f266638 stdenv/multiple-outputs: mainly add $docdev
Packages often provide some developer documentation
which is useless to typical users (e.g. man3 and gtk-doc).
2015-10-28 10:09:32 +01:00
Tuomas Tynkkynen
d844a1002f stdenv/multiple-outputs: Fix checking of propagatedOutputs
'[[ ! -v "$propagatedOutputs" ]]' is incorrect and always evaluates to
true. The correct form using double brackets would be
'[[ ! -v propagatedOutputs ]]', but I strongly dislike '[[ ]]' due to
the totally different quoting rules compared to everything else in bash.
2015-10-03 14:08:48 +02:00
Tuomas Tynkkynen
52c4337356 stdenv/multiple-outputs: Guard greps with 'set +/-o pipefail'
This is required since #7524 is fixed ("stdenv: Errors in hooks (such as
postUnpack) get ignored")
2015-10-03 14:08:48 +02:00
Vladimír Čunát
5227fb1dd5 Merge commit staging+systemd into closure-size
Many non-conflict problems weren't (fully) resolved in this commit yet.
2015-10-03 13:33:37 +02:00
William A. Kennington III
5cfe893cc4 Merge commit '2d464f75ed46869b5942c4b479772a0367b30608' into master.upstream
This is a partial commit from staging in an attempt to make merges
smaller.
2015-09-23 14:35:36 -07:00
Vladimír Čunát
6b0add86b9 separateDebugInfo: one more comment 2015-09-23 10:35:40 +02:00
Vladimír Čunát
22521f3b90 separateDebugInfo: fix typo in comment 2015-09-22 22:07:58 +02:00
Vladimír Čunát
b3658bc01b separateDebugInfo: compress it by default
Using zlib should be cheap enough and save lots of HDD space.
Case study (glib): 11 MB -> 4 MB.
2015-09-22 22:05:44 +02:00
Eelco Dolstra
2a28bc6691 separateDebugInfo: Assert Linux
Also remove some unintended setting of separateDebugInfo.
2015-09-22 20:21:10 +02:00
Vladimír Čunát
a418096d6a Merge branch 'master' into staging 2015-09-17 20:07:20 +02:00
Eelco Dolstra
276e38a1bb patchShebangs: Ignore outputs that don't exist yet 2015-09-17 16:54:07 +02:00
Eelco Dolstra
ec5b66eb4a Enable separate debug info
You can now pass

  separateDebugInfo = true;

to mkDerivation. This causes debug info to be separated from ELF
binaries and stored in the "debug" output. The advantage is that it
enables installing lean binaries, while still having the ability to
make sense of core dumps, etc.
2015-09-17 15:56:33 +02:00
Vladimír Čunát
8f33b8cc93 mass rewrite of find parameters to cross-platform style
Fixes #9044, close #9667. Thanks to @taku0 for suggesting this solution.
Now we have no modes starting with `/` or `+`.

Rewrite the `-perm` parameters of find:
 - completely safe: rewrite `/0100` and `+100` to `-0100`,
 - slightly semantics-changing: rewrite `+111` to `-0100`.
I cross-verified the `find` manual pages for Linux, Darwin, FreeBSD.
2015-09-06 10:26:30 +02:00
Thomas Tuegel
61cad61ebf makeWrapper: accept --argv0 flag (/cc #9562)
By default `makeWrapper` will not set argv[0] (this is a reversion to
the old default behavior). Based on the breakage we have seen from
changing the default, this is what most people want. The `wrapProgram`
function will send `--argv0 '"$0"'` to `makeWrapper`, i.e. it will
continue to pass-through the argv[0] that the wrapper is called with.
2015-09-01 13:27:12 +02:00
Thomas Tuegel
c234f37b59 makeWrapper: child process inherits argv[0] 2015-08-23 10:30:00 -05:00
William A. Kennington III
952def0e3c Merge branch 'master.upstream' into staging.upstream 2015-08-13 11:55:02 -07:00
Vladimír Čunát
c55e634f9a wrapGAppsHook: fix a typo
It would only matter in (some) multiple-output derivations.
/cc @lethalman.
2015-08-12 05:37:36 +02:00
William A. Kennington III
7ebe164ae0 Merge branch 'master.upstream' into staging.upstream 2015-07-30 15:03:10 -07:00
Eelco Dolstra
068f8abaa5 releaseTools.coverageAnalysis: Emit hydra-metrics 2015-07-30 18:06:33 +02:00
Luca Bruno
a8f6086708 wrapGAppsHook: populate GIO_EXTRA_MODULES 2015-07-30 10:45:04 +00:00
Vladimír Čunát
862900e42e mass-replace deprecated usage of find -perm (Fixes #9044)
sed 's|-perm +0|-perm /0|g'
It's a mass-rebuild due to usage in stdenv's default setup hooks.
2015-07-30 10:30:17 +02:00
William A. Kennington III
aaef42ab8c Merge branch 'master.upstream' into staging.upstream 2015-07-29 10:23:08 -07:00
Luca Bruno
763fda70f0 wrapGAppsHook: build hook for wrapping GTK/GNOME apps 2015-07-29 11:14:56 +00:00
Eelco Dolstra
2d9c63633e move-docs.sh: Handle share/gtk-doc 2015-07-26 13:35:49 +02:00
Vladimír Čunát
d484c392aa stdenv multiple-outputs: change propagation rules
Now development stuff is propagated from the first output,
and userEnvPkgs from the one with binaries.

Also don't move *.la files (yet). It causes problems, and they're small.
2015-04-18 19:30:28 +02:00
Vladimír Čunát
bf414c9d4f Merge 'staging' into closure-size
- there were many easy merge conflicts
- cc-wrapper needed nontrivial changes

Many other problems might've been created by interaction of the branches,
but stdenv and a few other packages build fine now.
2015-04-18 11:22:20 +02:00
Eelco Dolstra
9c579f691f fix-darwin-dylib-names: Fix all outputs
This fixes the install names of the Boost dylibs on Darwin.
2015-03-24 16:28:20 +01:00
Domen Kožar
9b7b2ce8eb Revert "Introduce patchShebangsPhase ran in preConfigurePhases"
This reverts commit 512fbb280f.

See #5368
2015-01-08 10:26:49 +01:00
Domen Kožar
512fbb280f Introduce patchShebangsPhase ran in preConfigurePhases
(cherry picked from commit 91c7e8747af1fdc2a70cd98594ccbb12a5c6902d)
Signed-off-by: Domen Kožar <domen@dev.si>
2015-01-02 02:58:32 +01:00
Igor Pashev
d57927748a autoreconf may need gettext
E. g. for AC_LIB_PREFIX
2014-12-22 20:20:00 +00:00
Eelco Dolstra
e611215f5c Move finding XML catalogs into a separate setup hook
This is because libxml/libxslt are not the only implementations that
respect $XML_CATALOG_FILES.

Also, look in share/xml for catalogs (in addition to the
now-deprecated xml/dtd and xml/xsl).
2014-11-25 16:23:48 +01:00
Vladimír Čunát
8e44ae5bd4 stdenv lib64-moving: fail instead of overwriting
Silent overwriting is dangerous and it bit us straightaway on gcc_multi.
https://github.com/NixOS/nixpkgs/commit/51f1b4ec48d5
2014-11-17 11:27:38 +01: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
51f1b4ec48 Automatically move stuff in lib64 to lib 2014-10-07 15:04:13 +02:00
Eelco Dolstra
ab04b7d0bb Automatically move programs in sbin to bin
This should fix the OpenJDK build, which was failing because paxctl is
in sbin and therefore not automatically added to $PATH.

http://hydra.nixos.org/build/15658346
2014-10-07 14:43:56 +02:00
Eelco Dolstra
ae18038c6d fixDarwinDylibNames: Use new hook mechanism 2014-09-24 16:12:49 +02:00
Vladimír Čunát
d25cc03f21 multi-out: auto-correct include dirs in *.pc 2014-08-30 23:29:23 +02:00
Vladimír Čunát
38ba4eb693 multiple-outputs.sh: fixup when it's always sourced now 2014-08-30 15:53:24 +02:00
Vladimír Čunát
2f92199183 multiout: resolve general ToDos 2014-08-30 08:54:27 +02:00
Vladimír Čunát
fb59f27a43 WIP: getting good 2014-08-27 01:14:09 +02:00
Vladimír Čunát
4dccb224c5 WIP2 2014-08-26 01:10:56 +02:00
Vladimír Čunát
3ec413cece WIP 2014-08-25 15:30:46 +02:00
Vladimír Čunát
def75f0282 stdenv: add first iteration of the multiout hook
Now it should contain *all* information from stdenv/setup.sh of
the original mutiple-output branch.
However, the configurability of the output paths is much greater.
2014-08-24 19:07:47 +02:00
Eelco Dolstra
a8fc68a5c0 Move share/{man,info,doc} to the corresponding output 2014-08-09 12:47:05 +02:00
Eelco Dolstra
9e31c66d1b stdenv: Put moving docs to $out/share in a separate setup hook 2014-08-09 12:47:05 +02:00
Eelco Dolstra
e3f7dbbac8 Cleanup: Use += to append to envHooks 2014-08-09 12:47:05 +02:00
Eelco Dolstra
2def8e7499 Remove addHook
Just use bash arrays directly. I.e.

  addHook preConfigure myPreConfigure

is now

  preConfigureHooks+=(myPreConfigure)
2014-08-09 12:45:53 +02:00
Eelco Dolstra
5e82aab5d4 Drop redundant space 2014-08-09 12:44:49 +02:00
Eelco Dolstra
daa66b8b1c Factor out fixup phase stuff into separate setup hooks 2014-08-09 12:44:49 +02:00
Maxim Ivanov
e7d5e1cdbc Don't hardcode shell, use $SHELL instead 2014-05-26 14:48:39 +01:00
Maxim Ivanov
e2e77950f3 Scatter output hook
This hook allows to scatter files in $out to multiple outputs.
For "bin" and "doc" outputs there are prefefined default masks, but
they can be overriden by setting files_<outname>, for example:

files_bin = [ "/bin/*" "/lib/libexec/" ];

To make an effect hook must be specified in buildInputs.
2014-05-06 22:47:45 +01: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
a123a2675b lcov: Filter out /nix/store/* by default 2014-02-05 19:18:33 +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
8622548160 Add a setup hook for fixing dylib install names on Darwin
Install names need to be absolute paths, otherwise programs that link
against the dylib won't work without setting $DYLD_LIBRARY_PATH.  Most
packages do this correctly, but some (like Boost and ICU) do not.
This setup hook absolutizes all install names.
2014-01-15 13:41:09 +01:00
Eelco Dolstra
5d6259a973 Add a setup hook that automatically sets up $CLASSPATH
All JARs in $pkg/share/java (for each $pkg in the build inputs) are
added to $CLASSPATH.  Thus, you can say

  buildInputs = [ setJavaClassPath someJavaDependency ];

and the JARs in someJavaDependency will be found automatically by
tools like javac or ant.

Note that the manual used to say that JARs should be installed in
lib/java; this is now share/java, following the Debian policy:

  http://www.debian.org/doc/packaging-manuals/java-policy/x110.html

The directory share/java makes more sense because JARs are
architecture-independent.  (Also, a quick grep shows that we were not
exactly consistent about this in Nixpkgs.)
2014-01-06 14:36:14 +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
41840af689 * Add a setup hook ‘autoreconfHook’ to simplify packages that need to
run autoreconf:

    buildInputs = [ autoreconfHook ];

  is essentially equivalent to

    buildInputs = [ autoconf automake libtool ];
    preConfigure = "autoreconf -i";

svn path=/nixpkgs/branches/x-updates/; revision=34181
2012-05-19 02:52:36 +00:00