Commit Graph

6575 Commits

Author SHA1 Message Date
hacker1024
7e12e3afaa flutter.mkFlutterApp: Remove the target architecture from the dependency derivation name
As the dependency tarballs no longer include SDK artifacts, they are not platform dependent.
2023-04-14 14:25:33 +10:00
hacker1024
30caca0839 flutter.mkFlutterApp: Add Git to nativeBuildInputs
The deterministic Git script depends on it.
2023-04-14 02:16:04 +10:00
Someone Serge
b612fe36b2
autoPatchelfHook: add appendRunpaths argument 2023-04-13 19:12:37 +03:00
hacker1024
f7e3c19cc8 flutter.mkFlutterApp: Don't vendor arbitrary configuration files 2023-04-14 01:49:09 +10:00
hacker1024
8f9aa6b18b flutter.mkFlutterApp: Don't use autoPatchelf on package cache
While this may be beneficial for packages that ship native binaries, this causes issues due to Flutter packages that have inappropriately uploaded build artifacts (such as those from example subprojects) to pub.dev.
2023-04-14 01:41:58 +10:00
hacker1024
04e7ced7e2 mkFlutterApp: Don't fetch prebuilt artifacts
Artifacts are now supplied by the Flutter SDK derivation.

In addition, they are no longer a factor in the dependency hash calculation.
2023-04-13 22:01:42 +10:00
hacker1024
6d50bcc487 mkFlutterApp: Deduplicate build environment setup
The build environment is now set up by the Flutter wrapper, and does not need to be done in mkFlutterApp.
2023-04-13 22:00:24 +10:00
hacker1024
d5aa0c1f97 Merge remote-tracking branch 'NixOS/master' into patch-3 2023-04-13 19:22:50 +10:00
github-actions[bot]
ae00b7fb14
Merge staging-next into staging 2023-04-13 00:02:47 +00:00
Sandro Jäckel
7090651071
{bintools,cc}-wrapper: don't fallback to version = null
mkDerivation cannot handle that
2023-04-12 22:08:36 +02:00
Sandro Jäckel
a7dbdb7644
cc-wrapper: don't set env to null when nativeTools is used
This is not allowed and fails fatal
2023-04-12 22:08:36 +02:00
Adam Joseph
42c8e4dd18 build-rust-crate: dontStrip=!release
Without this PR, unlike `RUST_LIB_BACKTRACE=1 cargo run` you won't
get line numbers in backtraces from binaries built with:

```
nix build -f Cargo.nix --arg release false
```

This PR fixes that.
2023-04-12 15:24:50 -04:00
Adam Joseph
15e2a735f8 Revert "cc-wrapper: add optional temporary hack for -B"
This reverts commit ac3acd956f.
2023-04-12 10:26:23 -07:00
github-actions[bot]
f4a0b6d5fa
Merge staging-next into staging 2023-04-12 12:02:59 +00:00
Vladimír Čunát
ac3acd956f
cc-wrapper: add optional temporary hack for -B
This fixes parts in llvmPackages_{13,rocm}
e.g. build .clang for testing.
Longterm mass-rebuild fix should come in PR #225846
2023-04-12 09:37:24 +02:00
Artturi
a2da3d62a6
Merge pull request #225220 from amjoseph-nixpkgs/pr/gfortran/do-not-disable-bootstrap 2023-04-11 22:33:14 +03:00
Will Fancher
762b69f2ff systemd-initrd: Fix up root directory mode 2023-04-11 15:20:47 -04:00
github-actions[bot]
1144179146
Merge staging-next into staging 2023-04-11 18:01:52 +00:00
github-actions[bot]
4e2c1815ed
Merge master into staging-next 2023-04-11 18:01:18 +00:00
Adam Joseph
de8ce81ff2 cc-wrapper: deunify clang/gcc treatment of -isystem
In https://github.com/NixOS/nixpkgs/pull/209870 I tried to unify the
treatment of clang and gcc in cc-wrapper as much as possible.
However it appears that I went too far.

Clang requires -isystem flags in order to be able to find gcc's
libstdc++.  Gcc does not need these flags.  If they are added,
gfortran will get confused:

  https://github.com/NixOS/nixpkgs/pull/209870#issuecomment-1500550903

This commit deunifies the chunk of code that adds the -isystem
flags, and explains why this chunk applies only to clang.
2023-04-11 20:19:58 +03:00
Artturin
b1d4dfddaf Revert "julia{18,19,}: fix build by a temporary hack"
This reverts commit e2691227cd.
2023-04-11 20:19:58 +03:00
Yarny0
fcbf9c6415 patch-ppd-files: use meta and passthru directly
When I authored the nix file in
335a9083b0,
`makeSetupHook` didn't know about `passthru` or `meta`.
So I foisted these attributes on the
derivation with `.overrideAttrs`.

Commits ba895a7da8 and
48034046bf enabled
`makeSetupHook` to receive these attributes directly.
It seems advisable to use that instead of `.overrideAttrs`.
2023-04-11 16:58:18 +02:00
Atemu
9f26295eaa
Merge pull request #225471 from Atemu/fhsenv-pname+version
buildFHSEnvBubblewrap: support pname + version
2023-04-11 15:35:43 +02:00
Atemu
7a1de48994 anki-bin: use pname + version instead of hacky override 2023-04-11 13:27:29 +02:00
github-actions[bot]
da9d584845
Merge staging-next into staging 2023-04-10 18:01:45 +00:00
Vladimír Čunát
e2691227cd
julia{18,19,}: fix build by a temporary hack
This is a low-rebuild version of PR #225273
/cc the proper and hopefully complete fix in PR #225220
2023-04-10 16:36:55 +02:00
Atemu
7398d5fc79 buildFHSEnvBubblewrap: support pname + version 2023-04-09 19:52:11 +02:00
github-actions[bot]
b32e5be4f2
Merge staging-next into staging 2023-04-09 06:01:59 +00:00
github-actions[bot]
fc0616b73d
Merge master into staging-next 2023-04-09 06:01:16 +00:00
figsoda
ce0ee58e84
Merge pull request #224893 from amjoseph-nixpkgs/pr/crate-overrides/evdev-sys
default-crate-overrides.nix: prevent `git fetch`
2023-04-09 00:01:20 -04:00
zowoq
dc73bd6430 buildGo{Module,Package}: minor cleanup 2023-04-09 12:23:16 +10:00
Sandro
4806f62694
Merge pull request #224669 from raboof/preserve-dates-while-stripping 2023-04-09 03:28:06 +02:00
github-actions[bot]
97afa6ec9b
Merge master into staging-next 2023-04-09 00:02:38 +00:00
Sandro
2341c80301
Merge pull request #219707 from Stunkymonkey/fetchmavenartifact-deprecate-phases 2023-04-09 01:42:04 +02:00
github-actions[bot]
8ae069b888
Merge master into staging-next 2023-04-08 12:01:05 +00:00
Franz Pletz
a50962e4c4
Merge pull request #224458 from helsinki-systems/upd/nginx
nginxMainline: 1.23.3 -> 1.23.4
2023-04-08 11:49:55 +02:00
github-actions[bot]
75e19b98bb
Merge master into staging-next 2023-04-08 00:02:03 +00:00
Justin Bedő
86dc68fab4
Merge pull request #224905 from NixOS/r-updates
rPackages: CRAN repository changes and treewide update
2023-04-08 06:45:19 +10:00
Adam Joseph
579b812b0e https://github.com/NixOS/nixpkgs/pull/224893#pullrequestreview-1375521876 2023-04-06 13:43:22 -07:00
Adam Joseph
482b61e142 default-crate-overrides.nix: prevent git fetch
The build.rs script shipped with evdev-sys attempts to detect cross
compilation and uses a completely different codepath which does a
`git fetch` inside the build script.  This doesn't work in nixpkgs.

This PR adds a `touch libevdev/.git` to trick the `build.rs` into
thinking that it is not necessary to do a `git fetch`.

Thanks to @figsoda for finding this more-elegant solution to the
problem (my original solution needed to patch `build.rs`):

  https://github.com/NixOS/nixpkgs/pull/224893#pullrequestreview-1373809617

Tested on:
- [x] `aarch64-linux` (cross from `x86_64-linux`)
2023-04-06 13:05:07 -07:00
github-actions[bot]
638ad26bf6
Merge master into staging-next 2023-04-06 16:11:06 +00:00
Winter
faa3de1bf5
prefetch-npm-deps: fix clippy lint 2023-04-06 11:32:47 -04:00
Winter
e1d64c1941
prefetch-npm-deps: throw better error when unsupported git service is used
See https://github.com/NixOS/nixpkgs/pull/206476#discussion_r1058689383.
2023-04-06 11:32:47 -04:00
Winter
7e247e6fec
prefetch-npm-deps: download dev deps for git deps with install scripts
Git dependencies with install scripts are built isolated from the main
package, so their development dependencies are required.

To take advantage of this, #206477 is needed.
2023-04-06 11:32:39 -04:00
Winter
3e68a27822
prefetch-npm-deps: refactor
This splits prefetch-npm-deps into multiple files, as well as making a
few small changes along the way, such as going from a `HashMap` to a `Vec`
as the container for packages, to deduplicate them more efficently.
2023-04-06 11:32:23 -04:00
Uri Baghin
0a65747324
Merge pull request #224917 from uri-canva/uri/fix-symlinks
buildBazelPackage: fix difference between linux and darwin deps
2023-04-06 22:10:59 +10:00
github-actions[bot]
6e7ab02752
Merge master into staging-next 2023-04-06 06:01:26 +00:00
Uri Baghin
f8ee061247 buildBazelPackage: fix difference between linux and darwin deps 2023-04-06 11:42:46 +10:00
figsoda
bb70c6cba3
Merge pull request #224892 from amjoseph-nixpkgs/pr/crate-overrides/prost-build 2023-04-05 20:27:51 -04:00
Uri Baghin
3df364d185
Merge pull request #224765 from uri-canva/uri/overwrite
buildBazelPackage: allow buildAttrs and fetchAttrs to override inherited attrs
2023-04-06 10:13:53 +10:00
github-actions[bot]
be07e18261
Merge master into staging-next 2023-04-06 00:02:09 +00:00
Justin Bedo
2231a9c89a
Merge remote-tracking branch 'origin/master' into r-updates 2023-04-06 08:51:55 +10:00
Adam Joseph
476fde08af default-crate-overrides.nix: prost-build needs protobuf 2023-04-05 15:40:17 -07:00
Artturi
38263d02cf
Merge pull request #224503 from Artturin/nixpredockerfix 2023-04-06 00:09:41 +03:00
github-actions[bot]
ae5b53747b
Merge master into staging-next 2023-04-05 12:01:10 +00:00
Uri Baghin
1ee2c5c9eb buildBazelPackage: allow buildAttrs and fetchAttrs to override inherited attrs 2023-04-05 20:51:52 +10:00
Justin Bedo
3e6b47a007
rPackages: switch to official CRAN mirrors 2023-04-05 13:25:06 +10:00
Uri Baghin
440b4de588 buildBazelPackage: support multiple targets 2023-04-05 12:59:54 +10:00
Arnout Engelen
112150ec70
setup-hooks/strip.sh: preserve file dates
AFAIK this doesn't have a noticable effect for typical
Linux executables, but will avoid setting the timestamp
inside the file for Windows executables to the build
date.
2023-04-04 18:52:39 +02:00
Vladimír Čunát
834334f2c2
Merge #169327: cc-wrapper: fix minor problems
...into staging
2023-04-04 09:25:59 +02:00
Vladimír Čunát
87a8a597e6
Merge #223741: writeTextFile: chmod before checkPhase
...into staging
2023-04-04 08:57:05 +02:00
Robin Bate Boerop
824c9ac5c9 nix-prefetch-docker: handle overrides correctly
Without this change, the `--os` and `--arch` switches are disregarded
for operations involving `skopeo inspect` invocations. This means that,
for example, one cannot fetch Linux images while on macOS.
2023-04-03 21:12:13 +03:00
github-actions[bot]
a59e8336d7
Merge staging-next into staging 2023-04-03 18:01:56 +00:00
Bernardo Meurer
f1f6ca8bcd
Merge pull request #209870 from amjoseph-nixpkgs/pr/stdenv/external-gcc-bootstrap 2023-04-03 08:19:03 -07:00
ajs124
b7cb74322c fetchhg: allow specifying (sri) hash 2023-04-03 12:40:35 +02:00
Andrew Hamon
e929a99848 writeShellApplication: allow substitutions and remote building.
Unlike most other trivial builders, writeShellApplication has a
relatively heavy checkphase that invokes shellcheck. On my system,
a small writeShellApplication takes over 1 second to build.

This PR allows substitutions and stops preferring local builds for
writeShellApplication.
2023-04-02 14:36:32 -07:00
Adam Joseph
6c209e862e emacs: path fixes resulting from libgccjit changes
The Nix-driven bootstrap of gcc resulted in some changes to the
structure of the `libgccjit` outpaths, and also added an additional
output (`libgcc`) to `gcc`.

This commit makes the corresponding changes in the `emacs`
derivation in order to not break emacs.

Emacs is the only user of `libgccjit` in nixpkgs at the moment.
2023-04-02 13:49:54 -07:00
Adam Joseph
7553d0fe29 stdenv: Nix-driven bootstrap of gcc
#### Summary

By default, when you type `make`, GCC will compile itself three
times.  This PR inhibits that behavior by configuring GCC with
`--disable-bootstrap`, and reimplements the triple-rebuild using
Nix rather than `make`/`sh`.

 #### Immediate Benefits

- Allow `gcc11` and `gcc12` on `aarch64` (without needing new
  `bootstrapFiles`)
- Faster stdenv rebuilds: the third compilation of gcc
  (i.e. stageCompare) is no longer a `drvInput` of the final stdenv.
  This allows Nix to build stageCompare in parallel with the rest of
  nixpkgs instead of in series.
- No more copying `libgcc_s` out of the bootstrap-files or other
  derivations
- No more Frankenstein compiler: the final gcc and the libraries it
  links against (mpfr, mpc, isl, glibc) are all built by the same
  compiler (xgcc) instead of a mixture of the bootstrapFiles'
  compiler and xgcc.
- No more [static lib{mpfr,mpc,gmp,isl}.a hack]
- Many other small `stdenv` hacks eliminated
- `gcc` and `clang` share the same codepath for more of `cc-wrapper`.

 #### Future Benefits

- This should allow using a [foreign] `bootstrap-files` so long as
  `hostPlatform.canExecute bootstrapFiles`.
- This should allow each of the libraries that ship with `gcc`
  (lib{backtrace, atomic, cc1, decnumber, ffi, gomp, iberty,
  offloadatomic, quadmath, sanitizer, ssp, stdc++-v3, vtv}) to be
  built in separate (one-liner) derivations which `inherit src;`
  from `gcc`, much like https://github.com/NixOS/nixpkgs/pull/132343

 #### Incorporates

- https://github.com/NixOS/nixpkgs/pull/210004
- https://github.com/NixOS/nixpkgs/pull/36948 (unreverted)
- https://github.com/NixOS/nixpkgs/pull/210325
- https://github.com/NixOS/nixpkgs/pull/210118
- https://github.com/NixOS/nixpkgs/pull/210132
- https://github.com/NixOS/nixpkgs/pull/210109
- https://github.com/NixOS/nixpkgs/pull/213909
- https://github.com/NixOS/nixpkgs/pull/216136
- https://github.com/NixOS/nixpkgs/pull/216237
- https://github.com/NixOS/nixpkgs/pull/210019
- https://github.com/NixOS/nixpkgs/pull/216232
- https://github.com/NixOS/nixpkgs/pull/216016
- https://github.com/NixOS/nixpkgs/pull/217977
- https://github.com/NixOS/nixpkgs/pull/217995

 #### Closes

- Closes #108305
- Closes #108111
- Closes #201254
- Closes #208412

 #### Credits

This project was made possible by three important insights, none of
which were mine:

1. @ericson2314 was the first to advocate for this change, and
   probably the first to appreciate its advantages.  Nix-driven
   (external) bootstrap is "cross by default".

2. @trofi has figured out a lot about how to get gcc to not mix up
   the copy of `libstdc++` that it depends on with the copy that it
   builds, by moving the `bootstrapFiles`' `libstdc++` into a
   [versioned directory].  This allows a Nix-driven bootstrap of gcc
   without the final gcc would still having references to the
   `bootstrapFiles`.

3. Using the undocumented variable [`user-defined-trusted-dirs`]
   when building glibc.  When glibc `dlopen()`s `libgcc_s.so`, it
   uses a completely different and totally special set of rules for
   finding `libgcc_s.so`.  This trick is the only way we can put
   `libgcc_s.so` in its own separate outpath without creating
   circular dependencies or dependencies on the bootstrapFiles.  I
   would never have guessed to use this (or that it existed!) if it
   were not for a [comment in guix] which @Mic92 [mentioned].

My own role in this PR was basically: being available to go on a
coding binge at an opportune moment, so we wouldn't waste a
[crisis].

[aarch64-compare-ofborg]: https://github.com/NixOS/nixpkgs/pull/209870/checks?check_run_id=10662822938
[amd64-compare-ofborg]: https://github.com/NixOS/nixpkgs/pull/209870/checks?check_run_id=10662825857
[nonexistent sysroot]: https://github.com/NixOS/nixpkgs/pull/210004
[versioned directory]: https://github.com/NixOS/nixpkgs/pull/209054
[`user-defined-trusted-dirs`]: https://sourceware.org/legacy-ml/libc-help/2013-11/msg00026.html
[comment in guix]: 5e4ec82181/gnu/packages/gcc.scm (L253)
[mentioned]: https://github.com/NixOS/nixpkgs/pull/210112#issuecomment-1379608483
[crisis]: https://github.com/NixOS/nixpkgs/issues/108305
[foreign]: https://github.com/NixOS/nixpkgs/pull/170857#issuecomment-1170558348
[static lib{mpfr,mpc,gmp,isl}.a hack]: 2f1948af9c/pkgs/stdenv/linux/default.nix (L380)
2023-04-02 13:49:41 -07:00
Adam Joseph
39c7885cd9 cc-wrapper: if isClang, add -L${gccForLibs.libgcc}/lib
When wrapping `clang` and using a `gccForLibs` whose `libgcc` is in
its own output (rather than the `lib` output), this commit will adds
`-L${gccForLibs.libgcc}/lib` to `cc-ldflags`.

If that flag is not added, `firefox` will fail to compile because it
invokes `clang-wrapper` with `-fuse-ld=lld` and passes `-lgcc_s` to
`lld`, but does not tell `lld` where to find `libgcc_s.so`.  In that
situation, firefox will fail to link.
2023-04-02 03:04:20 -07:00
Adam Joseph
3b49fb2ab6 trivial-builders/test/references.nix: fix eval
The command

```
nix-build -A tests.trivial-builders.references --show-trace
```

fails eval with

```
in job ‘nixpkgs.tests.trivial-builders.references’:
error: The option `meta.description' does not exist. Definition values:
       - In `makeTest parameters': "Run the Nixpkgs trivial builders tests"
```

because `meta.description` and `meta.license` are not valid for
`nixosTest`s (they are valid for `mkDerivation` of course).

This has been causing Hydra eval failures:

  https://hydra.nixos.org/jobset/nixos/pr-209870-gcc-external-bootstrap#tabs-errors

Let's fix eval by removing these attributes.
2023-04-02 03:04:20 -07:00
github-actions[bot]
47ddbcb1f0
Merge staging-next into staging 2023-03-31 00:03:05 +00:00
Sandro
06c40b7498
Merge pull request #218991 from Trundle/builddotnetmodule-space-wrapper-args 2023-03-31 01:19:55 +02:00
github-actions[bot]
04fb768a55
Merge staging-next into staging 2023-03-30 18:01:42 +00:00
Naïm Favier
62a3b6448f Revert "symlinkjoin: print warning when keeping existing file" 2023-03-30 13:21:42 -03:00
github-actions[bot]
0a1c5be4ef
Merge staging-next into staging 2023-03-30 06:01:44 +00:00
Marco Rebhan
f78175ad35 desktopToDarwinBundle: Fix icon selection algorithm
Now, the fallback icon is only used after considering all possible icons
instead of only the first one.
2023-03-29 16:42:57 +02:00
Marco Rebhan
d9a07bcd41 desktopToDarwinBundle: Add debug outputs for icon conversion 2023-03-29 16:42:57 +02: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
sternenseemann
192d03bee4 writers: fix aarch64-darwin workaround if content is a string
When authoring #220966, I missed that the `//` would take effect solely
in the else branch, fixing hledger-check-fancyassertions, but not
tests.writers.bin.haskell.
2023-03-29 03:29:13 +02:00
github-actions[bot]
496dc37e4b
Merge staging-next into staging 2023-03-29 00:03:13 +00:00
Antonio Nuno Monteiro
91137380e6
buildDunePackage: use --mandir instead of --man 2023-03-28 11:07:28 -07:00
github-actions[bot]
202cb8119f
Merge staging-next into staging 2023-03-28 18:01:48 +00:00
Atemu
91f5aa3446
Merge pull request #213378 from Atemu/steam-env-vars
steam: add extraEnv argument
2023-03-28 17:25:14 +02:00
figsoda
63b9aeed13
Merge pull request #223320 from figsoda/auditable 2023-03-27 19:32:02 -04:00
Vladimír Čunát
1acb9fd044
Merge branch 'master' into staging 2023-03-27 09:36:27 +02:00
Atemu
bdf0dd28b9
Merge pull request #219091 from cdepillabout/buildfhsuserenv-version
buildFHSUserEnv: add version arg
2023-03-27 08:46:24 +02:00
figsoda
201d4b7c5c rustPlatform.buildRustPackage: make auditable the default 2023-03-26 22:47:06 -04:00
zowoq
9861cf4a7f rustPlatform.fetchCargoTarball: use sparse protocol for crates.io 2023-03-27 08:08:40 +10:00
Felix Buehler
0f57b4bd73 fetchMavenArtifact: deprecate phases & use pname+version 2023-03-26 18:44:55 +02:00
Atemu
192c3ecd4b buildFHSEnvBubblewrap: allow deeper introspection via passthru 2023-03-26 17:19:29 +02:00
Marco Rebhan
b48f6118c4
desktopToDarwinBundle: Return at most 1 literal match from desktop file
This fixes multiple entries being returned from getDesktopParam, e.g. in the
case of localized key names: 'Name', 'Name[de]', and makes this function to
match this key exactly instead of a pattern for the same reason.
2023-03-26 12:47:52 +02:00
github-actions[bot]
72fc224baa
Merge staging-next into staging 2023-03-26 06:01:39 +00:00
github-actions[bot]
ff3e86d2b4
Merge master into staging-next 2023-03-26 06:01:06 +00:00
Yureka
4329de1264 rustPlatform.fetchCargoTarball: fail on git dependencies
The reason is that we can not expect the extended logic run on git
dependencies starting from Cargo 1.68 to be reproducible in future
 versions, and thus the output hash would not be sufficiently stable.
https://github.com/rust-lang/cargo/pull/11414
2023-03-26 01:52:03 +01:00
github-actions[bot]
333618087c
Merge staging-next into staging 2023-03-26 00:03:19 +00:00
github-actions[bot]
07fb9cae4e
Merge master into staging-next 2023-03-26 00:02:45 +00:00
Yureka
5ce282e57e rustPlatform.importCargoLock: follow symlinks when copying tree
fixes build when git dependencies contain symlinks into parent directory

needed for libdeltachat
2023-03-26 00:02:16 +01:00
Yureka
37b31d4a2f rustPlatform.importCargoLock: always fetch submodules when builtins.fetchGit is used 2023-03-26 00:02:16 +01:00
Artturin
780669daf5 treewide: don't hardcode /nix/store (no rebuilds changes)
improve experience for other store locations
2023-03-24 20:11:33 +02:00
github-actions[bot]
9e6337ddc0
Merge staging-next into staging 2023-03-24 12:02:22 +00:00
Vladimír Čunát
12dd95fbb1
Merge branch 'master' into staging-next 2023-03-24 09:07:41 +01:00
Vladimír Čunát
cb10bd6cb3
lapack: force a rebuild on x86_64-darwin
I have no idea why, but Hydra cached a corrupted binary
/nix/store/h0412qmi29ivgrc42lfhi1x290d6l429-lapack-3/lib/liblapack.dylib
so rebuilding it fixes issues in various dependants, e.g.
https://hydra.nixos.org/log/nqfq62pqbbmsq08kb2pljdkz9ldyr57b-python3.10-numpy-1.24.2.drv
2023-03-24 08:57:05 +01:00
Ivan Trubach
dcc576176c buildGo{Module,Package}: fix precedence for or operator 2023-03-24 15:45:25 +10:00
D Anzorge
c86b1a0bca rustPlatform.importCargoLock: handle workspace Cargo.toml false positives
Since we grep for 'workspace', it's possible the script ends up running
on a Cargo.toml that has the word 'workspace' in a comment, but does not
actually use workspaces
2023-03-24 15:45:16 +10:00
zowoq
6085b3b7f7
Merge pull request #215408 from astro/rust-sysroot 2023-03-24 15:44:59 +10:00
Vladimír Čunát
0a88dec4f3
Merge branch 'staging-next' into staging 2023-03-21 12:57:16 +01:00
Louis Blin
e2825fb1b5 rustPlatform.importCargoLock: improved semantics for 'extraRegistries' option
Clearer API following the recommendation on the pull request that
introduced this option a few days ago:
https://github.com/NixOS/nixpkgs/pull/221381#discussion_r1141226293
2023-03-20 14:40:04 -04:00
Martin Weinelt
9959ec97f8
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/wxPython/4.0.nix
- pkgs/development/python-modules/wxPython/4.1.nix
2023-03-20 15:07:36 +01:00
mdarocha
d093086a2b buildDotnetModule: add support for using combinePackages as dotnet-sdk
This allows packages that require several dotnet versions to build (like
BeatSaberModManager) to properly depend on the dotnet-sdk specific deps.
This in turns avoids having to regenerate the deps of those packages
after each dotnet-sdk update.

This also changes nuget-to-nix to accept a file with a list of
exclusions instead of a folder.
2023-03-19 20:53:39 +01:00
github-actions[bot]
c70342c89c
Merge master into staging-next 2023-03-19 00:02:27 +00:00
Winter
5686f0064d rustPlatform.importCargoLock: add support for git dependencies that use workspace inheritance
Rust 1.64.0 added support for workspace inheritance, which allows
for crates to inherit values such as dependency version constraints or
package metadata information from their workspaces [0].

This works by having workspace members specify a value as a table, with
`workspace` set to true. Thus, supporting this in importCargoLock is as
simple as walking the crate's Cargo.toml, replacing inherited values
with their workspace counterpart.

This is also what a forthcoming Cargo release will do for `cargo vendor` [1],
but we can get ahead of it ;)

[0]: https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html#cargo-improvements-workspace-inheritance-and-multi-target-builds
[1]: https://github.com/rust-lang/cargo/pull/11414
2023-03-18 20:34:59 +01:00
github-actions[bot]
4742d1b3d6
Merge staging-next into staging 2023-03-18 18:01:35 +00:00
github-actions[bot]
403b148aa5
Merge master into staging-next 2023-03-18 18:01:02 +00:00
Robert Hensing
1dd6d307f7
Merge pull request #221766 from amjoseph-nixpkgs/pr/trivial-builders/test/fix-eval
trivial-builders/test/references.nix: fix eval
2023-03-18 15:20:53 +01:00
github-actions[bot]
00623e191a
Merge staging-next into staging 2023-03-18 14:01:22 +00:00
github-actions[bot]
7f0b38bc9a
Merge master into staging-next 2023-03-18 14:00:45 +00:00
Linus Heckemann
1ba1b35d7f
Merge pull request #183874 from zhaofengli/bwrap-fhs-preserve-etc-symlink
build-fhs-userenv-bubblewrap: Preserve symlinks in /etc
2023-03-18 13:15:44 +01:00
github-actions[bot]
ad9c132f13
Merge staging-next into staging 2023-03-18 06:01:47 +00:00
github-actions[bot]
36748936f9
Merge master into staging-next 2023-03-18 06:01:16 +00:00
Adam Joseph
1a657f18f7 trivial-builders/test/references.nix: fix eval
The command

```
nix-build -A tests.trivial-builders.references --show-trace
```

fails eval with

```
in job ‘nixpkgs.tests.trivial-builders.references’:
error: The option `meta.description' does not exist. Definition values:
       - In `makeTest parameters': "Run the Nixpkgs trivial builders tests"
```

because `meta.description` and `meta.license` are not valid for
`nixosTest`s (they are valid for `mkDerivation` of course).

This has been causing Hydra eval failures:

  https://hydra.nixos.org/jobset/nixos/pr-209870-gcc-external-bootstrap#tabs-errors

Let's fix eval by removing these attributes.
2023-03-17 20:56:20 -07:00
figsoda
1792c4f8c7
Merge pull request #221104 from figsoda/crate 2023-03-17 21:28:07 -04:00
github-actions[bot]
d681bc8661
Merge staging-next into staging 2023-03-18 00:03:01 +00:00
github-actions[bot]
2c8e6963dc
Merge master into staging-next 2023-03-18 00:02:30 +00:00
figsoda
7d23bdd221
Merge pull request #221413 from alyssais/rustc-musl 2023-03-17 17:25:30 -04:00
Sergei Trofimovich
0ebe51030f cc-wrapper: make $tool-prefixed cpp wrapping unconditional 2023-03-17 18:04:54 +00:00
github-actions[bot]
7105890faf
Merge staging-next into staging 2023-03-17 17:57:34 +00:00
Zhaofeng Li
42ef5ded06 build-fhs-userenv-bubblewrap: Use more descriptive names 2023-03-17 11:03:12 -06:00
Zhaofeng Li
58d73d2397 build-fhs-userenv-bubblewrap: Preserve symlinks in /etc
If the original file in /etc is a symlink, make it a symlink inside
the sandbox as well.

This fixes https://github.com/NixOS/nixpkgs/issues/126234#issuecomment-1192203498

Co-authored-by: Linus Heckemann <git@sphalerite.org>
2023-03-17 11:03:11 -06:00
Thiago Kenji Okada
f05d7d022c buildGraalvmNativeImage: allow overwriting {build,install}Phase/nativeBuildInputs 2023-03-17 16:50:52 +00:00
Sergei Trofimovich
4bdbae5ad1 cc-wrapper: wrap cpp for cross lust like to native
Without this change $target-cpp is used unwrapped and is missing
standard header search paths among other things).

Example failure:

    $ nix build -f. -L pkgsStatic.netbsd.compat
    ...
       > checking how to run the C preprocessor... x86_64-unknown-linux-musl-cpp
       > configure: error: in `/build/cvs-export/tools/compat':
       > configure: error: C preprocessor "x86_64-unknown-linux-musl-cpp" fails sanity check
       > See `config.log' for more details
2023-03-17 16:42:52 +00:00
figsoda
e939c1007c
Merge pull request #221381 from lbpdt/feature/import-cargo-lock-extra-registries 2023-03-16 20:50:20 -04:00
Louis Blin
48dc4386a4 rustPlatform.importCargoLock: support extra registries
This is useful to teach `importCargoLock` how to download crates from a
registry other than crates.io. Specifically, we publish our own crates
to an internal registry and this feature lets us pull from it seamlessly.
2023-03-16 19:13:33 -04:00
github-actions[bot]
455127ad5e
Merge master into staging-next 2023-03-16 18:01:20 +00:00
Bernardo Meurer
6e55733359
Merge pull request #219747 from Stunkymonkey/deprecate-isNull 2023-03-16 11:10:22 -03:00
Alyssa Ross
470e6130b3
rust: fix overriding rust flags on musl
If RUSTFLAGS is set in the environment, Cargo will ignore rustflags
settings in its TOML configuration.  So setting RUSTFLAGS=-g (like
separateDebugInfo does) to generate debug info breaks
dynamically-linked Rust packages on musl.  This breakage is visible
for any packages that call into C dynamic libraries.  If the binary is
linked directly to a C dynamic library, it will fail to build, and if
it depends on a Rust library which links a C dynamic library, it will
segfault at runtime when it tries to call a function from the C
library.  I noticed this because pkgsMusl.crosvm is broken for this
reason, since it sets separateDebugInfo = true.

It shouldn't be possible to end up with broken binaries just by using
RUSTFLAGS to do something innocuous like enable debug info, so I think
that, even though we liked the approach of modiyfing .cargo/config
better at the time, it's become clear that it's too brittle, and we
should bite the bullet and patch the compiler instead when targetting
musl.  It does not appear to be necessary to modify the compiler at
all when cross-compiling /from/ dynamically-linked Musl to another
target, so I'm only checking whether the target system is
dynamically-linked Musl when deciding whether to make the modification
to the compiler.

This reverts commit c2eaaae50d
("cargoSetupHook: pass host config flags"), and implements the
compiler patching approach instead.
2023-03-16 02:29:46 +00:00
Martin Weinelt
578fb7fd1f
Merge pull request #220557 from mweinelt/libxcrypt-strong
libxcrypt: Build only with strong hashes
2023-03-15 16:43:12 +00:00
github-actions[bot]
867440983f
Merge staging-next into staging 2023-03-15 06:01:43 +00:00
github-actions[bot]
068a7415f8
Merge master into staging-next 2023-03-15 06:01:09 +00:00
Chris Hodapp
1a8edfe192
emacs: Add basic tree-sitter support (#219559)
This commit adds basic support for tree-sitter in the emacs build,
such that (if the user opts into tree-sitter support), tree-sitter
will be enabled and binary library files for tree-sitter can be
included in the `lib` directory of packages passed to
`emacsWithPackages`. The libraries will be aggregated and included in
treesit-extra-load-path.

The previous pattern for this in the community was to add tree-sitter
libaries by patching emacs's `RUNPATH` with `patchelf` in a post-fixup
phase. However, this has the substantial drawback that two different
emacs installations with different lists of available tree-sitter
libraries must be entirely separate builds. By supplying the
tree-sitter libraries in the wrapping layer of `emacsWithpackages`, it
becomes possible to share a single, more-cacheable "core emacs".

This support defaults to "on" only in emacs 29 and up, since previous
versions do not support tree-sitter out of the box.
2023-03-15 16:51:29 +13:00
Martin Weinelt
3b8cf43350
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/imageio/default.nix
- pkgs/development/python-modules/pytest-order/default.nix
2023-03-15 02:01:15 +01:00
github-actions[bot]
a3b786aa94
Merge staging-next into staging 2023-03-15 00:03:06 +00:00
figsoda
c1de216863
Merge pull request #221093 from alyssais/rustPlatform-postUnpack 2023-03-14 18:02:05 -04:00
Martin Weinelt
231c1145f2
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/rflink/default.nix
2023-03-14 22:33:40 +01:00
sternenseemann
86dbc928fb writers: make codesign_allocate available in PATH on aarch64-darwin
codesign_allocate is assumed to be in PATH:

https://github.com/NixOS/nixpkgs/issues/154203
https://github.com/NixOS/nixpkgs/issues/148189

Using an absolute reference in post-link-sign-hook would be another
possibility, but hasn't been fruitful so far:
https://github.com/NixOS/nixpkgs/pull/148282
https://github.com/NixOS/nixpkgs/pull/208120
2023-03-14 19:45:53 +01:00
github-actions[bot]
9feb9fda3e
Merge staging-next into staging 2023-03-14 18:02:00 +00:00
Martin Weinelt
9e4d592114
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/eve/default.nix
2023-03-14 16:49:37 +01:00
François Bobot
3b3e37f996 [OCaml] tell dune where to install man
`fixupPhase` move `$out/man` to `$out/share/man`. So the information of their location in the dune-project file is outdated which breaks dependencies on packages ( `(package foo)`).
2023-03-14 14:37:57 +01: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
figsoda
62327ff6a9 fetchCrate: add unpack option to use fetchurl instead of fetchzip 2023-03-13 22:15:02 -04:00