Commit Graph

18 Commits

Author SHA1 Message Date
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
a7146b0440
flake: deprecate crane.lib.${system} (#617) 2024-05-19 01:07:07 +00:00
Ivan Petkov
85e31d408a
examples: avoid re-instantiating nixpkgs where possible (#460)
* i.e. if we neither set localSystem/crossSystem, nor add overlays, we
  can directly utilize `nixpkgs.legacyPackages.${system}` directly and
  avoid re-evaluating nixpkgs an additional time
2023-11-26 18:37:43 +00:00
Ivan Petkov
d4bddd0a8c
chore: update all examples with strictDeps = true; (#430) 2023-10-15 22:25:34 +00:00
Rebecca Turner
7b92b595c9
Add devshell helper (#378) 2023-09-03 10:33:10 -07:00
Ivan Petkov
a0d1df4631
Fix alt-registry example (#343)
* crates.io uses the sparse registry by default, and trying to
  explicitly register a sparse registry for it results in errors
* Also set nixConfig to include binary cache
2023-06-18 23:16:45 +00:00
James Baker
75f7d715f8
Natively support sparse registries (#324)
With Cargo 1.68.0, sparse registries were made stable. With sparse
registries, index metadata is stored in an HTTP api rather than in
a git repository.

As relevant to Crane, the relevant changes are mostly that registries
do not always start with `registry+` and mostly start with `registry+`
or `sparse+` depending on whether the registry is sparse or not.

This PR adjusts the core of Crane to differentiate between `registry`
and `sparse`, and adds a new sparse registry factory to make things
easy.

---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-06-13 02:03:18 +00:00
Ivan Petkov
6fd78bc66a
Add path as a convenience wrapper around builtins.path (#273) 2023-03-19 20:57:15 -07:00
Ivan Petkov
685e7494b0
examples: correctly propagate devShell inputs from checks (#255) 2023-02-26 00:08:09 +00:00
Ivan Petkov
e80de1e74a
Allow passing arbitrary fetchurl args per registry (#168)
Co-authored-by: Amos Wenger <amoswenger@gmail.com>
2022-11-20 16:22:13 -08:00
Ivan Petkov
acbb22591c
ci: enable building examples with macOS (#170) 2022-11-19 16:08:15 -08:00
Ivan Petkov
1428f3ae64
Update flake deps (#121) 2022-09-26 21:52:38 -07:00
Ivan Petkov
c12fec0a8b
Add cleanCargoSource and filterCargoSources (#110) 2022-09-21 01:27:47 +00:00
Ivan Petkov
57825c24da
Update all flake attributes to follow the new .default format 2022-06-01 17:09:29 -07:00
Ivan Petkov
e45196b9f4
Update examples to use {app,package}.default pattern 2022-04-27 19:23:30 -07:00
Ivan Petkov
d3efda535f
Remove superfluous follows declaration for flake-utils 2022-04-27 18:10:22 -07:00
Ivan Petkov
492076c765 Rename registryFromGitIndex input to indexUrl for consistency 2022-01-30 23:58:56 +00:00
Ivan Petkov
4adc828133 Add example for using an alternative cargo registry 2022-01-30 23:58:56 +00:00