Commit Graph

14 Commits

Author SHA1 Message Date
Ivan Petkov
6f7504ad93
Drop dependency on nixpkgs (#692)
Callers should use `mkLib` with an instantiation of `pkgs` instead of
using `crane.lib.${system}` directly
2024-08-29 23:29:16 +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
a7146b0440
flake: deprecate crane.lib.${system} (#617) 2024-05-19 01:07:07 +00:00
Ivan Petkov
a329cd0039
docs: reword quickstart examples for existing projects (#569) 2024-03-28 00:38:23 +00:00
Ivan Petkov
c5c344ca3b
tests: disable alt-store test on Nix 2.21.0 (#556)
https://github.com/NixOS/nix/issues/10267
2024-03-19 03:20:09 +00:00
Ivan Petkov
418ec86477
mkDummySrc: fix cleaning to work with Nix store overrides (#448)
* Turns out if a build is invoked with `--store` then the source
  cleaning filter will observe paths rooted at the alternative store
  which breaks out previous string handling (and results in incorrectly
  ignoring files which should be included)
2023-11-05 18:32:24 +00:00
Ivan Petkov
61cfec4d84
chore: drop all public dependencies except for nixpkgs (#437) 2023-10-19 00:57:24 +00:00
Ivan Petkov
117ac48319
chore: update all test deps (#420) 2023-10-13 02:57:37 +00:00
Ivan Petkov
7e2e5b3cc1
chore: bump all Cargo.lock files (#230) 2023-02-07 23:47:42 +00:00
Ivan Petkov
00564437f3
Properly handle workspace inheritance in git dependencies (#224)
Crates from git repos are vendored in a flattened directory where each crate shows up at the root of the vendor directory. Since the vendoring step effectively breaks workspace structures, any crates which use workspace inheritance (e.g. package.version.workspace = true will fail to resolve.

To work around this we inspect the crate's workspace manifest (if it exists) and attempt to manually merge the values while copying the contents to the vendor directory.
2023-01-21 16:46:32 -08:00
Ivan Petkov
35fd8fcbb0
Run nixpkgs-fmt 2022-11-20 16:28:49 -08:00
Zhaofeng Li
2e24bc6591
downloadCargoPackageFromGit: Ignore crates with duplicate package IDs (#158)
For example, the Cargo git repo contains multiple "case" Cargo.toml
files in the testsuite. Let's ignore them like what Cargo does [1].

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2022-11-09 18:12:34 -08:00
Ivan Petkov
2ce1a3313e
Eliminate dead code (#148) 2022-10-23 23:20:22 +00:00
Ivan Petkov
e0fbad205b
Add extra tests for mkDummySrc inputs 2022-05-29 15:43:58 -07:00