Commit Graph

2014 Commits

Author SHA1 Message Date
Ryan Burns
40299257cc Merge branch 'master' into staging-next 2021-09-23 18:43:00 -07:00
Michael Stone
470466fdbd
sigtool: 4a3719b4 -> 2a13539d (#138453)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-09-23 17:14:07 +02:00
Winter
8cff7796d7
stdenv: re-add isMachO helper function (#138334) 2021-09-17 23:09:06 -04:00
Vladimír Čunát
183cd6b09f
Merge #138186: stdenv: remove isMachO helper function
...into staging-next
2021-09-17 18:31:26 +02:00
Winter
f8edf7720d stdenv: remove isMachO helper function
This reverts commit 488395c0f8.

Currently, `nix print-dev-env` fails to execute if this function is present, because of its use of hex literals.
Until this issue (https://github.com/NixOS/nix/issues/5262) is solved, we should revert this to prevent breakage.
2021-09-16 16:56:12 -04:00
happysalada
33518fcb45 stdenv/setup.sh: fix read -N 0 for bash 5
somehow `read -N 0` behavior changed in bash 5. `read -d ''` has identical behavior
the purpose of the function is to read stdin and exit 1 on a null byte (i.e. if stdin is the content of a binary)

(cherry picked from commit 5d0acf20f88b1820cb8b641cfc5a43e973122701)
2021-09-12 09:48:54 +09:00
happysalada
4c92bb8bdf stdenv: fix nix_build_cores guess
- use builtin arithmetic instead of external expr
- simplify logic with bash builtins
2021-09-07 00:36:55 +09:00
happysalada
02c142a2dd stdenv: fix showBuildStats
- remove going through another file
- use builtin instead of external cat
- improve echo formatting
2021-09-06 22:51:33 +09:00
Martin Weinelt
7f732aca66 Revert "Merge remote-tracking branch 'origin/python-unstable' into staging-next"
This reverts commit b041b2e1b2, reversing
changes made to 5b6c2380ad.
2021-09-05 15:02:25 +02:00
happysalada
e32bf6f4f2 stdenv setup.sh: remove combined [ in favor of [[
[ ... ] && [ ...] -> [[ ... && ... ]]
2021-08-30 10:27:45 +09:00
happysalada
fd89fb6248 stdenv: remove bash version compatibility hack 2021-08-30 10:26:56 +09:00
happysalada
13049cd33e stdenv: remove combined command conditional 2021-08-30 10:26:14 +09:00
happysalada
2fa9facc49 stdenv: arithmetic fixes 2021-08-30 10:25:40 +09:00
happysalada
1200c8175c stdenv: reduce io 2021-08-30 10:24:30 +09:00
happysalada
54475daa27 stdenv: declare missing variables 2021-08-30 10:24:00 +09:00
Sebastián Mancilla
488395c0f8
stdenv: add isMachO helper function (#133808)
Detect if a binary is a Mach-O file.
2021-08-21 15:33:03 -04:00
John Ericson
3edba5edfc pkgsStatic: Finally obviate overlay! 2021-08-20 06:09:48 +00:00
John Ericson
904625852d pkgsStatic: Inline more of static overlay 2021-08-19 21:55:06 +00:00
John Ericson
221ca6f2ff
Merge pull request #134463 from Ericson2314/stdenv-adapter-latebind
stdenv: Fix overriding + `overrideAttrs`
2021-08-18 19:01:54 -04:00
John Ericson
b4cc2a2479 pkgs/stdenv/make-derivation: Reindent
We previously make it just be the function, not a single-item attrset,
without deindenting to make a readable diff. No we deindent.
2021-08-18 17:22:52 +00:00
John Ericson
f110a182a6 stdenv: Fix overriding + overrideAttrs
The old stdenv adapters were subtly wrong in two ways:

 - `overrideAttrs` leaked the original, unoverridden `mkDerivation`.

 - `stdenv.override` would throw away any manually-set `mkDerivation`
   from a stdenv reverting to the original.

Now, `mkDerivation` is controlled (nearly directly) via an argument, and
always correctly closes over the final ("self") stdenv. This means the
adapters can work entirely via `.override` without any manual `stdenv //
...`, and both those issues are fixed.

Note hashes are changed, because stdenvs no previously overridden like
`stdenvNoCC` and `crossLibcStdenv` now are. I had to add some
`dontDisableStatic = true` accordingly. The flip side however is that
since the overrides compose, we no longer need to override anything but
the default `stdenv` from which all the others are created.
2021-08-18 17:22:50 +00:00
github-actions[bot]
1b4a28fed4
Merge master into staging-next 2021-08-07 12:01:25 +00:00
Artturin
40944bbab7 stdenv/check-meta: add maxSilent
Hydra supports it
https://github.com/NixOS/hydra/blob/master/src/hydra-eval-jobs/hydra-eval-jobs.cc#L172
2021-08-07 02:18:59 +03:00
Alyssa Ross
0901dfb214 stdenv/setup: force libtool to skip dep checks
When we "fix" libtool, we empty out its system library path to avoid
it discovering libraries in e.g. /usr when the sandbox is disabled.
But this also means that the checks libtool does to make sure it can
find the libraries its supposed to be linking to won't work.  On Linux
and Darwin, this isn't a problem, because libtool doesn't actually
perform any checks, but it is on at least NetBSD and Cygwin[1].

So, we force libtool not to do these checks on any platform, bringing
the more exotic platforms into line with the existing behaviour on
Linux and Darwin.

Without this change, lots of library packages produce warnings like
this in their build output on the platforms with checks by default:

    *** Warning: linker path does not have real file for library -lz.
    *** I have the capability to make that library automatically link in when
    *** you link to this library.  But I can only do this if you have a
    *** shared version of the library, which you do not appear to have
    *** because I did check the linker path looking for a file starting
    *** with libz but no candidates were found. (...for regex pattern test)
    *** The inter-library dependencies that have been dropped here will be
    *** automatically added whenever a program is linked with this library
    *** or is declared to -dlopen it.

And dependent packages break because libtool doesn't link their
transitive dependencies.  So making this change fixes _lots_ of
packages on those platforms.

[1]: https://git.savannah.gnu.org/cgit/libtool.git/tree/m4/libtool.m4?id=544fc0e2c2a03129a540aebef41ad32bfb5c06b8#n3445
2021-07-27 20:42:31 +00:00
Jörg Thalheim
7bf8b97d68
Merge pull request #130601 from happysalada/stdenv_cosmetic
Stdenv cosmetic
2021-07-23 09:45:43 +01:00
happysalada
4fc50527f8 stdenv: typo 2021-07-19 14:49:47 +09:00
Vladimír Čunát
4bd38c330f
Revert #127736: stdenv changes towards an alternative shell
At least for now.  Such changes are risky (we have very many packages),
and apparently it needs more testing/review without blocking other
changes.

This reverts the whole range 4d0e3984918^..8752c327377,
except for one commit that got reverted in 6f239d7309 already.
(that MR didn't even get its merge commit)
2021-07-17 20:39:47 +02:00
Vladimír Čunát
88a6ee04bf
Merge #129854: stdenv/darwin: finalize URLs (into staging-next) 2021-07-16 17:41:02 +02:00
Vladimír Čunát
2a44031d56
stdenv/make-bootstrap-tools: nuke yet another header
This is needed after glibc bump from PR #111616.
2021-07-16 16:15:32 +02:00
Vladimír Čunát
f47ee76a6a
stdenv/darwin: switch to the official bootstrap URLs 2021-07-16 10:44:04 +02:00
Vladimír Čunát
3b437b95df
Merge #129854: stdenv/darwin: update bootstrap tools
... for x86_64-darwin (into staging-next)
It wouldn't bootstrap otherwise.

Unfortunately we still haven't managed to get the tarballs
on the proper URLs, but GitHub should be reliable enough
and surely almost noone will bootstrap themselves anyway.
2021-07-16 10:26:10 +02:00
Vladimír Čunát
6f239d7309
Revert "setup.sh: fatal: This word should yield a string, but it contains an array"
This reverts commit bf99a819a1.
It caused regressions in some packages; see:
https://github.com/NixOS/nixpkgs/commit/bf99a819a160
2021-07-16 10:00:29 +02:00
Vladimír Čunát
d6a51653d7
stdenv/darwin: update bootstrap tools for x86_64-darwin
Updated python3 will block bootstrapping otherwise.

Verification instructions:
$ xdg-open https://hydra.nixos.org/build/144118577#tabs-details
$ nix build /nix/store/sh9cd0rarr8a2db1zdr4fzl4qsmvz5jp-stdenv-bootstrap-tools
$ cat /nix/store/sh9cd0rarr8a2db1zdr4fzl4qsmvz5jp-stdenv-bootstrap-tools/nix-support/hydra-build-products
$ nix hash-path /nix/store/9h4d7s313wv3gkfwi493yr1wvdsz9lf2-stdenv-bootstrap-tools/on-server/{sh,bzip2,mkdir,cpio}
sha256-igMAVEfumFv/LUNTGfNi2nSehgTNIP4Sg+f3L7u6SMA=
sha256-K3rhkJZipudT1Jgh+l41Y/fNsMkrPtiAsNRDha/lpZI=
sha256-VddFELwLDJGNADKB1fWwWPBtIAlEUgJv2hXRmC4NEeM=
sha256-SWkwvLaFyV44kLKL2nx720SvcL4ej/p2V/bX3uqAGO0=
$ nix hash-file /nix/store/9h4d7s313wv3gkfwi493yr1wvdsz9lf2-stdenv-bootstrap-tools/on-server/bootstrap-tools.cpio.bz2
sha256-b65dXbIm6o6s6U8tAiGpR6SMfvfn/VFcZgTHBetJZis=
2021-07-10 17:03:40 +02:00
Vladimír Čunát
7c25c1fd88
Merge branch 'glibc-2.33' into staging 2021-07-06 16:17:13 +02:00
Vladimír Čunát
5a71fa8447
stdenv bootstrap: hack around glibc version mismatch
With this we shouldn't need other workarounds for the LTO problems.
2021-07-06 16:02:11 +02:00
Raphael Megzari
cf5882f27c Update pkgs/stdenv/generic/setup.sh:use [[ instead of [
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-07-06 09:27:18 +09:00
Raphael Megzari
2c3b847d29 Update pkgs/stdenv/generic/setup.sh: use [[ instead of [
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-07-06 09:27:18 +09:00
Raphael Megzari
80c9096d9c Update pkgs/stdenv/generic/setup.sh: group var declaration
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-07-06 09:27:18 +09:00
Raphael Megzari
bcdfbfa19f Update pkgs/stdenv/generic/setup.sh: group var declaration
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-07-06 09:27:18 +09:00
happysalada
06688b73ca setup.sh: separate command from combined conditional 2021-07-06 09:27:18 +09:00
Raphael Megzari
caeb3c915f Update pkgs/stdenv/generic/setup.sh
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-07-06 09:27:18 +09:00
happysalada
5f8b5465e1 setup.sh: remove bash empty array old hack 2021-07-06 09:27:18 +09:00
happysalada
fc5438bfcf setup.sh: use [[ for combined conditionals 2021-07-06 09:27:18 +09:00
happysalada
5617feb330 setup.sh: remove extraneous cat cmd 2021-07-06 09:27:18 +09:00
happysalada
1f255cbe5c setup.sh: arithmetic conditional style
used "recommended" arithmetic conditional style
2021-07-06 09:27:18 +09:00
happysalada
9f156d0adc setup.sh: fatal: Undefined variable
define hook arrays before assigning to them
2021-07-06 09:27:18 +09:00
happysalada
bf99a819a1 setup.sh: fatal: This word should yield a string, but it contains an array
remove implicit array comparison in case
2021-07-06 09:27:18 +09:00
happysalada
1a71a5fb08 setup.sh: shellcheck disable=SC1091
https://github.com/koalaman/shellcheck/wiki/SC1091
2021-07-06 09:27:18 +09:00
happysalada
b1c5a9f008 setup.sh: shellcheck disable=SC2034
https://github.com/koalaman/shellcheck/wiki/SC2034
2021-07-06 09:27:18 +09:00
happysalada
740582739c setup.sh: missing white space 2021-07-06 09:27:18 +09:00