Commit Graph

6299 Commits

Author SHA1 Message Date
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
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
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
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
Alyssa Ross
cd6818baf7
rustPlatform: forward unpack hooks to cargo fetch
Sometimes it's more ergonomic to set up the build environment in
hooks, to add to the default behaviour rather than replacing it.  It's
very surprising that the fetcher works fine with a custom unpackPhase,
but not with custom preUnpack or postUnpack.

Packages that use preUnpack or postUnpack and Cargo FODs seem to be
very rare.  I searched Nixpkgs for files containing one of
"cargoHash", "cargoDeps", and "cargoSha256", and one of "preUnpack" or
"postUnpack", and only found two such packages:
python3.pkgs.tokenizers and rustdesk.  Neither of their Cargo FOD
hashes are affected by this change.  So if that's any indication,
we're unlikely to be breaking many out-of-tree hashes with these
changes either.
2023-03-14 00:26:11 +00:00
Sandro
112654fc41
Merge pull request #205115 from hraban/fetchdarcs-by-hash 2023-03-14 01:25:22 +01:00
Antonio Nuno Monteiro
45c3600bb1 buildDunePackage: fix doc installation
The default directory where dune expects docs is in
`$out/doc`, but Nix installs it in `$out/share/doc`
2023-03-13 20:50:15 +01:00
Martin Weinelt
bb14c4255b Merge remote-tracking branch 'origin/master' into staging-next 2023-03-13 17:14:19 +00:00
Artturi
db6255c185
Merge pull request #220030 from Artturin/write-shell-application-lighter 2023-03-13 14:44:20 +02:00
Vladimír Čunát
1dd94ad62f
Merge branch 'master' into staging-next 2023-03-12 09:06:28 +01:00
Artturin
23e999fd9b fetchpatch: add decode test 2023-03-11 21:39:29 +00:00
Alyssa Ross
dd6e94f2c1 fetchpatch: add "decode" argument for gerrit
(and gitiles)

This allows fetching a patch from servers that return them
base64-encoded, like this:

    fetchpatch {
      name = "gcc.patch";
      url = "f37ae3b1a8^!?format=TEXT";
      decode = "base64 -d";
      sha256 = "11j1bqz2p8xrfzgfrylgdvmqs45489c4ckl7l0ra1dpfgbqy94a8";
    }
2023-03-11 21:39:29 +00:00
github-actions[bot]
c8c1423cd9
Merge master into staging-next 2023-03-09 00:02:23 +00:00
cidkidnix
856936abc8 buildRustCrate: add libiconv to nativeBuildInputs on darwin
Fixes linker errors while building build.rs where it tries to link libiconv but cannot find it.

Rust executable build for Darwin need libiconv, and indeed buildInputs already has this case handled.
So why is another change needed? Suppose we are cross compiling from Darwin (the build platform) to something else, and the package has a build.rs build script.
The build script is built for the build platform (Darwin) and is also a regular Rust executable, needing libiconv, but due to cross compilation (and strict deps) we need an extra nativeBuildInput.
2023-03-08 14:39:25 -06:00
github-actions[bot]
7072ae38b6
Merge master into staging-next 2023-03-08 18:01:34 +00:00
Robert Hensing
1e383aada5
Merge pull request #214438 from agbrooks/master
dockerTools.buildImage: Handle base images w/ duplicate rootfs diffs
2023-03-08 18:55:20 +01:00
github-actions[bot]
d4187810f9
Merge master into staging-next 2023-03-08 00:02:34 +00:00
Artturin
b1e6e553fa trivial-builders.writeShellApplication: use unwrapped shellcheck
originally done in 62e1d58a6f

but

reverted in 6d8041b053

because it contained many haskell deps
2023-03-07 21:18:48 +02:00
Ilan Joselevich
99de63aafa
Merge pull request #219860 from hesiod/write-shell-application
writeShellApplication: Prefer lib.getExe over unwrapped ShellChecked
2023-03-07 20:37:17 +02:00
Tobias Markus
6d8041b053 writeShellApplication: Prefer lib.getExe over unwrapped ShellChecked
writeShellApplication currently uses the unwrapped (passthru) attribute
which is simply defined as the ShellCheck Haskell package.
Unfortunately the unwrapped version contains everything and the kitchen
sink, while the bin output of the top-level shellcheck package contains
only the static shellcheck executable.
In other words, by using writeShellApplication, currently 3GB of
packages have to be unnecessarily fetched just to run the checkPhase.

$ nix path-info -Sh $(nix build --print-out-paths --no-link nixpkgs#shellcheck.unwrapped)
/nix/store/23x8702b9kqn0r8swah05ky7w5fnh6m2-ShellCheck-0.9.0             3.0G

$ nix path-info -Sh $(nix build --print-out-paths --no-link nixpkgs#shellcheck.bin)
/nix/store/594izb2jz3c57c7hgxfnb6irypnr4575-shellcheck-0.9.0-bin        45.3M

There is no benefit to using shellcheck.unwrapped in this case.
Therefore, replace shellcheck.unwrapped with lib.getExe shellcheck.
2023-03-07 15:01:59 +01:00
Martin Weinelt
c288c37fdd Merge remote-tracking branch 'origin/master' into staging-next 2023-03-06 17:24:21 +00:00
Atemu
d390c28a89
Merge pull request #218849 from Atemu/buildDotnetModule-put-dep-file-path-in-fetch-script
buildDotnetModule: point fetch-deps at module's deps file by default
2023-03-06 17:46:32 +01:00
Martin Weinelt
5aeab34845
Merge pull request #218301 from rrbutani/fix/separate-debuginfo-with-lld
Fix `separate-debug-info` with lld
2023-03-04 00:43:26 +00:00
figsoda
eedbf71d0d
Merge pull request #218472 from figsoda/cargo-setup 2023-03-03 19:40:55 -05:00
Martin Weinelt
b44213aac1
Merge pull request #219011 from wegank/rust-cleanup
rust, firefox, spidermonkey: cleanup
2023-03-03 14:23:20 +00:00
Martin Weinelt
0580d85143 Merge remote-tracking branch 'origin/staging-next' into staging 2023-03-03 04:46:31 +01:00
Artturi
09b11341b9
Merge pull request #218984 from Artturin/replacedeplocal 2023-03-02 14:25:50 +02:00
github-actions[bot]
f61eca4e68
Merge staging-next into staging 2023-03-02 06:01:44 +00:00
Weijia Wang
39a2b0b3bf rust: remove aarch64-linux workaround
This commit reverts #209113, since aarch64-linux now uses GCC 12 by default.
2023-03-01 18:42:07 +02:00
Artturin
28ff7991a1 replaceDependency: use runCommandLocal
> Currently when distributed builds enabled each derivation is uploaded to the remote server to have their hashes rewritten.

fixes issue 13056
2023-03-01 14:36:49 +02:00
Mario Rodas
b82b2b5303 fetchbzr: set cache directory to tmpdir
Breezy >3.3 writes the connections information to a cache directory,
which fails on sandbox.
2023-03-01 04:20:00 +00:00
oxalica
de408167ed buildRustPackage: don't passthru cargoDeps
`cargoDeps` is already passed as `mkDerivation` arguments, and should
not be `passthru`ed again. This fixes the mismatch of `drv.cargoDeps`
and the actual dependency when the original derivation is overriden.
2023-03-02 10:20:15 +10:00
Atemu
014eba883e buildDotnetModule: point fetch-deps at module's deps file by default
Previously, you had to provide the path to the deps.nix of the package inside
your Nixpkgs checkout as an argument manually. Now it just does that by default
when no argument is passed.
2023-02-28 19:04:56 +01:00
github-actions[bot]
445e4a4069
Merge staging-next into staging 2023-02-28 12:01:54 +00:00
Vincent Laporte
db0dc68975 mkCoqDerivation: findlib is an optional input 2023-02-28 10:59:42 +00:00
figsoda
3e18607be3 rustPlatform.cargoSetupHook: dereference symlinks in cargoDeps
unpackFile doesn't dereference symlinks if cargoDeps is a directory, and
some cargo builds run into permission issues because the files the
symlinks point to are not writable.
2023-02-26 11:55:50 -05:00
github-actions[bot]
de3f71e277
Merge staging-next into staging 2023-02-26 06:02:30 +00:00
github-actions[bot]
399e2c78d4
Merge master into staging-next 2023-02-26 06:01:09 +00:00
figsoda
6fcd1dcb0b rustPlatform.importCargoLock: passthru lockFile
This is to make it possible to implement support for updating
`Cargo.lock`s in nix-update by exposing the path to the `Cargo.lock`
file
2023-02-26 00:46:36 -05:00
Winter
115e3413e1 rustPlatform.importCargoLock: add support for v1 lock files
v1 lock files (generated by default by Cargo versions 1.40 and below)
use a single table, `metadata`, to store the checksums of packages.

The primary motivation for doing this now is that we're considering
vendoring all Cargo lock files in Nixpkgs, some packages still use it
(e.g. cargo-asm), and adding support for it doesn't increase the
complexity of the function. No matter the outcome of the vendoring
discussion, this is a nice thing to have because Cargo still supports v1
lock files.
2023-02-26 00:45:40 -05:00
Rahul Butani
b41933a1be
bintools-wrapper: specify SHA1 as the build-id hash style explicitly
NixOS/nixpkgs#146275 has more discussion on this; the abridged version
is that `lld` defaults to using `--build-id=fast` while GNU `ld` defaults
to `--build-id=sha1`. These differ in length and so
`separate-debug-info.sh`, as of this writing, errors on `lld`'s shorter
`--build-id=fast`-generated hashes.

`lld` offers the following `build-id` styles:
  - UUID (random; fast but bad for reproducibility)
  - fast (xxhash; fast but shorter hashes)
  - user provided hexstring
  - SHA1
  - MD5

GNU `ld` supports the latter three options, `mold` supports all of these
plus SHA256.

UUID is out because it's not reproducible, fast isn't supported by GNU
`ld`

Using a nix provided (sourced from the output base hash) hash as the
`build-id` seems tempting but would require a little extra work
(we have to include some characteristic of the binary being hashed
so that binaries within a derivation still have unique hashes; it
seems easy to get this wrong; i.e. a path based approach would make
two otherwise identical binaries that reside at different paths have
different `build-id` hashes)

That leaves SHA1 and MD5 and GNU `ld` already defaults to the former.

This commit adds `$NIX_BUILD_ID_STYLE` as an escape hatch, in case any
packages have strong opinions about which hash to use.

----

Note that if/when NixOS/nixpkgs#146275 goes through, this change can be
reverted if linker speed is a priority.
2023-02-25 12:49:40 -06:00
github-actions[bot]
13fb68e8cf
Merge staging-next into staging 2023-02-24 12:01:52 +00:00
github-actions[bot]
2384cd723b
Merge master into staging-next 2023-02-24 12:01:20 +00:00
Maximilian Bosch
de100f17c3
Merge pull request #217663 from lheckemann/mkshell-preferlocalbuild
mkShell: set preferLocalBuild by default
2023-02-24 07:49:14 +01:00
Gabriella Gonzalez
79484b1707
bintools: Add response file support to ld-wrapper (#213831)
The motivation behind this is to alleviate the problem
described in https://github.com/NixOS/nixpkgs/issues/41340.
I'm not sure if this completely fixes the problem, but it
eliminates one more area where we can exceed command line
length limits.

This is essentially the same change as in #112449,
except for `ld-wrapper.sh` instead of `cc-wrapper.sh`.

However, that change alone was not enough; on macOS the
`ld` provided by `darwin.cctools` fails if you use process
substitution to generate the response file, so I put up a
PR to fix that:

https://github.com/tpoechtrager/cctools-port/pull/131

… and I included a patch referencing that fix so that the
new `ld-wrapper` still works on macOS.
2023-02-23 17:05:18 -08: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