Commit graph

433 commits

Author SHA1 Message Date
Yureka 8647006492
rustPlatform.importCargoLock: pass allRefs to builtins.fetchGit (#211298) 2023-01-18 01:57:36 +01:00
Mateusz Kowalczyk 22770e2381 buildRustCrate: fixup integration test mod name
Fixes #204051. I have tried this on the reproducer stated in the ticket.

```
[nix-develop]$ $(nix-build  -I nixpkgs=/home/shana/programming/nixpkgs --no-out-link)/tests/foo

running 1 test
test check_module_name ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
```
2023-01-14 14:18:09 -05:00
github-actions[bot] 49722fd14a
Merge master into staging-next 2023-01-13 18:01:34 +00:00
Adam Joseph 9297b5382f
default-crate-overrides.nix: add graphene-sys 2023-01-13 16:43:39 +00:00
Adam Joseph e40de94c42 default-crate-overrides: add pkg-config to evdev-sys 2023-01-13 16:31:15 +00:00
Adam Joseph 62d571148a default-crate-overrides: servo-fontconfig-sys needs fontconfig 2023-01-13 16:18:27 +00:00
figsoda b9259df616 rustPlatform.buildRustPackage: fix cross compiling auditable packages 2023-01-12 12:22:59 -05:00
Martin Weinelt c1e6c6af69 Merge remote-tracking branch 'origin/master' into staging-next 2023-01-11 03:51:33 +01:00
Artturi 27c1ec2ecf
Merge pull request #209816 from Artturin/deprecate-top-level-platform-aliases 2023-01-09 22:15:50 +02:00
Artturin 2eeb34c273 treewide: {build,host,target}Platform -> stdenv.{build,host,target}Platform 2023-01-09 21:13:22 +02:00
github-actions[bot] b60b0a223e
Merge master into staging-next 2023-01-08 06:01:06 +00:00
Nick Cao 46ee37ca1d rustPlatform.bindgenHook: use the same clang/libclang as rustc 2023-01-08 15:22:04 +10:00
figsoda 45fc1f185f rustPlatform.fetchCargoTarball: default outputHashAlgo to sha256 2023-01-07 17:53:21 -05:00
Winter 8442601c64 rust: fix on aarch64-linux by using GCC 11 and passing -lgcc
This change switches to using GCC 11 by default on aarch64-linux, as well as passing `-lgcc` to the linker, per #201485.

See #201254 and #208412 for wider context on the issue.
2023-01-04 18:15:20 -05:00
Sergei Trofimovich 092d57c076 Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
    pkgs/development/tools/language-servers/ansible-language-server/default.nix
2022-12-28 09:35:37 +00:00
Artturi f93a244d7c
Merge pull request #190613 from amjoseph-nixpkgs/pr/build-rust-crate/atk 2022-12-27 19:49:40 +02:00
Artturi c584919520
Merge pull request #190614 from amjoseph-nixpkgs/pr/build-rust-crate/pangocairo 2022-12-27 19:48:23 +02:00
Artturi 3cb4b5cac4
Merge pull request #190603 from amjoseph-nixpkgs/pr/build-rust-crate/g_k4 2022-12-27 19:37:35 +02:00
Adam Joseph b1a9bf530c
default-crate-overrides.nix: add pango-sys (#190604) 2022-12-27 19:36:30 +02:00
Artturi 88eb7d5d3f
Merge pull request #186761 from amjoseph-nixpkgs/pr/rust/default-crate-overrides/fix 2022-12-27 19:35:06 +02:00
Artturi c1deac22a5
Merge pull request #190602 from amjoseph-nixpkgs/pr/build-rust-crate/cairo-sys-rs 2022-12-27 19:32:13 +02:00
Atemu 3eec3c8fed buildRustPackage: remove git from nativeBuildInputs
Having git in nativeBuildInputs causes thousands of rebuilds when git is touched
because every derivation that somehow transiently depends on a rust package will
change. See https://github.com/NixOS/nixpkgs/pull/205682 for instance.

AFAICT git is unused. Only the fetcher needs git which it has already.

Fixes https://github.com/NixOS/nixpkgs/issues/205804
2022-12-27 18:37:21 +10:00
figsoda b6c0e7f563
Merge pull request #205935 from figsoda/cargo-lock
rustPlatform.importCargoLock: add allowBuiltinFetchGit option
2022-12-25 19:38:36 -05:00
figsoda ca370da6d3
Merge pull request #206270 from figsoda/rustc
rustc: 1.65.0 -> 1.66.0
2022-12-23 18:09:56 -05:00
Winter b1834a461e Revert "rustc: propagate libiconv on darwin"
This reverts commit b6fc00b8f4.

Rust 1.66.0 contains a fix for libiconv being linked unconditionally on macOS, but this only applies to packages that don't depend on older versions of `libc`.

For now, let's go back to including libiconv in `buildInputs` by default for packages that use `buildRustPackage`. As packages bump their `libc` versions, we can eventually stop including it by default, and manually add it where needed.
2022-12-23 13:55:46 -05:00
github-actions[bot] dc7ebb0163
Merge staging-next into staging 2022-12-18 18:01:41 +00:00
figsoda ec8cb34358 treewide: fix typos 2022-12-17 19:39:44 -05:00
Vladimír Čunát 59a68f487d
Merge branch 'staging-next' into staging 2022-12-16 11:20:50 +01:00
Artturin 05a2dfd674 lib.replaceChars: warn about being a deprecated alias
replaceStrings has been in nix since 2015(nix 1.10)

so it is safe to remove the fallback

d6d5885c15
2022-12-15 22:25:51 +02:00
figsoda cce3dc63a0 rustPlatform.importCargoLock: add allowBuiltinFetchGit option 2022-12-13 11:27:26 -05:00
figsoda cfc6213879
Merge pull request #204686 from figsoda/auditable
rustPlatform.buildRustPackage: build auditable binaries
2022-12-09 16:46:45 -05:00
figsoda a6137b73f9 cargo-auditable-cargo-wrapper: init 2022-12-07 00:23:43 -05:00
John Ericson 8890f3b893
Merge pull request #203766 from obsidiansystems/build-rust-crate-link-flags
buildRustCrate: Support `cargo:rustc-link-arg` and some friends from build.rs
2022-12-06 21:48:07 -05:00
figsoda 0e5137f267 rustPlatform.buildRustPackage: make it not auditable by default 2022-12-05 18:46:00 -05:00
figsoda ff93685724
Merge pull request #199371 from figsoda/fetchCrate
fetchCrate: rewrite in terms of fetchzip
2022-12-05 18:15:33 -05:00
figsoda 8a041c63c0 rustPlatform.buildRustPackage: build auditable binaries 2022-12-05 16:18:17 -05:00
Sandro 4484c12d81
Merge pull request #196449 from natto1784/crate-overrides 2022-12-05 22:00:51 +01:00
John Ericson fde3b57055 buildRustCrate: Support cargo:rustc-link-arg and some friends from build.rs
See https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-link-argfor details. We are supporting:

 - `cargo:rustc-link-arg`
 - `cargo:rustc-link-arg-bins`
 - `cargo:rustc-link-arg-lib`

at this time.

`cargo:rustc-link-arg-bin` is left as future work because the per-binary
flag keeping is more difficult.
2022-11-30 11:40:50 -05:00
figsoda d3eb606296 rustPlatform.buildRustPackage: add useNextest option to check with cargo-nextest 2022-11-28 17:00:17 -05:00
figsoda 0643540f97 rustPlatform.cargoNextestHook: init 2022-11-28 16:59:52 -05:00
figsoda 82fe76d1cd carnix,cratesIO: remove 2022-11-22 14:10:25 -05:00
Artturin 341e6fd558 splice.nix: start deprecating nativeDrv and crossDrv 2022-11-19 00:04:54 +02:00
Aaron Andersen adbe2f532c
Merge pull request #199300 from Fuuzetsu/escape-rust-exports
rustBuildCrate: properly handle cargo env pragmas with spaces
2022-11-16 07:15:25 -05:00
github-actions[bot] 020ea91183
Merge master into staging-next 2022-11-10 00:02:27 +00:00
John Ericson e94d54dd86 build-support/rust/lib: Add toTargetFamily
Taken from https://github.com/kolloch/crate2nix/pull/255/files, it
belongs in Nixpkgs not crate2nix.

I have been using that P.R. for a few months without incident.
2022-11-09 15:52:01 -05:00
figsoda 9508a4ac68 fetchCrate: rewrite in terms of fetchzip 2022-11-03 12:33:27 -04:00
Mateusz Kowalczyk 233205c464
rustBuildCrate: properly handle cargo env pragmas with spaces
There are two problems: first that we end up splitting on spaces in the
loop. Even when that is fixed, we still would split on spaces in the
`export` inside the loop. We need to guard against both.

Fixes #199298

Confirmed that it fixes the case mentioned in the ticket:

```console
[nix-develop]$ $(nix-build -I nixpkgs=/home/shana/programming/nixpkgs Cargo.nix -A rootCrate.build  --no-out-link)/bin/nix-rustc-env-escape-repro
Expecting three words, got: first second third
```

I think this is going to cause a rebuild of every Rust package even if
they were unaffected, not much we can do here.
2022-11-03 14:49:24 +09:00
Yureka c2eaaae50d cargoSetupHook: pass host config flags 2022-10-30 18:55:47 +01:00
Amneesh Singh 74de121572
default-crate-overrides: add alsa-lib for alsa-sys crate
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-10-18 00:03:14 +05:30
Vladimír Čunát 6565abc264
Merge branch 'master' into staging-next 2022-10-08 10:20:07 +02:00