3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

4536 commits

Author SHA1 Message Date
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
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
Robert Hensing ab11d2114e
Merge pull request #126680 from roberth/empty
emptyFile, emptyDirectory: init
2021-06-13 20:45:21 +02:00
Robert Hensing c38c5dba10 tests.trivial: Add emptyFile, emptyDirectory to samples 2021-06-12 17:29:27 +02:00
Robert Hensing 047fe2fe23 emptyFile, emptyDirectory: init 2021-06-12 17:28:00 +02:00
github-actions[bot] 8e50248719
Merge staging-next into staging 2021-06-11 12:04:41 +00:00
github-actions[bot] 212846c302
Merge master into staging-next 2021-06-11 12:04:38 +00:00
superherointj 15807923f9 build-support.ocaml.dune: handle minimalOCamlVersion typo 2021-06-11 11:08:12 +02:00
Alyssa Ross 926765c5e3
Merge remote-tracking branch 'nixpkgs/staging-next' into staging
Conflicts:
	pkgs/servers/http/apache-httpd/2.4.nix
2021-06-11 02:05:00 +00:00
github-actions[bot] dcfc502458
Merge master into staging-next 2021-06-11 00:09:47 +00:00
Théo Zimmermann 489959099f mkCoqDerivation: fix useDune2 2021-06-10 21:52:03 +02:00
Jan Tojnar ba733d435b
Merge branch 'staging-next' into staging 2021-06-10 14:07:45 +02:00
github-actions[bot] 51dce04dde
Merge master into staging-next 2021-06-10 12:05:05 +00:00
Robert Hensing 76f53eef48
Merge pull request #125223 from hercules-ci/fix-dockerTools-example-fetch-sha
nixosTests.docker-tools: Fix nixFromDockerHub example sha
2021-06-10 10:10:18 +02:00
github-actions[bot] da8d931c82
Merge master into staging-next 2021-06-10 06:07:24 +00:00
AndersonTorres e9e5f5f84d Change all alsaLib references to alsa-lib 2021-06-10 01:12:49 -03:00
github-actions[bot] e40e33d9d8
Merge staging-next into staging 2021-06-08 18:16:30 +00:00
github-actions[bot] e8f8906d68
Merge master into staging-next 2021-06-08 18:16:27 +00:00
sternenseemann 3bc8e5cd23 tests.writers: use dashes instead of underscores in drv names
This is more in line with standard derivation name policy in nixpkgs.
2021-06-08 14:06:41 +02:00
sternenseemann f46a1e353a tests.writers: give all test derivations unique names
This makes it easier to debug test failures since the derivation name
will give an indication which writer it belongs to.
2021-06-08 14:06:41 +02:00
github-actions[bot] 59ab4de3e0
Merge staging-next into staging 2021-06-08 00:19:01 +00:00
github-actions[bot] 45dbaf4c3d
Merge master into staging-next 2021-06-08 00:18:58 +00:00
Luke Granger-Brown 840f6883fc
Merge pull request #126034 from lukegb/bazel-build-configured
Switch buildBazelPackage fetchConfigured on by default
2021-06-07 23:59:33 +01:00
github-actions[bot] 5b7fbb07b8
Merge staging-next into staging 2021-06-07 18:48:37 +00:00
github-actions[bot] 1593cddce5
Merge master into staging-next 2021-06-07 18:48:34 +00:00
Alyssa Ross 1dcba17714
wrapBintoolsWith: fix final stage NetBSD
Fixes "bintools" on NetBSD -- without this only the version in stdenv
would work, not the one from the final stage.

Andi tried to warn me about this[1].  Andi, I'm sorry for doubting you.

[1]: https://github.com/NixOS/nixpkgs/pull/124499#discussion_r641949801
2021-06-07 11:49:31 +00:00
Luke Granger-Brown cfd38a4006 buildBazelPackage: set fetchConfigured default to true 2021-06-07 02:04:01 +00:00
Luke Granger-Brown bc260c31f1 buildBazelPackage: don't fail if the marker file doesn't exist
This was the intent of my previous change, but it didn't quite work
because the pipeline still exits false even if the file doesn't exist.
Oops.
2021-06-06 21:18:56 +00:00
github-actions[bot] 0397e518b7
Merge staging-next into staging 2021-06-05 18:30:31 +00:00
github-actions[bot] d9d6f71e43
Merge master into staging-next 2021-06-05 18:30:28 +00:00
Jörg Thalheim 8b5175012b
Merge pull request #125804 from Mic92/build-fhs-userenv
buildFhsUserenv: don't leak mounts to other processes
2021-06-05 18:03:11 +02:00
Jörg Thalheim 43908f4c1d
buildFhsUserenv: don't leak mounts to other processes
If run as root we were leaking mounts to the parent namespace,
which lead to an error when removing the temporary mountroot.
To fix this we remount the whole tree as private as soon as we created
the new mountenamespace.
2021-06-05 16:47:44 +02:00
Antoine Fontaine c4b3aa6260 build-support/make-desktopitem: add some missing fields 2021-06-04 17:48:46 +02:00
github-actions[bot] cf75c491be
Merge staging-next into staging 2021-06-02 20:25:08 +00:00
github-actions[bot] 825cffa5ae
Merge master into staging-next 2021-06-02 20:25:05 +00:00
Robert Hensing 1834bc8711
Merge pull request #125216 from hercules-ci/follow-up-115491
dockerTools: Fix passthru image tag
2021-06-02 16:58:49 +02:00
github-actions[bot] ffe6577d05
Merge staging-next into staging 2021-06-01 20:30:47 +00:00
github-actions[bot] 42b70ad7f1
Merge master into staging-next 2021-06-01 20:30:45 +00:00
Sandro bc64755cfa
Merge pull request #124603 from mjsir911/msirabella/peclCheck
php.buildPecl: Add checkPhase
2021-06-01 16:34:42 +02:00
Robert Hensing d155b8c438 nixosTests.docker-tools: Fix nixFromDockerHub example sha
For https://github.com/NixOS/nixpkgs/pull/125211 I tried to test
the fetcher with

    nix-build -A dockerTools.examples.nixFromDockerHub --option substitute false

But it failed. I haven't figured out the cause, but the outputs
match, so it's probably the hashing method (flat/recursive) that
changed at some point. (The names did match.)
2021-06-01 15:13:03 +02:00
Robert Hensing 7f6a395070
Merge pull request #125211 from edwtjo/docker-fetch-wotls
build-support/docker: pass tlsVerify to support http registries
2021-06-01 15:07:48 +02:00