Commit graph

99 commits

Author SHA1 Message Date
Tuomas Tynkkynen 5d55ae5d50 stdenv/multiple-outputs.sh: Change output propagation logic
Because 'dev' will most often not be the default output after my changes.
2016-08-29 14:49:51 +03:00
Nikolay Amiantov d43bde5f2b patchShebangs: quote variable assignment 2016-07-09 03:05:11 +03:00
Cireo ff3e7d2b4b patchShebangs: strip trailing whitespace
Prior to this commit, trailing whitespace would be introduced when
modifying '#!' lines with no arguments.  For example (whitespace added):

    /nix/store/.../foo: interpreter directive changed
        from "/bin/bash"
          to "/nix/store/...-bash-4.3-p42/bin/bash  "

    /nix/store/.../bar: interpreter directive changed
        from "/bin/baz wef"
          to "/nix/store/...-baz wef "

We add a sed command to strip trailing whitespace, so the above commands
would drop the two spaces after "bash", or the one space after "baz wef".

abbradar: fixed commit title

Closes #16785.
2016-07-09 03:00:27 +03:00
Vladimír Čunát 61b8d27b4c make-wrapper: fixup #14753 changes to make tests work
The tests need to expand passed variable and very carefully.
I could see no other easy way than to change single-quoting in
makeWrapper to double-quoting.
The tests now fail with the same problem as on master...
2016-06-19 13:38:46 +02:00
Vladimír Čunát cec03a8ecd Merge #14753: makeWrapper: allow spaces in variables 2016-06-09 13:09:43 +02:00
Guillaume Maudoux bfd522da63 setup-hooks: do not pass missing dirs to find (close #15405)
find fails when called with an inexistent search path.
That situation may arise when the output is created after by a postFixup hook.
vcunat amended the PR by clarifying one more `return` to `return 0`.
2016-05-22 12:08:01 +02:00
Vladimír Čunát 7a005601d4 Merge branch 'master' to resolve conflicts 2016-05-05 08:25:38 +02:00
Maxim Ivanov dea920bfdc Remove obsolete scatter output hook
There are no users of it in main tree and recent merge
of multiple outputs branch makes it obsolete for private trees
too.

At the time hook was created, recently merged multiple output
branch was relying on passing flags to autotools to split
outputs, which obviously wasn't working for other build systems

Scatter output was taking different approach where files were
moved out from a build tree based on known  paths, which is more
or less what current multiple-outputs.sh hook is able to do too.
2016-04-30 22:05:33 +01:00
Vladimír Čunát 6e7787e666 stdenv for windows: auto-link dependency DLLs
For every *.{exe,dll} in $output/bin/ we try to find all (potential)
transitive dependencies and symlink those DLLs into $output/bin
so they are found on invocation.
(DLLs are first searched in the directory of the running exe file.)

The links are relative, so relocating whole /nix/store won't break them.
The hook is activated on cygwin and when cross-compiling to mingw.
2016-04-23 10:52:00 +02:00
Vladimír Čunát f6dfbb692c stdenv multiple-outputs: fix cross-build propagation
Fixes #14817. The outputs weren't propagated correctly when
cross-building.
2016-04-20 16:37:23 +02:00
Vladimír Čunát 9f8751528c stdenv multiple-outputs: fix #14782 --docdir location
- the default --docdir is typically DATAROOTDIR/doc/pkgName
- I saw no other way than to employ some magic to guess this `pkgName`
- user can override it by setting $shareDocName
2016-04-20 16:36:10 +02:00
Marius Bakke d534e38d58 makeWrapper: allow special characters in variable contents 2016-04-16 02:58:02 +01:00
Vladimír Čunát 30f14243c3 Merge branch 'master' into closure-size
Comparison to master evaluations on Hydra:
  - 1255515 for nixos
  - 1255502 for nixpkgs
2016-04-10 11:17:52 +02:00
Eelco Dolstra 13a1c7b8c1 useOldCXXAbi: Change into a setup hook
Stdenv adapters considered weird.
2016-04-01 13:36:59 +02:00
Vladimír Čunát ab15a62c68 Merge branch 'master' into closure-size
Beware that stdenv doesn't build. It seems something more will be needed
than just resolution of merge conflicts.
2016-04-01 10:06:01 +02:00
Domen Kožar b07e7bfc7b Merge remote-tracking branch 'origin/staging' 2016-03-27 13:19:04 +01:00
Peter Simons af81505c00 wrap-gapps-hook.sh: fix double inclusion guard
The simple "return" would not override the non-zero error code set by the
preceding test command, therefore aborting scripts running with "set -e".
2016-03-18 07:52:36 +01:00
Eelco Dolstra 2af1cb3aa6 Merge remote-tracking branch 'origin/binutils-2.26' into staging
This still breaks a few packages, but nothing really major:

  http://hydra.nixos.org/eval/1241850?filter=x86_64-linux&compare=1237919&full=#tabs-now-fail
2016-03-11 11:58:49 +01:00
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