Commit graph

7769 commits

Author SHA1 Message Date
annalee 7541ec60b6
Merge remote-tracking branch 'upstream/master' into staging-next 2024-03-25 18:04:41 +00:00
a-n-n-a-l-e-e 3115d3209d
Merge pull request #286360 from hellwolf/fix-fhsenv-bubblewrap-etc-paths
build-fhsenv-bubblewrap: fix fhsenv etc entries
2024-03-25 10:38:07 -07:00
github-actions[bot] f0ed26755a
Merge staging-next into staging 2024-03-24 00:02:41 +00:00
Pol Dellaiera 6522a75f90
Merge pull request #298239 from cdepillabout/layered-img-passthru
dockerTools: add streamed image as passthru to buildLayeredImage
2024-03-23 22:13:18 +01:00
Dennis Gosnell 2e91dc65e4 dockerTools: add streamed image as passthru to buildLayeredImage
This is convenient for debugging the underlying streamed image used by
`dockerTools.buildLayeredImage`.

Here's an example of how you might use this:

```console
$ nix repl ./.
nix-repl> dockerTools.examples.nginx.passthru.stream
«derivation /nix/store/9zczmlp2kraszx4ssmh6fawnlnsa5a4n-stream-nginx-container.drv»
```
2024-03-23 10:33:22 +09:00
github-actions[bot] 64852c04d3
Merge staging-next into staging 2024-03-22 18:01:31 +00:00
Maximilian Bosch b5e22438aa
Merge pull request #297758 from diogotcorreia/fetchnextcloudapp-hash
fetchNextcloudApp: support passing hash to fetchzip
2024-03-22 17:28:37 +00:00
Domen Kožar fb884172ab
Merge pull request #297628 from cwp/python-env-venv
Fix venv creation in Python environments
2024-03-22 19:17:13 +07:00
Colin Putney 234bb31f61
Fix venv creation in Python environments
The way we build python environments is subtly broken. A python
environment should be semantically identical to a vanilla Python
installation in, say, /usr/local. The current implementation, however,
differs in two important ways. The first is that it's impossible to use
python packages from the environment in python virtual environments. The
second is that the nix-generated environment appears to be a venv, but
it's not.

This commit changes the way python environments are built:

  * When generating wrappers for python executables, we inherit argv[0]
    from the wrapper. This causes python to initialize its configuration
    in the environment with all the correct paths.
  * We remove the sitecustomize.py file from the base python package.
    This file was used tweak the python configuration after it was
    incorrectly initialized. That's no longer necessary.

The end result is that python environments no longer appear to be venvs,
and behave more like a vanilla python installation. In addition it's
possible to create a venv using an environment and use packages from
both the environment and the venv.
2024-03-21 19:26:57 -06:00
github-actions[bot] d28bcc2044
Merge staging-next into staging 2024-03-21 18:01:42 +00:00
Diogo Correia 24e9d55af6
fetchNextcloudApp: support passing hash to fetchzip 2024-03-21 16:24:29 +00:00
linsui 1ed37ac9f3 fetchgit: set http.proxy globally for submodules
git config in the repo doesn't work for submodules
2024-03-21 19:14:00 +08:00
Philip Taron efb603b277 Avoid top-level with ...; in pkgs/build-support/writers/test.nix 2024-03-19 22:31:19 +01:00
Philip Taron c4d420345d Avoid top-level with ...; in pkgs/build-support/coq/extra-lib.nix 2024-03-19 22:31:19 +01:00
Philip Taron 102a33d30e Avoid top-level with ...; in pkgs/build-support/vm/test.nix 2024-03-19 22:31:19 +01:00
Philip Taron f36441dbd8 Avoid top-level with ...; in pkgs/build-support/release/default.nix 2024-03-19 22:31:19 +01:00
Philip Taron 7c4a71081c Avoid top-level with ...; in pkgs/build-support/replace-dependency.nix 2024-03-19 22:31:19 +01:00
Philip Taron b7bcfbaeeb Avoid top-level with ...; in pkgs/build-support/pkg-config-wrapper/default.nix 2024-03-19 22:31:19 +01:00
Philip Taron 997e54a4fb Avoid top-level with ...; in pkgs/build-support/nix-gitignore/default.nix
We also renamed `filter` (as a name of a parameter) to `predicate` following the naming suggestion in code review. It's better!

Since it's not part of an attrset, the name can change with no impact to semantics, since it can't be observed with `builtins.functionArgs`.

```
$ nix-repl
Nix 2.21.0
Type :? for help.
nix-repl> f = x: y: z: (x + y + z)

nix-repl> builtins.functionArgs f
{ }

nix-repl> :doc builtins.functionArgs
Synopsis: builtins.functionArgs f

    Return a set containing the names of the formal arguments expected by the function f. The value of each attribute is a Boolean denoting whether the corresponding argument has a default value. For instance, functionArgs ({ x, y ?
    123}: ...) = { x = false; y = true; }.

    "Formal argument" here refers to the attributes pattern-matched by the function. Plain lambdas are not included, e.g. functionArgs (x: ...) = { }.
```
2024-03-19 22:31:19 +01:00
Philip Taron 869e556606 Avoid top-level with ...; in pkgs/build-support/fetchsourcehut/default.nix 2024-03-19 22:31:19 +01:00
Philip Taron aa32ce526a Avoid top-level with ...; in pkgs/build-support/fetchrepoproject/default.nix 2024-03-19 22:31:19 +01:00
Philip Taron 4fc5d50549 Avoid top-level with ...; in pkgs/build-support/coq/meta-fetch/default.nix 2024-03-19 22:31:19 +01:00
Philip Taron 03962f077c Avoid top-level with ...; in pkgs/build-support/coq/default.nix 2024-03-19 22:31:19 +01:00
Philip Taron a14127aa64 Avoid top-level with ...; in pkgs/build-support/build-fhsenv-bubblewrap/default.nix 2024-03-19 22:31:19 +01:00
Philip Taron e0611b7ba7 Avoid top-level with ...; in pkgs/build-support/bintools-wrapper/default.nix 2024-03-19 22:31:19 +01:00
Philip Taron 8c4a1e8d66 Avoid top-level with ...; in pkgs/build-support/agda/default.nix 2024-03-19 22:31:19 +01:00
github-actions[bot] c293380058
Merge staging-next into staging 2024-03-19 12:01:49 +00:00
github-actions[bot] 0b369088d7
Merge master into staging-next 2024-03-19 12:01:19 +00:00
Someone 63709965b7
Merge pull request #178717 from ShamrockLee/write-multiple-references
trivial-builders: replace writeReferencesToFile with writeClosure
2024-03-19 08:57:20 +00:00
github-actions[bot] 66eeab8faf
Merge staging-next into staging 2024-03-19 06:01:43 +00:00
github-actions[bot] 8ee0e6664b
Merge master into staging-next 2024-03-19 06:01:12 +00:00
Pol Dellaiera 186c3e34a7
Merge pull request #296549 from TomaSajt/strip-java-archives-hook
add stripJavaArchivesHook and use treewide
2024-03-19 05:41:08 +01:00
Martin Weinelt 3321e63b12
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/sphinx-autobuild/default.nix
2024-03-19 04:00:32 +01:00
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00
Yueh-Shun Li 112c3d5ecd ociTools.buildContainer: writeReferencesToFile -> writeClosure 2024-03-19 05:30:54 +08:00
Yueh-Shun Li 67ec1a7d7b dockerTools.buildImage: writeReferencesToFile -> writeClosure 2024-03-19 05:30:54 +08:00
Yueh-Shun Li 5c1a3b619d singularity-tools.buildImages: use writeClosure 2024-03-19 05:30:54 +08:00
Yueh-Shun Li e28ad1a0a3 referenceByPopularity: rename in comment writeReferencesToFile -> writeClosure 2024-03-19 05:30:53 +08:00
Yueh-Shun Li 8a8d07bc15 tests.trivial-builders.references: test writeClosure
Test writeClosure instead of writeReferencesToFile.

Add multiple-path test for writeReferenceClosureToFile.

Rename variables:
- references -> closures (passthru affected)
- REFERENCES -> CLOSURES
2024-03-19 05:30:42 +08:00
Yueh-Shun Li e9fd4389d2 writeClosure: init, replacing writeReferencesToFile
Replace writeReferencesToFile with writeClosure.

Make writeClosure accept a list of paths instead of a path.

Re-implement with JSON-based exportReferencesGraph interface provided by
__structuredAttrs = true.

Reword the documentation.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Someone Serge <sergei.kozlukov@aalto.fi>
2024-03-19 02:45:50 +08:00
Guillaume Maudoux fb1539a8c8
Merge pull request #295099 from Qyriad/maint/autopatchelf-single-line
autoPatchelfHook: move multiline hook into a function
2024-03-18 10:17:37 +01:00
Qyriad 2ad2295bb3 autoPatchelfHook: move multiline hook into a function
In NixOS/nixpkgs#290081 it came to attention that autoPatchelfHook is
one of if not the only hook in Nixpkgs that is a multiline string
expression. Almost all hooks are functions, which guard with something
like `if [ -z "${dontDoTheThing-}" ]; then ...` in the function, or
single-line strings which include that guard inline and then call the
real function, e.g. `if [ -z "${dontDoTheThing-} ]; then doTheThing; fi`.

This commit moves autoPatchelfHook to the former, which seems to be the
most common style now.
2024-03-17 09:48:43 -06:00
TomaSajt 48285f7169
stripJavaArchivesHook: rename from canonicalize-jars-hook and use strip-nondeterminism 2024-03-17 13:30:54 +01:00
github-actions[bot] 83409a8a66
Merge staging-next into staging 2024-03-17 12:02:22 +00:00
annalee 8ead81a60f
Merge remote-tracking branch 'upstream/master' into staging-next 2024-03-17 07:18:11 +00:00
a-n-n-a-l-e-e 8c421f78b2
Merge pull request #296082 from a-n-n-a-l-e-e/dont-pass-march-swift
swift: don't pass -march to swiftc
2024-03-16 19:18:41 -07:00
annalee 8a7841ceef
swift: don't pass -march to swiftc
swiftc uses cc-wrapper which sets the -march flag on some systems which
breaks the build. This change adds a flag, disableMarch, to cc-wrapper
which disables using the -march flag.
https://github.com/NixOS/nixpkgs/issues/295322
2024-03-16 11:02:44 +00:00
github-actions[bot] 8e730f6e02
Merge staging-next into staging 2024-03-16 06:01:22 +00:00
github-actions[bot] 5fb2bcd3dd
Merge master into staging-next 2024-03-16 06:00:56 +00:00
Emily Trau 8bb29a3881
Merge pull request #295954 from bjornfor/revert-avrlibc-revdeps-breakage
Revert "avrlibc: hook up libdir for cc-wrapper"
2024-03-16 14:34:01 +11:00