Commit graph

4575 commits

Author SHA1 Message Date
github-actions[bot] 08a8809bfe
Merge staging-next into staging 2021-07-18 00:02:06 +00: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
github-actions[bot] 11332e9137
Merge staging-next into staging 2021-07-17 18:01:28 +00:00
github-actions[bot] d6b748b2b3
Merge master into staging-next 2021-07-17 18:00:56 +00:00
Jörg Thalheim 6f18141c6d
Merge pull request #130040 from Atemu/nix-prefetch-git-shallow-hash
nix-prefetch-git: don't fetch everything when given a hash
2021-07-17 14:29:01 +01:00
github-actions[bot] 732bd85cf5
Merge staging-next into staging 2021-07-17 12:01:55 +00:00
github-actions[bot] ee007cdc35
Merge master into staging-next 2021-07-17 06:01:21 +00:00
github-actions[bot] e9ca8c2796
Merge master into haskell-updates 2021-07-17 00:05:09 +00:00
github-actions[bot] e69bb567a4
Merge staging-next into staging 2021-07-16 06:01:38 +00:00
github-actions[bot] 7959589ea0
Merge master into staging-next 2021-07-16 06:01:04 +00:00
Matthew Bauer f5074933b7
bintools: disable -pie when -r or -Ur are used (#128674)
* bintools: disable -pie when -r or -Ur are used

ld’s -r allows you to partially link object files. When -pie is passed with -r, though, we get:

  ld: -r and -pie may not be used together

Most build systems are intelligent enough to pass -no-pie before -r, but we might as well support those that
don’t.

Note: -pie is not enabled by default in Nixpkgs, but it is when you are using musl. So this solution is really
only useful for musl toolchains.

* bintools-wrapper: Add incremental -i check for pie
2021-07-15 20:08:33 -05:00
Matthew Bauer ff327f36db
Merge pull request #127980 from matthewbauer/darwin-emacs-native-comp
Add gcc for emacs wrapper so native-comp works
2021-07-15 20:03:57 -05:00
github-actions[bot] 873ebe9785
Merge master into haskell-updates 2021-07-15 00:05:17 +00:00
github-actions[bot] ad2f2574e5
Merge master into staging-next 2021-07-15 00:01:31 +00:00
adisbladis 0a908ddacc
Merge pull request #129458 from alyssais/package-build
emacs.pkgs.melpaBuild: package-build: 2018-10-05 -> 2021-04-13
2021-07-14 13:32:51 -05:00
Jörg Thalheim 7afa51c2bd Merge remote-tracking branch 'upstream/master' into HEAD 2021-07-14 15:45:51 +02:00
sternenseemann 6bd0c16f89 tests.writers: also expose path via passthru 2021-07-13 15:22:34 +02:00
Atemu 11df41199b nix-prefetch-git: don't fetch everything when given a hash
It's hugely inefficient as we can't use shallow cloning (--depth=1).

This has been tested and adapted for quite a few hosts fetchgit is used on in
Nixpkgs. For those where fetching the hash directly doesn't work (most notably
git.savannah.gnu.org), we simply fall back to the old method.
2021-07-12 20:50:52 +02:00
pandaman64 c39040195f build-rust-crate: disable incremental builds
According to rustc implementation[1], `-C incremental=no` enables
incremental builds with directory name `no`. This patch removes the
`-C incremental` argument to disable incremental builds.

[1]: ee86f96ba1/compiler/rustc_session/src/options.rs (L918-L919)
2021-07-09 22:55:38 +09:00
github-actions[bot] 958dc88d65
Merge master into staging-next 2021-07-08 12:01:23 +00:00
zowoq 05fe220746 dockerTools.tarsum: use current go 2021-07-08 16:31:33 +10:00
Alyssa Ross 9140d4b06f
emacs.pkgs.melpaBuild: package-build: 2018-10-05 -> 2021-04-13
I think this is due an update.  I've chosen to update to the latest
version that has been merged into Melpa.

Unfortunately we now need to hack around it trying to run VCS
commands.

My Emacs configuration with thirty-something leaf packages seems fine
after the rebuild.
2021-07-06 16:07:13 +00:00
Raphael Megzari 8752c32737 Update pkgs/build-support/setup-hooks/move-docs.sh: remove quote in conditional
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-07-06 09:27:18 +09:00
happysalada 44819162e8 multiple-outputs.sh: remove grep from combined conditional 2021-07-06 09:27:18 +09:00
happysalada 6d52db43d4 setup-hook.sh: use eval for dynamic variable export 2021-07-06 09:27:18 +09:00
happysalada ef76a5e009 autoreconf.sh: define preConfigurePhases before assigning 2021-07-06 09:27:18 +09:00
happysalada 8ebfafbce8 shellcheck: shell=bash 2021-07-06 09:27:18 +09:00
happysalada db37d37d84 reproducible-builds.sh: fatal: += not allowed in assignment
take in account undefined case
assign and export in separate step
https://github.com/koalaman/shellcheck/wiki/SC2155
2021-07-06 09:27:18 +09:00
Raphael Megzari db78412f25 prefer [[ over [ for multiple conditionals
Co-authored-by: Jonas Chevalier <zimbatm@zimbatm.com>
2021-07-06 09:27:18 +09:00
happysalada 2bf424d6cc autopatchelf.sh: add link about grep -q 2021-07-06 09:27:18 +09:00
happysalada a7d7e40c00 move-docs.sh: quote where semanticaly valid 2021-07-06 09:27:18 +09:00
happysalada 4e3d905b0d move-docs.sh: shellcheck 2166
https://github.com/koalaman/shellcheck/wiki/SC2166
2021-07-06 09:27:18 +09:00
Sandro 1619046572
Merge pull request #126894 from Stunkymonkey/pname&version 2021-07-05 18:52:04 +02:00
github-actions[bot] 6cead635ad
Merge master into staging-next 2021-07-03 12:01:23 +00:00
Luke Granger-Brown 48c23a086b dockerTools.pullImage: force disable skopeo's progress bar
skopeo will disable the progress bar if it detects that stdout isn't a
TTY - in order to make it think that stdout _isn't_ a TTY and therefore
avoid it printing a lot of "…" on separate lines, we pipe the output
through cat.

This changes the output from:

…
…
…
…
…
…

to the eminently more useful and less spammy:

Getting image source signatures
Copying blob sha256:[snip]
Copying blob sha256:[snip]
Copying blob sha256:[snip]
Copying config sha256:[snip]
Writing manifest to image destination
Storing signatures
2021-07-03 01:40:38 +00:00
Felix Buehler 6f04cd0e69 application/development: /s/name/pname&version/ 2021-06-30 09:55:22 +02:00
github-actions[bot] dcfd9788a1
Merge master into staging-next 2021-06-29 00:10:52 +00:00
Yureka 7f07b70d08 Revert "writers: Allow string paths"
This reverts commit 33ffb05d39.
2021-06-28 22:40:40 +02:00
github-actions[bot] 1016b5a6ba
Merge staging-next into staging 2021-06-27 00:10:43 +00:00
Elis Hirwing 94d07b7492
php: Run nixpkgs-fmt on all php related files 2021-06-26 20:07:56 +02:00
github-actions[bot] 947012b992
Merge staging-next into staging 2021-06-26 00:09:11 +00:00
Robert Schütz d6234c2165 Merge branch 'master' into staging-next 2021-06-26 00:33:58 +02:00
Silvan Mosberger 33ffb05d39 writers: Allow string paths
Before this change, it was not possible to use string paths,
because then the `types.str.check` would succeed. So the only paths that
could be used were ones from the local filesystem via e.g.
`./some/path`.

We can easily fix this by using `types.path.check` instead to determine
whether we are dealing with a path.

This notably also allows using Nix-fetched sources as the content, e.g.
`fetchFromGitHub { ... } + "/some/file"`
2021-06-25 14:39:59 +02:00
Matthew Bauer 8bc10fbc56 Add gcc for emacs wrapper so native-comp works
On macos, we don’t have a gcc executable by default, which is required
for some reason when compiling site-start.
2021-06-23 23:02:11 -05:00
deliciouslytyped a71e906e3a trivial-builders: refactor writeTextFile to be overridable
This fixes #126344, specifically with the goal of enabling overriding the
checkPhase argument. See `design notes` at the end for details.

This allows among other things, enabling bash extension for the `checkPhase`.
Previously using such bash extensions was prohibited by the `writeShellScript`
code because there was no way to enable the extension in the checker.

As an example:

```nix
(writeShellScript "foo" ''
  shopt -s extglob
  echo @(foo|bar)
'').overrideAttrs (old: {
  checkPhase = ''
    # use subshell to preserve outer environment
    (
      export BASHOPTS
      shopt -s extglob
      ${old.checkPhase}
    )
  '';
})
```

This commit also adds tests for this feature to `pkgs/tests/default.nix`,
under `trivial-overriding`. The test code is located at
`pkgs/build-support/trivial-builders/test-overriding.nix`.

Design notes:
-------------

Per discussion with @sternenseemann, the original approach of just wrapping
`writeTextFile` in `makeOverridable` had the issue that combined with `callPackage`
in the following form, would shadow the `.override` attribute of the `writeTextFile`:

```nix
with import <nixpkgs>;
callPackage ({writeShellScript}: writeShellScript "foo" "echo foo")
```

A better approach can be seen in this commit, where `checkPhase` is moved
from an argument of `writeTextFile`, which is substituted into `buildCommand`,
into an `mkDerivation` argument, which is substituted from the environment
and `eval`-ed. (see the source)

This way we can simple use `.overideAttrs` as usual, and this also makes
`checkPhase` a bit more conformant to `mkDerivation` naming, with respect to
phases generally being overridable attrs.

Co-authored-by: sterni <sternenseemann@systemli.org>
Co-authored-by: Naïm Favier <n@monade.li>
2021-06-18 01:39:59 +02:00
Jan Tojnar e3dfa79441
Merge branch 'staging-next' into staging
Regenerated pkgs/servers/x11/xorg/default.nix to resolve the conflict.
2021-06-16 19:59:05 +02:00
github-actions[bot] b08ae54dd9
Merge master into staging-next 2021-06-16 12:04:47 +00:00
Alyssa Ross 508aede4bd skawarePackages.buildPackage: add me as maintainer 2021-06-16 07:59:51 +00:00
github-actions[bot] 9a860729b2
Merge staging-next into staging 2021-06-14 00:08:51 +00:00
github-actions[bot] 13f31f60bf
Merge master into staging-next 2021-06-14 00:08:48 +00:00