Commit Graph

6322 Commits

Author SHA1 Message Date
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
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
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
github-actions[bot]
59ffe854f9
Merge staging-next into staging 2023-03-13 18:01:48 +00: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
Martin Weinelt
4472cf44eb
treewide: Make yescrypt the default algorithm for pam_unix.so
This ensures `passwd` will default to yescrypt for newly generated
passwords.
2023-03-13 07:54:27 +01:00
Sergei Trofimovich
22b935ace8
Merge pull request #219683 from symphorien/separatedebuginfo_static
separate-debug-info.sh: succeed when output only contains static libs
2023-03-12 17:02:03 +00:00
github-actions[bot]
681b1c28a4
Merge staging-next into staging 2023-03-12 12:02:07 +00:00
Guillaume Girol
94c7bf576a separate-debug-info.sh: succeed when output does not contain elf files
Currently, separate-debug-info adds a debug output, and the build fail when it is
not created. the output is only created when at least one elf file is
stripped.
As a result, adding separateDebugInfo = true on a lib will break the
static build (unless the lib also contains an executable). In order to
not have to remember to add an exception every time, let's just create
the debug output unconditionally.
2023-03-12 12:00:00 +00: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
Artturi
3b7e0ed336
Merge pull request #219182 from Artturin/multipleoutputsshdirnotempty 2023-03-10 23:46:23 +02:00
github-actions[bot]
96de0eded6
Merge staging-next into staging 2023-03-09 00:02:57 +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]
6e1026530b
Merge staging-next into staging 2023-03-08 18:02:07 +00: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]
aa83bbfbd1
Merge staging-next into staging 2023-03-08 00:03:09 +00: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
github-actions[bot]
4bfbd859a1
Merge staging-next into staging 2023-03-06 18:01:40 +00: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
Robert Hensing
15ce0d4069
Merge pull request #218407 from hercules-ci/issue-218011
[staging] Fix regression 218011, output named `var`
2023-03-06 00:43:55 +01:00
Artturin
9c72ea8725 multiple-outputs.sh: silence 'rmdir: failed to remove ... Directory not empty'
++ rmdir /nix/store/6f233lsgbqv87w4nmzpsdaydwhyapps6-at-spi2-core-aarch64-unknown-linux-gnu-2.46.0/lib
rmdir: failed to remove '/nix/store/6f233lsgbqv87w4nmzpsdaydwhyapps6-at-spi2-core-aarch64-unknown-linux-gnu-2.46.0/lib': Directory not empty
2023-03-04 14:43:38 +02: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