Commit Graph

189 Commits

Author SHA1 Message Date
Ivan Petkov
af693bf608
buildPackage: do not add jq to nativeBuildInputs (#685)
Doing so ends up resulting in PKG_CONFIG_PATH changing which may result
in various `*-sys` crates needing to be rebuilt
2024-08-22 16:24:53 -07:00
Ivan Petkov
3f50200286
Update CHANGELOG 2024-08-22 16:02:43 -07:00
Nils Harbke
4c6c77920b
Fix positioning of cargoExtraArgs in craneLib.cargoNextest (#678)
Both `cargo nextest run` and `cargo llvm-cov` do not place any cargo
options/flags right behind `cargo <HERE> ...`. All cargo related flags
can be added to the `cargoNextestExtraArgs` attribute. [Issue #675]

After altering `checkPhaseCargoCommand` to use one of two explicit
command strings inside if/else blocks, it is no longer necessary to
default `cmd` to an empty value when `withLlvmCov` is set to `true`.

---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2024-08-06 09:07:59 -07:00
Simon Žlender
c873fd2ad8
Fix deeply nested registries (#676)
---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2024-08-04 22:10:51 +00:00
Ivan Petkov
0aed560c5c
Update CHANGELOG 2024-07-05 17:41:47 -07:00
Simon Žlender
aa5dcd0518
Splice overrideToolchain (#652)
---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2024-06-29 11:29:52 -07:00
Ivan Petkov
0095fd8ea0
removeReferencesToVendoredSources: handle cargoVendorDir not pointing to store (#646) 2024-06-15 17:55:13 +00:00
Ivan Petkov
a3f0c63eed
Try to avoid IFD in vendorCargoDeps and crateNameFromCargoToml; also avoid recommending nesting cleanCargoSource and path (#641)
We don't need to nest `cleanCargoSource` and `path` just to populate a
default value for `name`. As they both ultimately delegate to
`builtins.path`, the nesting can lead to IFD in situations which are
otherwise avoidable
2024-06-10 20:53:46 -07:00
Ivan Petkov
a21d14679f
Update cross compile example (#638)
* Sometimes we also need to set the TARGET_CC environment variable to
  allow cross compiling crates which also need to build a program to run
  on the build platform itself
2024-06-09 01:15:24 +00:00
Ivan Petkov
ad21f86e47
Drop support for nixpkgs-23.11 (#635) 2024-06-02 20:52:54 -07:00
Ivan Petkov
b65673fce9
Update CHANGELOG 2024-06-02 20:02:20 -07:00
Rebecca Turner
480dff0be0
Fix xargs signIfRequired (#631)
`signIfRequired` is a shell function, not an executable, so we can't
call it with `xargs`.

---------
Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2024-05-29 23:24:23 +00:00
Ivan Petkov
19ca94ec2d
Update CHANGELOG 2024-05-26 10:49:12 -07:00
Ivan Petkov
35bc915249
cleanCargoToml: also clean variants using underscores (#626) 2024-05-26 17:41:17 +00:00
Ivan Petkov
701dbc191c
removeReferencesToVendoredSources: cache vendorDir crawling (#625)
There is no reason to repeatedly crawl the vendor directories for each
installed file, we can easily cache the results once up front.
2024-05-25 23:45:24 +00:00
Ivan Petkov
7443df1c47
Update CHANGELOG 2024-05-19 15:00:51 -07:00
Ivan Petkov
b7a1655564
Fix crate vendoring to not run the default fixup phase (#619) 2024-05-19 21:59:49 +00:00
Ivan Petkov
a4e51f5755
Update CHANGELOG 2024-05-18 18:07:34 -07:00
Ivan Petkov
a7146b0440
flake: deprecate crane.lib.${system} (#617) 2024-05-19 01:07:07 +00:00
Ivan Petkov
5b0b062ff0
buildTrunkPackage: disable version checks by default (#616) 2024-05-19 00:06:59 +00:00
Ivan Petkov
54fe6fed44
vendorCargoDeps: allow arbitrary overrides when vendoring sources (#615) 2024-05-18 23:39:46 +00:00
Ivan Petkov
33d5862dbb
crateNameFromCargoToml: support selecting a name from metadata (#606) 2024-05-04 19:36:42 +00:00
x10an14
23c2d75556
cargoDoc: support docInstallRoot to influence installation behavior (#603)
---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2024-05-04 17:49:24 +00:00
Jean
cd1bb8fb22
Remove cargoExtraArgs from cargoAudit (#602)
---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2024-05-04 17:20:06 +00:00
Ivan Petkov
c5ee4371ee
Update CHANGELOG 2024-05-04 10:07:24 -07:00
Ivan Petkov
276437b6bc
Update CHANGELOG 2024-05-04 10:06:45 -07:00
Ivan Petkov
d707d41f53
Update CHANGELOG 2024-05-04 10:02:30 -07:00
Ivan
3dda6d40ca
Fix bug with comment for inline table key (#583)
---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2024-04-21 04:19:57 +00:00
Ivan Petkov
9caad1eb0c
Update CHANGELOG 2024-04-07 11:11:57 -07:00
Ivan Petkov
b47c4078b0
vendorCargoDeps: handle unused patch dependencies (#581) 2024-04-07 10:45:14 -07:00
Ivan Petkov
ada0fb4dcc
Add a warning if an unsupported version of nixpkgs is used (#571) 2024-03-29 03:09:12 +00:00
Ivan Petkov
270c7d60d3
inheritCargoArtifactsHook: correctly handle nested CARGO_TARGET_DIR (#561) 2024-03-22 23:32:09 +00:00
Ivan Petkov
55187a8218
cargoNextest: support withLlvmCov (#560)
* This adds a convenience method of running `nextest` within `cargo
  llvm-cov` without having to wire up the internal details manually
2024-03-22 22:39:45 +00:00
Ivan Petkov
5bace74e9a
chore: update CHANGELOG 2024-03-19 15:17:23 -07:00
Ivan Petkov
f1dabc4aba
crateRegistries: use crates.io's CDN to download sources (#548)
https://blog.rust-lang.org/2024/03/11/crates-io-download-changes.html
2024-03-19 14:55:28 -07:00
greaka
81c393c776
fix: allow registries in vendorMultipleCargoDeps as documented (#540)
---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2024-03-05 03:53:19 +00:00
Ivan Petkov
03d6232188
Update CHANGELOG 2024-02-21 16:01:51 -08:00
Ivan Petkov
f23ae17543
crane-utils: fix workspace dependency merge when it is not a table (#529) 2024-02-21 16:00:58 -08:00
Ivan Petkov
c7bb4ed1f3
cleanCargoToml: strip out [lints] definitions when cleaning (#516) 2024-02-08 03:34:33 +00:00
Ivan Petkov
fe812ef0da
chore: Update CHANGELOG 2024-01-28 12:21:37 -08:00
Ivan Petkov
960d350770
vendorCargoDeps: manually splice packages to avoid cross build issues (#507)
* Source vendoring is passed as a standalone attribute to
  `mkCargoDerivation`, meaning it does not automagically get spliced
  with the correct local/cross system inputs (i.e. what would happen if
  it was a `depsBuildBuild` entry)
* To fix this we need to make sure that `vendorCargoDeps` and all of its
  transitive dependencies always use `runCommand` (and friends) from
  their `pkgsBuildBuild` equivalent. This should always be safe to do
  (even for cross-builds) since this amounts to building up a bunch of
  sources which will be read by the build system
* Unfortunately I had to manually specify `pkgsBuildBuild.whatever` in
  multiple places as I could not get things to work by messing with the
  `callPackage` definition. Perhaps we should be using
  `makeScopeWithSplicing'` instead of `makeScope` when constructing the
  library, but I couldn't get it working (and I couldn't find any decent
  docs on how to use it online) so this will make do for the time being.
2024-01-28 19:08:44 +00:00
Charles Hall
0327ca9d77
force buildDepsOnly to produce out only (#493)
This allows multi-output derivations using e.g. `buildPackage` to work.
Without this change, they fail to build because Nix thinks
`buildDepsOnly` is supposed to produce mulitple outputs too, but it
doesn't.

---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2024-01-27 17:52:30 +00:00
Adam Curtis
751290c945
fix: add #[allow(unused_extern_crates)] to dummy.rs (#501) 2024-01-27 02:36:30 +00:00
Ivan Petkov
8f515142e8
chore: Update CHANGELOG 2024-01-18 16:55:27 -08:00
Leonardo Eugênio
2a5136f14a
buildTrunkPackage: Add "wasm-bindgen-cli" argument (#363) 2023-12-20 08:24:53 -08:00
Roman Volosatovs
33dbb6a834
feat: support workspace lints (#481)
---------

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-12-13 17:22:10 +00:00
Ivan Petkov
8b9bad9b30
chore: drop compatibility for nixpkgs-23.05 (#471) 2023-11-30 23:25:25 +00:00
Ivan Petkov
07c531adf5
Update CHANGELOG 2023-11-30 14:48:56 -08:00
Ivan Petkov
c53a8c071d
buildDepsOnly: pass --no-run to cargo test by default (#470) 2023-11-30 00:43:47 +00:00
danjl1100
faf6a81da1
buildTrunkPackage - separately export and declare shell variables (SC2155) (#458)
---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-11-26 18:28:14 +00:00