Commit graph

3918 commits

Author SHA1 Message Date
Linus Heckemann efc739f1d2
Merge pull request #92081 from CrystalGamma/modules-closure
makeModulesClosure: handle builtin modules better
2020-08-13 22:37:36 +02:00
Frederik Rietdijk f707715136 Merge master into staging-next 2020-08-11 10:26:35 +02:00
zowoq 1439eaf07b buildRustCrate: editorconfig fixes 2020-08-09 17:47:12 +10:00
John Ericson b5f7ed6846
Merge pull request #91293 from Ericson2314/cxx-wrapper-debt-part-2
treewide: Get rid of `cc.gcc`
2020-08-02 20:42:20 -04:00
John Ericson 92f96f47b0 treewide: Get rid of cc.gcc
Instead, we have a new `gccForLibs`, which has the appropriate
definition for e.g. avoiding `x86_32` linking problems.
2020-08-02 17:12:05 +00:00
Frederik Rietdijk 50c060d13d Merge master into staging-next 2020-08-01 19:37:20 +02:00
Johan Thomsen f5db415e2f nixos/tests/dockerTools: add test for running non-root containers with buildLayeredImage
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2020-07-31 10:14:07 +02:00
Johan Thomsen 9f86685cc7 dockerTools: fix permissions on /nix/store 2020-07-30 16:20:50 +02:00
Vladimír Čunát 60d89e5793
Merge branch 'master' into staging 2020-07-29 18:40:28 +02:00
John Ericson cd719c1eae
Merge pull request #91974 from Mic92/nostdinc
stdenv: make -nostdinc work as intended
2020-07-28 19:49:42 -04:00
Jan Tojnar d489409aaa
Merge pull request #85976 from jtojnar/wrap-gapps-hook-tests 2020-07-26 13:55:35 +02:00
Vladimír Čunát 2b7c0dcdaa
Merge branch 'staging-next'
Rebuild on Hydra seems OK-ish.
mongodb.nix needed some conflict resolution (scons versions);
all four versions seem to build fine.
2020-07-25 16:18:40 +02:00
Adrian a6133b7a39
writers.makeScriptWriter: fix on Darwin\MacOS (#93757)
* writers.makeScriptWriter: fix on Darwin\MacOS

On Darwin a script cannot be used as an interpreter in a shebang line, which
causes scripts produced with makeScriptWriter (and its derivatives) to fail at
run time if the used interpreter was wrapped with makeWrapper (as in the case
of python3.withPackages).

This commit fixes the problem by detecting if the interpreter is a script
and prepending its shebang to the final interpreter line.

For example if used interpreter is;
```
/nix/store/ynwv137n2650qy39swcflxbcygk5jwv1-python3-3.8.3-env/bin/python
```

which is a script with following shebang:
```
#! /nix/store/knd85yc7iwli8344ghav3zli8d9gril0-bash-4.4-p23/bin/bash -e
```

then the shebang line in the produced script will be
```
#! /nix/store/knd85yc7iwli8344ghav3zli8d9gril0-bash-4.4-p23/bin/bash -e /nix/store/ynwv137n2650qy39swcflxbcygk5jwv1-python3-3.8.3-env/bin/python
```

This works on Darwin since there does not seem to be a limit to the length
of the shabang line and the shebang lines support multiple arguments to
the interpreters (as opposed to linux where the kernel imposes a strict limit
on shebang lengh and everything following the interpreter is passed to it
as a single string).

fixes; #93609
related to: #65351 #11133 (and probably a bunch of others)

NOTE: scripts produced on platforms other than Darwin will remain unmodified
by this PR. However it might worth considering extending this fix to BSD systems
in general. I didn't do it since I have no way of testing it on systems other
than MacOS and linux.

* writers.makeScriptWriter: fix typo in comment

* writers.makeScriptWriter: fail build if interpreter of interpreter is a script
2020-07-25 11:47:20 +02:00
Lassulus a2ba53f4e1
Merge pull request #93758 from adrian-gierakowski/improve-writers.writePython
writers.writePython2 and writePython3: use "bare" python if no deps are needed
2020-07-25 11:43:56 +02:00
Jörg Thalheim 0216dbd769
Merge pull request #93165 from jbedo/singularity
singularity: 3.2.1 -> 3.6.1
2020-07-24 16:57:59 +01:00
Adrian Gierakowski 76437a88bb writers.writePython2 and writePython3: use "bare" python if no deps are needed
`python.withPackages` has a runtime dependecy on bash since it's wrapped with
`makeWrapper`. This fix avoids bash as runtime dependency when it's not
needed.

as discussed here: https://github.com/NixOS/nixpkgs/issues/93609#issuecomment-662880047
2020-07-24 11:39:01 +01:00
adisbladis e890823467
emacs: Add native builds for nativeComp enabled emacsen 2020-07-24 03:16:17 +02:00
Jan Tojnar 0be3b18d3e
wrapGAppsHook: add comments 2020-07-24 00:36:12 +02:00
Jan Tojnar 49b89afcc2
wrapGAppsHook: add tests 2020-07-24 00:36:04 +02:00
Jan Tojnar 69b89979ba
wrapGAppsHook: move to a separate file 2020-07-23 22:08:18 +02:00
Jörg Thalheim 96092dc936
stdenv: make -nostdinc work as intended
Right now we add glibc to search path also -nostdinc was provided,
which breaks projects providing their own gcc.
2020-07-23 08:39:46 +01:00
Frederik Rietdijk df0eab2726 Merge staging-next into staging 2020-07-22 16:50:25 +02:00
Daniël de Kok 68bd1c8552 blas: do not report an empty line for every checked symbol 2020-07-22 10:24:50 +02:00
Vladimír Čunát 7a5c6fee0f
Merge branch 'master' into staging-next
Some rebuilds, e.g. all of haskell.
Hydra nixpkgs: ?compare=1601713
2020-07-22 08:37:19 +02:00
Justin Bedo 712f1ee9aa
singularity: 3.2.1 -> 3.6.1 2020-07-22 08:51:37 +10:00
Ryan Mulligan b78ffda2b5
Merge pull request #93398 from IvarWithoutBones/appimage-run-fix
appimage: switch to gst-plugins-base 1.0
2020-07-21 08:12:13 -07:00
Vladimír Čunát 4244b73917
Merge branch 'master' into staging 2020-07-18 17:50:23 +02:00
IvarWithoutBones 0269421b7b appimage: switch to gst-plugins-base 1.0 2020-07-18 11:51:05 +02:00
zowoq 0f19b9ba72
Revert "Group packages by language/builder via dummy maintainer" 2020-07-18 17:45:08 +10:00
Luke Granger-Brown d7d4a92695 buildBazelPackage: add "fetchConfigured" for fetching only things required for the build
"bazel fetch" will, by default, fetch everything that _might_ be used,
including things that will later be discarded due to the way the build
is configured.

Concretely, this means that for some builds of Java packages, this will
avoid failures where the builder tries to retrieve the JDK from /usr/share/java
(or equivalent).

This also means that for most packages we can fetch _fewer_ dependencies,
since the standard tree pruning for artifacts to fetch will take effect.

fetchConfigured is disabled by default since it changes the fetch hashes
of tensorflow/tensorflow2 (since it ends up fetching less).
2020-07-17 18:29:58 +02:00
zowoq 2613e6d0e7 buildRustPackage: add nixpkgs-rust maintainer 2020-07-17 11:16:54 +10:00
CrystalGamma b155b1dafb makeModulesClosure: handle builtin modules better
The previous code discarded entire dependency trees if the first entry in the dependency list compiled by `modprobe --show-depends` is a builtin and otherwise handled its output in a rather hackish way.
2020-07-16 20:44:07 +02:00
Robert Hensing c1908bf802
Merge pull request #92934 from hercules-ci/dockerTools-set-imageTag
dockerTools: Always set imageTag attribute
2020-07-16 17:05:58 +02:00
Maximilian Bosch d2694d936e
rustPlatform: don't install artifacts modified by checkPhase
While the artifacts from `buildPhase` should be used for testing as
well, it should be avoided that those are modified during `checkPhase`.

This can happen if a package is built e.g. with special
`cargoBuildFlags` that don't apply to the `checkPhase`. In that case, a
binary would be installed into `$out` without those flags since
`checkPhase` overrides the binary in the `target`-directory.

This patch copies the state of `target/release` into a temporary
location at the end of the `buildPhase` and installs the results from
that temporary directory into `$out` while `checkPhase` can continue
using the configured build-dir.

cc #91689
Closes #93119
Closes #91191
2020-07-15 20:08:30 +02:00
Maximilian Bosch 7713fba8f8
Revert "buildRustPackage: fix cargoBuildFlags"
This reverts commit deb78151a9.

Mixing up two distinct phases of a derivation's build is not a good idea. See
also https://github.com/NixOS/nixpkgs/pull/91689#issuecomment-657813954.
2020-07-14 17:39:09 +02:00
Robert Hensing 8c0459f611 dockerTools: Always set imageTag attribute
The image tag can be specified or generated from the output hash.
Previously, a generated tag could be recovered from the evaluated
image with some string operations.

However, with the introduction of streamLayeredImage, it's not
feasible to compute the generated tag yourself.

With this change, the imageTag attribute is set unconditionally,
for the buildImage, buildLayeredImage, streamLayeredImage functions.
2020-07-11 16:58:25 +02:00
Frederik Rietdijk ae8eee9c3f Merge master into staging-next 2020-07-11 08:59:54 +02:00
Jos van Bakel 66737168a4
dockerTools.buildLayeredImage: fix created=now 2020-07-09 09:34:18 +02:00
Matthew Bauer 669eb09bd5
Merge branch 'master' into fetchurl-no-hash 2020-07-06 14:40:49 -04:00
Utku Demir 06db331922
dockerTools: Verify nix-store contents on buildLayeredImage test 2020-07-06 16:59:58 +12:00
Utku Demir 2ae2186dfd
dockerTools.streamLayeredImage: Correctly copy hardlinks 2020-07-06 16:42:03 +12:00
Utku Demir cc46362929
dockerTools: Support files directly under /nix/store
Also makes sure that the files inside a layer added in a sorted order
to make the results more deterministic.
2020-07-04 22:00:57 +12:00
Flakebi deb78151a9 buildRustPackage: fix cargoBuildFlags
When features were supplied in cargoBuildFlags, the binaries were built
with these features enabled. Unless checking was disabled, `cargo test`
was executed without these build flags, meaning the binaries were
rebuilt and overwritten without the specified features.

Fix this bug by running tests after the installation phase.
2020-07-03 08:53:57 +10:00
Vladimír Čunát 9dcb508f2d
Merge #92089: {cc,bintools}-wrapper: Some fixes 2020-07-02 23:23:04 +02:00
Frederik Rietdijk c33ca7c5ce Merge staging-next into staging 2020-07-02 17:14:53 +02:00
Vincent Laporte 885fb1406d ocamlPackages.buildOasis: fix handling of installation prefix 2020-07-02 07:13:34 +02:00
John Ericson 704daf7a6e {bintools,cc}-wrapper: Ensure nix-support/*-flags files exist
This will unbreak firefox and a few other packages which try to grab
some of the libcxx flags.
2020-06-30 18:26:37 +00:00
John Ericson 1085403acd {cc,bintools}-wrapper: Comments no longer spliced
This means we can freely keep the comments up to date without the
penalty of a mass rebuild.
2020-06-30 15:04:10 +00:00
Alyssa Ross 1421404d42 stdenv: fix backward multiple outputs conditional
This is supposed to shareDocName to a fallback value if it can't be
determined from looking at the configure script.  But the conditional
checked whether shareDocName was set, rather than if it wasn't.  This
meant that if shareDocName had been detected from a configure script,
it would be immediately overridden by the package name, and if it
couldn't be detected, shareDocName would remain unset.

This resulted in QEMU installing files like $out/share/doc/index.html,
which should of course have been in $out/share/doc/qemu/index.html.

An interesting side effect of this is that, since
9f8751528c when this code was added, the
detected package name has never actually been used for installing
documentation, because it would always be overridden.  So this patch
will actually enable that for the first time, four years later.

Fixes: https://github.com/NixOS/nixpkgs/issues/90486
2020-06-29 13:56:27 +00:00
John Ericson fa54dd346f
Merge pull request #85189 from Ericson2314/cxx-wrapper-debt
C++ compilers: Be sane with standard libraries
2020-06-22 10:38:34 -04:00