Commit Graph

7843 Commits

Author SHA1 Message Date
Ryan Lahfa
a199cd1dbd
Merge pull request #297496 from abryko/docker-tag-discard-closure
dockerTools: discard closure reference in imageTag
2024-03-27 09:29:53 -07:00
github-actions[bot]
26128332c3
Merge master into staging-next 2024-03-27 06:01:26 +00:00
Will Fancher
6504cbb171
Merge pull request #288212 from r-ryantm/auto-update/makeInitrdNGTool
makeInitrdNGTool: 0.1.0 -> 0.1.0
2024-03-27 00:43:03 -04:00
Yueh-Shun Li
c9da94beff buildGoModule: Deprecate vendorSha256 with throw
Ignore vendorSha256 when vendorHash is specified.

Throw when vendorHash isn't specified:
- "buildGoModule: Expect vendorHash instead of vendorSha256" when
  vendorSha256 is specified.
- "buildGoModule: vendorHash is missing" otherwise.

`goModules.outputHashAlgo` is specified as null when vendorHash is not
empty, "sha256" otherwise.

Co-authored-by: zowoq <59103226+zowoq@users.noreply.github.com>
2024-03-27 11:19:40 +08:00
github-actions[bot]
39a71cf239
Merge master into haskell-updates 2024-03-26 00:12:22 +00:00
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]
31a14cb69e
Merge master into haskell-updates 2024-03-24 00:14:19 +00: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]
39632d3d4c
Merge master into haskell-updates 2024-03-23 00:12:18 +00: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
sternenseemann
b4d48b0f9e Merge branch master into haskell-updates 2024-03-21 21:01:05 +01: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
Vladimír Čunát
f373ad52f1
Merge master into haskell-updates 2024-03-21 09:21:50 +01:00
Xavier Maillard
bc40f51d1a
dockerTools: discard closure reference in imageTag 2024-03-20 17:54:09 +01:00
adisbladis
085c172348 build-support/lib/meson: Statically compute default meson flags 2024-03-20 16:35:31 +13:00
adisbladis
5ef1bd952c build-support/lib/cmake: Statically compute default cmake flags 2024-03-20 16:35:31 +13:00
github-actions[bot]
05f9a72c0e
Merge master into haskell-updates 2024-03-20 00:12:21 +00: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
ibbem
b9343ad4c6 agda: Don't be too picky about everythingFile
The `-path` test of `find` does string comparison, not path comparison.
Hence, the format of `everythingFile` needed to be very specific. Now,
it can be denormalized (e.g. it can contain `/./`) and an error is
emitted if the everything file or its interface file can't be removed.
2024-03-18 23:11:20 +01:00
ibbem
1642654453 agda: Remove the --local-interfaces flag
Upstream now provides a library file for the builtin library and ensured
that the existing interface files will be used regardless of whether
--local-interfaces is in effect. Hence, Agda will not try to write to
the Nix store anymore except if the build flags are changed.
2024-03-18 23:10:27 +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
annalee
636ed70ab3
Merge remote-tracking branch 'upstream/staging-next' into staging 2024-03-16 00:07:22 +00:00
github-actions[bot]
00729a3d21
Merge master into staging-next 2024-03-15 18:01:19 +00:00
lassulus
6fd3c2ebcf
Merge pull request #295982 from philiptaron/remove-lib-or-usages
Avoid `lib.or` in `pkgs/build-support/writers/`
2024-03-15 20:23:18 +07:00
github-actions[bot]
241984a941
Merge staging-next into staging 2024-03-15 00:02:27 +00:00
github-actions[bot]
2bffd64e73
Merge master into staging-next 2024-03-15 00:01:59 +00:00
Philip Taron
dc59ca2bd9
Avoid lib.or in pkgs/build-support/writers/ 2024-03-14 14:11:11 -07:00
Pol Dellaiera
8c40e060f3
build-support/php: update warnings when composer validate fails 2024-03-14 21:52:08 +01:00
Bjørn Forsman
6ff5b79096 Revert "avrlibc: hook up libdir for cc-wrapper"
This reverts commit b2844f89d1.

It broke simavr:

  $ nix-build -A simavr
  [...]
  /nix/store/3k4djrsq23m2yg9ar4h1lkkz1ijv0ghv-avr-binutils-2.41/bin/avr-ld: /nix/store/3rpyzla18mbj690hv7j5dang0kd3c1fq-avr-libc-avr-2.1.0/avr/lib/libc.a(vfprintf_std.o): in function `.L15':
  vfprintf.c:(.text.avr-libc+0xd8): undefined reference to `__mulqi3'
  /nix/store/3k4djrsq23m2yg9ar4h1lkkz1ijv0ghv-avr-binutils-2.41/bin/avr-ld: /nix/store/3rpyzla18mbj690hv7j5dang0kd3c1fq-avr-libc-avr-2.1.0/avr/lib/libc.a(vfprintf_std.o): in function `.L18':
  vfprintf.c:(.text.avr-libc+0xe4): undefined reference to `__mulqi3'
  collect2: error: ld returned 1 exit status
  make[1]: *** [../Makefile.common:161: atmega644_adc_test.axf] Error 1
  make[1]: Leaving directory '/build/source/tests'
  make: *** [Makefile:21: build-tests] Error 2

Fixes #295610.
2024-03-14 20:09:11 +01:00
github-actions[bot]
9f5148f1e0
Merge staging-next into staging 2024-03-14 18:01:54 +00:00
github-actions[bot]
c160165e60
Merge master into staging-next 2024-03-14 18:01:26 +00:00
Silvan Mosberger
f60515ddea
Merge pull request #293416 from DanielSidhion/remove-makesnap
snapTools: remove
2024-03-14 16:46:22 +01:00
Lily Foster
ae86a507ed npmHooks.npmInstallHook: ignore bundle deps when calculating files to install
This assumes that downstream users of `buildNpmPackage` would rather our
own built `node_modules` be copied to the output rather than only the
`bundleDependencies` specified in the `package.json` file.

Having the latter behavior seems unexpected and unintuitive, and would
not work as installing from an `npm pack` is intended to (since doing
that would not do a `rebuild` step on those dependencies and it would
skip reifying a full dependency tree).
2024-03-14 14:04:51 +01:00
Robert Hensing
09364e249d
Merge pull request #295378 from hercules-ci/makeDerivationArgument
make-derivation.nix: Factor out `makeDerivationArgument`
2024-03-14 13:01:35 +01:00
Ulysses Zhan
acaf847d4f nuget-to-nix: fix the bug of wrong url in the generated nix file when the package base address of the nuget source does not have a trailing slash 2024-03-14 00:29:50 -07:00
lassulus
7154ccbbd5
Merge pull request #293420 from DavHau/writers-wrap
writers: add support for wrapping
2024-03-14 01:14:31 +07:00
Yueh-Shun Li
5010678492 checkpointBuildTools.prepareCheckpointBuild: stop at install
Switch off phases following installPhase, including fixupPhase,
installCheckPhase, distPhase and postPhases.
2024-03-13 20:11:31 +08:00
Robert Hensing
8dad51a2e2 make-derivation.nix: Split makeDerivationArgument, mkDerivation with duplicate functionality 2024-03-12 18:16:56 +01:00
Philip Taron
e27bcfed1c
Avoid top-level with in pkgs/build-support/cc-wrapper/default.nix (#295213) 2024-03-12 08:34:58 +01:00
github-actions[bot]
0917422ffe
Merge staging-next into staging 2024-03-12 06:01:24 +00:00
Silvan Mosberger
1d14cc5182
Merge pull request #294944 from hercules-ci/docs-dedup-trivial-builders
trivial-builders: Deduplicate docs
2024-03-12 02:16:01 +01:00
Silvan Mosberger
aabd5fbfcf
Merge pull request #292259 from dawidd6/docker-nix-ssl
dockerTools: set NIX_SSL_CERT_FILE in image
2024-03-12 02:01:08 +01:00
a-n-n-a-l-e-e
ce789e7e35
llvmPackages_{12,13,14,15,16,17,git}.{libcxx,libcxxabi}: merge libcxxabi into libcxx (#292043)
- merge libcxxabi into libcxx for LLVM 12, 13, 14, 15, 16, 17, and git.
- remove the link time workaround `-lc++ -lc++abi` from 58 packages as it is no longer required.
- fixes https://github.com/NixOS/nixpkgs/issues/166205
- provides alternative fixes for. https://github.com/NixOS/nixpkgs/issues/269548 https://github.com/NixOS/nix/issues/9640
- pkgsCross.x86_64-freebsd builds work again

This change can be represented in 3 stages
1. merge libcxxabi into libcxx -- files: pkgs/development/compilers/llvm/[12, git]/{libcxx, libcxxabi}
2. update stdenv to account for merge -- files: stdenv.{adapters, cc.wrapper, darwin}
3. remove all references to libcxxabi outside of llvm (about 58 packages modified)

### merging libcxxabi into libcxx
- take the union of the libcxxabi and libcxx cmake flags
- eliminate the libcxx-headers-only package - it was only needed to break libcxx <-> libcxxabi circular dependency
- libcxx.cxxabi is removed. external cxxabi (freebsd) will symlink headers / libs into libcxx.
- darwin will re-export the libcxxabi symbols into libcxx so linking `-lc++` is sufficient.
- linux/freebsd `libc++.so` is a linker script `LINK(libc++.so.1, -lc++abi)` making `-lc++` sufficient.
- libcxx/default.nix [12, 17] are identical except for patches and `LIBCXX_ADDITIONAL_LIBRARIES` (only used in 16+)
- git/libcxx/defaul.nix  does not link with -nostdlib when useLLVM is true so flag is removed. this is not much different than before as libcxxabi used -nostdlib where libcxx did not, so libc was linked in anyway.

### stdenv changes
- darwin bootstrap, remove references to libcxxabi and cxxabi
- cc-wrapper: remove c++ link workaround when libcxx.cxxabi doesn't exist (still exists for LLVM pre 12)
- adapter: update overrideLibcxx to account for a pkgs.stdenv that only has libcxx

### 58 package updates
- remove `NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}` as no longer needed
- swift, nodejs_v8 remove libcxxabi references in the clang override

https://github.com/NixOS/nixpkgs/pull/292043
2024-03-11 03:53:37 -07:00
Robert Hensing
e99021ff75 trivial-builders: Deduplicate docs
I didn't have the opportunity to do all work at once, so I've added
TODOs to bring attention to the situation.
2024-03-11 11:33:14 +01:00
hellwolf
09b82b349a
build-fhsenv-bubblewrap: fix fhsenv etc entries
* added more comments.
* symlink fhsenv etc entries when necessary.
2024-03-10 19:23:45 +02:00
github-actions[bot]
1966fd4ba6
Merge staging-next into staging 2024-03-09 18:01:41 +00:00
David McFarland
445b240555
Merge pull request #290351 from corngood/dotnet-fixes
dotnet: infrastructure cleanup
2024-03-09 11:34:48 -04:00
github-actions[bot]
38b6fd7904
Merge staging-next into staging 2024-03-08 06:01:32 +00:00
github-actions[bot]
b2ae37aca4
Merge master into staging-next 2024-03-08 06:01:02 +00:00
adisbladis
434df3c94b
Merge pull request #289231 from adisbladis/fetchnpmlock
importNpmLock: init
2024-03-08 15:14:37 +13:00
David McFarland
92a255d13b nuget-to-nix: fix error handling 2024-03-06 10:14:21 -04:00
github-actions[bot]
b859baf176
Merge staging-next into staging 2024-03-06 12:01:41 +00:00
github-actions[bot]
d6370b05b5
Merge master into staging-next 2024-03-06 12:01:15 +00:00
Pol Dellaiera
c224b6e894
Merge pull request #293582 from drupol/build-support/php/improve-composer-validate
build-support/php: update `composer validate` steps
2024-03-06 10:47:35 +01:00
github-actions[bot]
b5be23cc08
Merge staging-next into staging 2024-03-06 00:02:47 +00:00
github-actions[bot]
8660ec23c7
Merge master into staging-next 2024-03-06 00:02:17 +00:00