Commit graph

404 commits

Author SHA1 Message Date
Vladimír Čunát d5732d9669
Merge branch 'staging-next' into staging 2023-08-05 07:45:29 +02:00
Artturi c0731df13c
Merge pull request #238525 from tie/patch-shebang-update-store-paths 2023-08-04 01:21:07 +03:00
Vincenzo Mantova 07e50252e1 texlive.combine: add ghostscript to wrappers instead of combining 2023-07-29 18:31:18 +02:00
Vincenzo Mantova 56af1c1981 tests.texlive.rpdfcrop: init, check that rpdfcrop runs in restricted mode 2023-07-29 18:10:45 +02:00
Vincenzo Mantova 39750551aa tests.texlive.shebangs: init, check that all shebangs are in Nix 2023-07-29 18:10:45 +02:00
Vincenzo Mantova 1ab65c8c80 tests.texlive.binaries: test non-combined binaries with empty PATH, where possible 2023-07-29 18:10:44 +02:00
Vincenzo Mantova 5ecc48b8ff texlive: build bin containers for binaries and scripts 2023-07-29 18:10:42 +02:00
github-actions[bot] 265c5d7f67
Merge master into haskell-updates 2023-07-28 00:13:07 +00:00
Robert Hensing f705094eac
Merge pull request #245524 from hercules-ci/writeScriptBin-meta.mainProgram
Add meta.mainProgram to writeCBin, add tests
2023-07-27 10:41:20 +02:00
github-actions[bot] 6781f1d32e
Merge master into haskell-updates 2023-07-27 00:12:37 +00:00
Pol Dellaiera 0c7765a38a
Merge pull request #238739 from apfelkuchen6/texlive-licenses-v2
texlive.combine: expose licensing information of combined packages [v2]
2023-07-26 23:36:29 +02:00
Robert Hensing 89bdfd4687 trivial-builders: Move test list closer 2023-07-26 18:22:33 +02:00
Robert Hensing d1dc8384ca writeCBin: Add meta.mainProgram
... and add tests.
2023-07-26 18:22:26 +02:00
github-actions[bot] cde91a5dd2
Merge master into haskell-updates 2023-07-26 00:13:28 +00:00
apfelkuchen06 43ac27ebae tests.texlive.licenses: init 2023-07-25 21:05:00 +02:00
zimbatm 73ee03cbc5 writers: split out the tests
Make it easier to run and debug individual tests.
2023-07-22 17:53:52 +02:00
github-actions[bot] 6522c61c67
Merge master into haskell-updates 2023-07-21 00:13:37 +00:00
github-actions[bot] d6876464b4
Merge master into haskell-updates 2023-07-20 00:14:23 +00:00
Dennis Gosnell 5d1c9db9c9
Merge pull request #243798 from cdepillabout/stack-version-check
tests.haskell.upstreamStackHpackVersion: init
2023-07-16 22:46:18 +09:00
Dennis Gosnell c78223a5ff
tests.haskell.upstreamStackHpackVersion: init
This tests that the upstream `stack` release uses the same version of
`hpack` as the `stack` in Nixpkgs.
2023-07-16 21:35:53 +09:00
github-actions[bot] 8ad2926229
Merge master into haskell-updates 2023-07-16 00:16:59 +00:00
github-actions[bot] 4f3b5848de
Merge master into haskell-updates 2023-07-15 00:14:47 +00:00
Adam Joseph 424952b7b4 gccWithoutTargetLibc: link libgcc_s.so using -mnewlib if isPower
Closes #244405

Also adds considerably more commenting to document what is going on.
2023-07-06 05:50:26 -07:00
Dennis Gosnell 55b8958f7d
tests.haskell.shellFor: change package used in extraDependencies test
This commit does the following two things:

1.  Changes the Haskell package used in the extraDependencies test from
    releaser to conduit.  The reason for this is that conduit is more
    of a "core" package in Haskell, and it is more likely to always be
    working.  (If conduit is not compiling, then large chunks of Hackage
    won't be working.)

2.  Tighten up the GHCi test to actually use the package from
    extraDependencies.  It appears that GHCi can fail to import the
    package from extraDependencies, and that doesn't cause GHCi to
    return an error code, which means the test isn't actually testing
    anything.

    This new change makes it so that if the package from
    extraDependencies is actually not included for some reason, then
    this shellFor test should fail.
2023-07-04 15:38:23 +09:00
Artturin 42c94d06fd stdenv: fix overriding with attrset when finalAttrs isn't used
```
nix-repl> (pkgs.htop.overrideAttrs { pname = "hello-overriden"; }).pname
error:
       … while evaluating a branch condition

         at /nix/store/phn5cahwacv9wjgalygw62x8l4xbl6x3-source/lib/customisation.nix:86:7:

           85|     in
           86|       if builtins.isAttrs result then
             |       ^
           87|         result // {

       … while calling the 'isAttrs' builtin

         at /nix/store/phn5cahwacv9wjgalygw62x8l4xbl6x3-source/lib/customisation.nix:86:10:

           85|     in
           86|       if builtins.isAttrs result then
             |          ^
           87|         result // {

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attempt to call something which is not a function but a set

       at /nix/store/phn5cahwacv9wjgalygw62x8l4xbl6x3-source/pkgs/stdenv/generic/make-derivation.nix:58:21:

           57|           f = self: super:
           58|             let x = f0 super;
             |                     ^
           59|             in
```
2023-07-03 21:34:50 +03:00
Adam Joseph 895c24349c test.cross.sanity: add pkgs.pkgsCross.m68k.stdenv 2023-07-01 16:45:47 -07:00
Robert Hensing 1f5a0b0135
Merge pull request #239005 from Artturin/setorfunoverr
stdenv: let overrideAttrs accept attrset OR function
2023-07-01 15:27:23 +02:00
Adam Joseph fb26d16e99 test.cross.sanity: init
This commit adds `pkgs.test.cross.sanity`, which is meant to be a
carefully curated list of builds/packages that tend to break when
refactoring our cross-compilation infrastructure.

It should strike a balance between being small enough to fit in
a single eval (i.e. not so large that hydra-eval-jobs is needed)
so we can ask @ofborg to check it, yet should have good examples
of things that often break.  So, no buckshot `mapTestOnCross`
calls here.
2023-07-01 02:59:40 -07:00
Artturin 0fdae31531 stdenv: let overrideAttrs accept attrset OR function
Makes overrideAttrs usable in the same way that `override` can be used.
It allows the first argument of `overrideAttrs` to be either a function
or an attrset, instead of only a function:

hello.overrideAttrs (old: { postBuild = "echo hello"; })
hello.overrideAttrs { postBuild = "echo hello"; }

Previously only the first example was possible.

Co-authored-by: adisbladis <adisbladis@gmail.com>
Co-authored-by: matthewcroughan <matt@croughan.sh>
2023-06-30 23:28:00 +03:00
Adam Joseph 18bbf33b38 test.cross.mbuffer: init
This adds a test case for the tricky issue encountered in

  https://github.com/NixOS/nixpkgs/issues/213453
2023-06-30 02:36:13 -07:00
apfelkuchen6 a3cdf3186f
texlive.bin.core-big: fix luajittex on aarch64-linux (#240577) 2023-06-29 16:12:05 -04:00
Vincenzo Mantova f24380af53
tests.texlive.binaries: init (#239804) 2023-06-28 18:06:06 -04:00
nviets 725e8ab49c
cudaPackages: bump default cudaPackages_11_7 -> cudaPackages_11_8 (#238622)
* cudaPackages: bump default cudaPackages_11_7 -> cudaPackages_11_8

* Switched format of cudaPackages.backendStdenv

Co-authored-by: Samuel Ainsworth <skainsworth@gmail.com>

* Removed reference to gcc11Stdenv in cuda-samples

* corrected stdenv reference in cuda-samples

---------

Co-authored-by: nviets <nathan.viets@gmail.com>
Co-authored-by: Samuel Ainsworth <skainsworth@gmail.com>
2023-06-20 14:12:54 -04:00
Ivan Trubach ebd4619053 patch-shebangs: add a flag to update shebangs with store paths
This change adds a flag to update shebang paths that point to the Nix
store. This is particularly useful when a cross-compiled package uses
same script at compile-time and run-time, but the interpreter must be
changed since hostPlatform != buildPlatform.
2023-06-19 09:01:21 +03:00
Artturin 2879607431 tests.stdenv.hooks.reproducible-builds: fix mistake 2023-06-17 23:45:11 +03:00
Sandro 6b942b501e
Merge pull request #234235 from raphaelr/mknugetsource-support-subdirs
buildDotnetModule: fix `projectReferences = [ ... ]`
2023-06-14 20:12:03 +02:00
Dennis Gosnell dd9e4575ec
tests.haskell.incremental: change package used from turtle to temporary
With a recent hackage update, turtle stopped compiling on ghc94.  This
commit changes the tests.haskell.incremental test to use the temporary
package instead of turtle.
2023-05-30 09:06:42 +09:00
Raphael Robatsch 256c3a7a53 tests.dotnet: init with test for projectReferences
Add a test for buildDotnetModule's `projectReferences = [ ... ];`
feature, which is currently unused and therefore untested in nixpkgs.
2023-05-26 16:18:07 +02:00
Rebecca Turner b278ca2195
tests.haskell.incremental: init 2023-05-25 14:36:18 -07:00
Vincenzo Mantova d3b28b7fd9
texlive.combine: move repstopdf test to tests.texlive (#231742) 2023-05-14 11:05:22 -04:00
github-actions[bot] 2d07e76d1a
Merge staging-next into staging 2023-05-10 00:03:33 +00:00
Alyssa Ross 2023766e31
tests.stdenv.test-inputDerivation: init 2023-05-09 14:02:45 +00:00
John Ericson f4868c6c7d
Merge pull request #229754 from rrbutani/fix/cc-wrapper-extra-positional-args
Support `--` in `cc-wrapper`
2023-05-08 06:55:52 -04:00
Artturin 1d9f58c7a4 tests.cc-multilib: put error on separate line 2023-05-05 23:55:24 +03:00
Artturin c4a06db832 tests.rustCustomSysroot: remove unmaintained and broken by upstream test 2023-05-05 23:23:20 +03:00
Rahul Butani 40c914f1be
cc-wrapper-test: add tests for -- 2023-05-03 16:45:48 -05:00
Dmitry Kalinkin 5c27dc43d2
Merge pull request #206763 from xworld21/texlive-centralize-version
texlive: use version info from tlpdb instead of hardcoding
2023-04-30 21:46:53 -04:00
apfelkuchen06 f2644470f9 tests.texlive: also test xelatex in the opentype font test 2023-04-27 00:36:41 +02:00
Vincenzo Mantova c4b0534701 texlive: use version info from tlpdb instead of hardcoding 2023-04-22 20:22:39 +01:00
Alyssa Ross 887edae254
tests.makeBinaryWrapper: avoid same-triple cross
We shouldn't try compiling to aarch64-unknown-linux-gnu from
aarch64-unknown-linux-gnu, because that tends to confuse things and is
not representative of actual cross compilation usage.
2023-04-19 18:34:47 +00:00
Vladimír Čunát 87a8a597e6
Merge #223741: writeTextFile: chmod before checkPhase
...into staging
2023-04-04 08:57:05 +02:00
Bernardo Meurer f1f6ca8bcd
Merge pull request #209870 from amjoseph-nixpkgs/pr/stdenv/external-gcc-bootstrap 2023-04-03 08:19:03 -07:00
Adam Joseph 5f57c2e0f9 pkgs/test/stdenv/default.nix: add gcc-stageCompare
This commit adds a derivation `gcc-stageCompare` to
`pkgs/test/stdenv/default.nix`.

It is important to always build this derivation whenever building
`stdenv`!  Because we are using a Nix-driven bootstrap instead of
gcc's built-in `--enable-bootstrap`, the `gcc` derivation no longer
performs the post-self-compilation sanity check.  You must build
this derivation in order to perform that sanity check.

The major benefit of this new approach is that the sanity check
(which involves a third compilation of gcc) can be performed
*concurrently* with all packages that depend on `stdenv`, rather
than serially.  Since `stdenv` has very little derivation-level
parallelism it cannot take advantage of more than one or perhaps two
builders.  If you have three or more builders this commit will
reduce the time-to-rebuild-stdenv by around 20% (one of three gcc
rebuilds is removed from the critical path, and stdenv's build time
is dominated by roughly 3*gcc + 1*binutils + 1*bison-test-suite).

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2023-04-02 13:49:53 -07:00
Naïm Favier e6f19ea429
writeTextFile: chmod before checkPhase
Set the executable bit before running the check phase, so that the check
phase can run the script to test its behaviour.

This aligns with what `concatTextFile` is doing.

Also use explicit `if` statements so that we don't silently ignore
`chmod` failures.
2023-03-29 14:06:45 +02:00
github-actions[bot] 2394986204
Merge master into staging-next 2023-03-17 12:01:17 +00:00
Dmitry Kalinkin f6e067692d
Merge pull request #119362 from xworld21/texlive-combine-fix-buildenv
texlive.combine: split static $TEXMFDIST into a separate derivation
2023-03-17 02:34:17 -04:00
github-actions[bot] 60e9cbe0f9
Merge staging-next into staging 2023-03-14 12:02:08 +00:00
Martin Weinelt 6b67186fe9
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/crownstone-cloud/default.nix
- pkgs/development/python-modules/exrex/default.nix
- pkgs/development/python-modules/mkdocs-minify/default.nix
- pkgs/development/python-modules/myjwt/default.nix
- pkgs/development/tools/analysis/checkov/default.nix
2023-03-14 08:14:26 +01:00
Vincenzo Mantova 1f2ad5bcd4 tests.texlive: check that tlpdb.nix is the one generated from the upstream texlive.tlpdb.xz 2023-03-12 21:04:39 +00:00
github-actions[bot] 681b1c28a4
Merge staging-next into staging 2023-03-12 12:02:07 +00:00
Vladimír Čunát 1dd94ad62f
Merge branch 'master' into staging-next 2023-03-12 09:06:28 +01:00
apfelkuchen06 d4a78d5f09 texlive: add test for lualatex fonts 2023-03-08 23:37:01 +01:00
github-actions[bot] 4bfbd859a1
Merge staging-next into staging 2023-03-06 18:01:40 +00:00
Martin Weinelt bcf6c81a88 Merge remote-tracking branch 'origin/master' into staging-next 2023-03-06 16:55:14 +00:00
Someone Serge 5f4bdbe6c3
python3Packages.tensorflow: fix `GLIBCXX_3.4.30' not found
Make tensorflow (and a bunch of ther things) use CUDA-compatible
toolchain. Introduces cudaPackages.backendStdenv
2023-03-04 01:03:51 +02:00
Artturin a4e1cf6d13 tests.stdenv.outputs-no-out: update expectedMsg 2023-03-02 22:10:50 +01:00
Artturin 6e422a0fba tests.stdenv.outputs-no-out: cause less rebuilds
now gcc isn't built
2023-03-02 22:10:50 +01:00
github-actions[bot] 3cdd771820
Merge staging-next into staging 2023-02-23 18:01:49 +00:00
Alyssa Ross 52c286ee5b
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/development/libraries/pmdk/default.nix
2023-02-23 13:51:34 +00:00
Bernardo Meurer 42008a14a4
Merge pull request #217206 from Artturin/stdenvimprovements1 2023-02-23 12:07:47 +00:00
github-actions[bot] 82db2c5621
Merge staging-next into staging 2023-02-23 00:02:59 +00:00
github-actions[bot] 7f396edf16
Merge master into staging-next 2023-02-23 00:02:23 +00:00
Artturin f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
Artturin 425e4250db tests.stdenv.outputs-no-out: fix 2023-02-22 21:23:04 +02:00
Connor Baker c181273423 cudaPackages_12: 12.0.0 -> 12.0.1 2023-02-22 13:19:49 -05:00
github-actions[bot] 67e4f6dde0
Merge staging-next into staging 2023-02-22 12:02:05 +00:00
github-actions[bot] 0f910f5664
Merge master into staging-next 2023-02-22 12:01:31 +00:00
Connor Baker 266379497d cuda-samples: init 11.8 2023-02-22 10:06:03 +01:00
Artturin 883daacbaa tests.stdenv: add hooks.patch-shebangs.split-string & tweak tests 2023-02-17 22:23:35 +02:00
Artturin 8876a5c91f tests.stdenv: move patch-shebangs test 2023-02-17 22:23:33 +02:00
Vincenzo Mantova a000076d58 texlive.combine: split static $TEXMFDIST into a separate derivation 2023-02-05 19:47:07 +00:00
Artturi dcc7df7fe6
Merge pull request #211685 from Artturin/splicingstuff1-split 2023-02-03 12:49:08 +02:00
github-actions[bot] 645af55243
Merge staging-next into staging 2023-01-30 12:01:57 +00:00
github-actions[bot] 1a06f52c21
Merge master into staging-next 2023-01-30 12:01:22 +00:00
Robert Hensing 3be7ea8c89 top-level/pkg-config: Make tests easy to find 2023-01-29 09:51:55 +01:00
Robert Hensing a010129bf8 pkg-configPackages -> defaultPkgConfigPackages
This better reflects the purpose of the package set, while leaving
room for a fancier, more complete implementation of the concept,
with a nicer name.
2023-01-29 09:51:55 +01:00
Robert Hensing 2d4e78fb8b tests.pkg-configPackages: Copy meta attributes for licensing concerns 2023-01-29 09:51:54 +01:00
Robert Hensing 04b06e83dc tests.pkg-configPackages: Filter out broken packages
Some packages are only marked broken on specific platforms, so we
filter those out as well.

Consequently, this might not raise an error if the attribute value
needs to point to a different pkgs attribute, but this is not something
we can detect. For now, we'll have to rely on users of such pkg-config
packages to report that kind of error.

There's really not much we can do about this here.
2023-01-29 09:51:54 +01:00
Robert Hensing e93cfb250b tests.pkg-configPackages: Filter out unsupported packages 2023-01-29 09:51:54 +01:00
Robert Hensing 7790eafbdc pkg-configPackages: init 2023-01-29 09:51:54 +01:00
Artturin a0f4e8746d tests.overriding: add repeatedOverrides-pname, repeatedOverrides-entangled-pname
from https://github.com/NixOS/nixpkgs/pull/201734#pullrequestreview-1185972282
2023-01-28 12:10:47 +02:00
Artturi e42cdd2383
Merge pull request #212286 from Artturin/runonall
make-symlinks-relative: run on all outputs
2023-01-25 15:51:53 +02:00
Artturin cfb543a532 make-symlinks-relative: run on all outputs 2023-01-23 20:11:41 +02:00
Sergei Trofimovich b9b1d958d0 Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
	pkgs/development/libraries/qt-6/modules/qtbase.nix
	pkgs/stdenv/linux/make-bootstrap-tools.nix
2023-01-20 21:56:57 +00:00
Artturin 9c0ac5691c tests.overriding: init
only outputs the first failing test atm
2023-01-20 19:20:03 +02:00
Artturin 44425dc5ab tests.kernel-config: remove test that wasn't being run
it doesn't seem necessary anymore
2023-01-17 20:01:58 +02:00
Artturin ad10ad9519 tests.kernel-config: fix
error: The option `settings.NIXOS_TEST_BOOLEAN.tristate' has conflicting definition values:
- In `structuredExtraConfig': "n"
- In `structuredExtraConfig': "y"

since https://github.com/NixOS/nixpkgs/pull/90065
yes does not silently win over no
2023-01-17 19:56:13 +02:00
Robert Hensing 01d7f19346 multi-outputs.sh: Improve _assignFirst error message
Closes #16182

This improves the error message

    Error: _assignFirst found no valid variant!

which occurred when the set of outputs was not sufficient to set
the various outputDev, outputBin, etc variables. Specifically, this
would mean that "out" is not among the outputs, which is valid for
a derivation.

This changes the message to something like

    error: _assignFirst: could not find a non-empty variable to assign to outputDev. The following variables were all unset or empty: dev out.
          If you did not define an "out" output, make sure to define all the specific required outputs: define an output for one of the unset variables.

While this isn't a full explanation of what stdenv can and can not do,
I think it's vast improvement over the 0 bits of information that it
used to provide. This at least gives a clue as to what's going on, and
even suggests a fix, although probably multiple such fixes are required
in an instance where someone starts with a no-out derivation from scratch
(and decide to persist).
2023-01-16 12:57:01 +01:00
Martin Weinelt c1e6c6af69 Merge remote-tracking branch 'origin/master' into staging-next 2023-01-11 03:51:33 +01:00
Artturin 2eeb34c273 treewide: {build,host,target}Platform -> stdenv.{build,host,target}Platform 2023-01-09 21:13:22 +02:00