Commit Graph

379 Commits

Author SHA1 Message Date
Ivan Petkov
7f2824d555
Add cross compilation example with rust-overlay 2022-02-15 18:42:59 -08:00
Ivan Petkov
5c8e7f732f
Fix callPackage scopes for build hooks so cross compiling works
* Previously all build hooks were instantiated in a single
  `callPackages` call which led to several issues:
  - changes via `lib.overrideScope'` were ignored because the build
    hooks were only ever instantiated with the nixpkgs instance of our
    flake (not whatever overlays the caller may have made)
  - the pkgs splicing was not done quite right, meaning when we pull in
    the build hooks as nativeBuildInputs the splicing wasn't picking up
    the overridden versions of `cargo` but was instead trying to
    recompile the nixpkgs version each time
2022-02-14 18:31:45 -08:00
Ivan Petkov
0444351677
Add the alt-registry example as a template 2022-02-15 18:43:49 -08:00
Ivan Petkov
fc7a94f841
Merge pull request #11 from ipetkov/abs-path-error
Form paths by concatenating a string suffix not a path
2022-02-13 20:56:39 +00:00
Ivan Petkov
78359792ae
Form paths by concatenating a string suffix not a path
* Seems like Nix can get unhappy if a path fragment is evaluated too
  eagerly, giving errors like
  `error: access to absolute path '/Cargo.toml' is forbidden in pure eval mode (use '--impure' to override)`
* Changing to using string manipulation seems to resolve the issue
2022-02-13 12:50:43 -08:00
Ivan Petkov
9ea3e03efe
Merge pull request #9 from ipetkov/install-by-default
`cargoClippy` and `cargoTarpaulin`: change behavior to install cargo artifacts by default
2022-02-13 17:52:39 +00:00
Ivan Petkov
310ecfe831
Update changelog 2022-02-13 09:49:03 -08:00
Ivan Petkov
a56b6d1c56
cargoTarpaulin: change behavior to install cargo artifacts by default
* This allows potentially chaining `cargoTarpaulin` invocations with other
  derivations
2022-02-13 09:36:31 -08:00
Ivan Petkov
3024283855
cargoClippy: change behavior to install cargo artifacts by default
* This allows potentially chaining `cargoClippy` invocations with other
  derivations
2022-02-13 09:34:26 -08:00
Ivan Petkov
47d47ef5b5
Update changelog and readme 2022-02-11 20:34:44 -08:00
Ivan Petkov
c4ca8704b9
Merge pull request #7 from ipetkov/git-deps
Add support for git dependencies
2022-02-12 04:32:40 +00:00
Ivan Petkov
a9b6806931
ci: don't run twice on push to PR 2022-02-11 19:59:46 -08:00
Ivan Petkov
5fb04403a1
Update changelog 2022-02-11 19:33:17 -08:00
Ivan Petkov
2c61273666
Merge pull request #8 from ipetkov/fmt
cargoFmt: change behavior to install cargo artifacts by default
2022-02-12 03:31:18 +00:00
Ivan Petkov
90d5ad84c4
cargoFmt: change behavior to install cargo artifacts by default
* This allows potentially chaining `cargoFmt` invocations with other
  derivations
2022-02-10 21:02:48 -08:00
Ivan Petkov
472d7ffc99
Handle case where a git repo contains multiple crates 2022-02-10 20:32:31 -08:00
Ivan Petkov
e2c665091e
Add test that source prefix remapping works 2022-02-09 20:54:56 -08:00
Ivan Petkov
469f4a5fde
Fix git dependency handling of overlapping repos 2022-02-09 20:22:07 -08:00
Ivan Petkov
01250417c6
Merge pull request #5 from lovesegfault/fix-zstd-cross-cc
fix(pkgs): use zstd from pkgsBuildBuild
2022-02-09 04:52:54 +00:00
Bernardo Meurer
91c9a89625
fix(pkgs): use zstd from pkgsBuildBuild
This allows for crane to work when `buildPlatform != hostPlatform`, such
as well `crossSystem` is set.
2022-02-08 18:23:55 -08:00
Ivan Petkov
5afc3e94fd
Update readme to hint that buildInputs can be set directly 2022-02-08 16:18:12 -08:00
Ivan Petkov
ca73fc5305
Add support for git dependencies 2022-02-07 20:03:12 -08:00
Ivan Petkov
f0612a9940
configureCargoVendoredDepsHook: tweak logging
* Make it more obvious exactly which file is being used for vendoring
  (when a manifest is found) instead of just printing out the parent
  directory
2022-02-06 17:17:47 -08:00
Ivan Petkov
1ab0cad98c
Split out registry vendoring to vendorCargoRegistries 2022-02-06 17:16:49 -08:00
Ivan Petkov
36c1236333
Merge pull request #2 from ipetkov/cleanup
Misc cleanup and updates
2022-01-31 00:33:22 +00:00
Ivan Petkov
07f9676194
Add a CHANGELOG and document the compatibility policy 2022-01-30 16:26:55 -08:00
Ivan Petkov
d4b5f8abe6
chore: switch to runCommandLocal to reduce network pressure 2022-01-30 16:10:41 -08:00
Ivan Petkov
79f0ddaebd
flake.lock: Update
Flake lock file changes:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/787ced6423cbfd130471aaf0a5e66ca3fd3e6af0' (2022-01-21)
  → 'github:NixOS/nixpkgs/5efc8ca954272c4376ac929f4c5ffefcc20551d5' (2022-01-28)
2022-01-30 16:09:29 -08:00
Ivan Petkov
5dca7b9493
chore: bump cargo locked versions 2022-01-30 16:09:21 -08: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
Ivan Petkov
715c8731c3 Add regression test for manually vendored dependencies 2022-01-30 23:58:56 +00:00
Ivan Petkov
47fbae6dc3 Add support for alternative cargo registries 2022-01-30 23:58:56 +00:00
Ivan Petkov
5e44613211 Make crate downloads aware of alternative registries 2022-01-30 23:58:56 +00:00
Ivan Petkov
5bae4b91c1 Optimize searching for cargo configuration files
* Rather than recursively look up all paths in a given project and then
  filtering for cargo-specific files, we now use our own customized
  traversal method to only capture the results we want.
2022-01-30 23:58:56 +00:00
Ivan Petkov
4a2dd7388c
Reword some potentially misleading claims 2022-01-23 14:52:16 -08:00
Ivan Petkov
55b3f63d78
Minor README tweak 2022-01-22 13:36:41 -08:00
Ivan Petkov
d50701ba5a
flake.lock: Update
Flake lock file changes:

• Updated input 'flake-compat':
    'github:edolstra/flake-compat/12c64ca55c1014cdc1b16ed5a804aa8576601ff2' (2021-08-02)
  → 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/0c408a087b4751c887e463e3848512c12017be25' (2021-12-23)
  → 'github:NixOS/nixpkgs/787ced6423cbfd130471aaf0a5e66ca3fd3e6af0' (2022-01-21)
• Updated input 'utils':
    'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28)
  → 'github:numtide/flake-utils/846b2ae0fc4cc943637d3d1def4454213e203cba' (2022-01-20)
2022-01-22 11:47:44 -08:00
Ivan Petkov
6e168778db
Minor README rewording 2022-01-22 11:47:18 -08:00
Ivan Petkov
09049b0ce3
Fix template tests 2022-01-22 10:21:08 -08:00
Ivan Petkov
cc7c158ca1
Add a README in the examples directory 2022-01-22 10:17:05 -08:00
Ivan Petkov
8c63723ea0
Update README with a more in-depth philosophy discussion 2022-01-18 20:51:11 -08:00
Ivan Petkov
9ce8929770
Add LICENSE 2022-01-17 15:05:45 -08:00
Ivan Petkov
89eb07f68e
Fix typo 2022-01-17 15:01:58 -08:00
Ivan Petkov
282a3b502a
Add README 2022-01-17 15:01:21 -08:00
Ivan Petkov
67c680b5dc
Move API docs to their own file 2022-01-17 13:56:03 -08:00
Ivan Petkov
405c9cb8cf
Update quick-start template with cargoFmt and cargoTarpaulin 2022-01-17 13:06:11 -08:00
Ivan Petkov
8f6b608ca1
Inline Cargo.{toml,lock} checks in buildDepsOnly 2022-01-16 18:24:13 -08:00
Ivan Petkov
aeb598b174
Add cargoTarpaulin 2022-01-16 18:16:21 -08:00
Ivan Petkov
438154f265
Add cargoFmt 2022-01-16 17:49:39 -08:00