Ivan Petkov
b70e77d2e2
Update flake.lock ( #155 )
...
flake.lock: Update
Flake lock file updates:
• Updated input 'flake-utils':
'github:numtide/flake-utils/c0e246b9b83f637f4681389ecabcb2681b4f3af0' (2022-08-07)
→ 'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/31acb601e388eb7d552f137dbe5cb4677fdf1c3c' (2022-10-22)
→ 'github:NixOS/nixpkgs/ef2f213d9659a274985778bff4ca322f3ef3ac68' (2022-11-01)
• Updated input 'rust-overlay':
'github:oxalica/rust-overlay/af2e939ba2c7cbb188d06d6650c6353b10b3f2be' (2022-10-23)
→ 'github:oxalica/rust-overlay/cf668f737ac986c0a89e83b6b2e3c5ddbd8cf33b' (2022-11-03)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-03 17:40:39 -07:00
dependabot[bot]
0ac39916b3
chore(deps): bump cachix/cachix-action from 11 to 12 ( #152 )
2022-11-01 19:31:00 -07:00
Ivan Petkov
ee00efb961
registryFromGitIndex: use shallow git checkouts ( #151 )
2022-10-29 18:56:41 +00:00
Ivan Petkov
975bda728a
Change default cargo artifact installation to use symlinks where possible ( #150 )
...
* Define a new installation mode which symlinks identical artifacts
against a directory of previously generated ones
* This allows for linear space usage in the Nix store across many
chained derivations (as opposed to using a zstd compressed tarball
which uses quadratic space across many chained derivations)
* This new installation mode is the new default for all cargo based
builds. The previous behavior is still available by setting
`installCargoArtifactsMode = "use-zstd";` on a derivation
* `buildPackage` will continue to use zstd compressed tarballs while
building dependencies (unless either of `cargoArtifacts` or
`installCargoArtifactsMode` is defined, in which case they will be
honored)
2022-10-29 18:48:29 +00:00
Ivan Petkov
f48777a966
Update CHANGELOG
2022-10-29 10:20:03 -07:00
Ivan Petkov
2ce1a3313e
Eliminate dead code ( #148 )
2022-10-23 23:20:22 +00:00
Ivan Petkov
6b864957e1
checks: add tests for building crates using workspace inheritance ( #147 )
2022-10-23 22:56:18 +00:00
Ivan Petkov
bdea451966
Update flake.lock ( #146 )
...
flake.lock: Update
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/ff9793cfd1a25145a7e591af604675b3d6f68987' (2022-09-26)
→ 'github:NixOS/nixpkgs/31acb601e388eb7d552f137dbe5cb4677fdf1c3c' (2022-10-22)
• Updated input 'rust-overlay':
'github:oxalica/rust-overlay/8643439d1db65a33ca6813d0aa8956b2be4bd91d' (2022-10-18)
→ 'github:oxalica/rust-overlay/af2e939ba2c7cbb188d06d6650c6353b10b3f2be' (2022-10-23)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-23 22:04:20 +00:00
Ivan Petkov
4d6f74978e
ci: disable automatic approval for flake update workflow
2022-10-23 14:42:23 -07:00
Ivan Petkov
af1da2f271
ci: rewrite flake update workflow
...
* Rewrite the workflow to open (and then immediately approve) a PR with
the flake updates, allowing the rest of the branch protection rules
(i.e. running the test suite) to be applied before merging
2022-10-23 14:20:57 -07:00
Ivan Petkov
eadc11533b
ci: schedule periodic flake updates
2022-10-21 17:36:43 -07:00
Ivan Petkov
a7e27ff425
ci: actually update the flake
2022-10-20 21:07:16 -07:00
Ivan Petkov
9ed120ca50
ci: move test logic into a script
2022-10-20 21:05:09 -07:00
Ivan Petkov
9c16d69328
ci: allow test workflow to be called
2022-10-20 17:58:03 -07:00
Ivan Petkov
77dcc1315f
ci: update workflow
2022-10-19 21:06:08 -07:00
Ivan Petkov
e98f7263f4
ci: Add workflow for updating flake dependencies
2022-10-19 21:01:43 -07:00
Roman Volosatovs
097afacc53
mkDummySrc: support freestanding targets ( #126 )
...
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2022-10-19 02:13:38 +00:00
Ivan Petkov
1bea2b5212
crateNameFromCargoToml: handle workspace inheritance ( #144 )
2022-10-16 17:12:31 +00:00
Ivan Petkov
d78cb0453b
cargoBuild: do not run tests
2022-10-09 12:56:21 -10:00
Ivan Petkov
b84c191b59
buildDepsOnly: accept cargo{Check,Test}ExtraArgs
2022-10-09 12:56:21 -10:00
Ivan Petkov
17f4ff6ad7
buildPackage: use mkCargoDerivation instead of cargoBuild
2022-10-09 12:56:21 -10:00
Ivan Petkov
f27d6dd45d
cargoTarpaulin: require that cargoArtifacts
are specified
2022-10-09 11:33:57 -10:00
Ivan Petkov
1020bbe7dd
Remove deprecated package
bindings
2022-10-09 11:33:57 -10:00
Ivan Petkov
f2a92d6010
Update CHANGELOG
2022-10-09 14:08:50 -07:00
Ivan Petkov
a1e9a4197c
Fixup docs ( #133 )
2022-10-09 21:02:27 +00:00
Ivan Petkov
0b71f12fc7
Add cargoTest for running crate tests ( #132 )
2022-10-09 21:00:17 +00:00
Ivan Petkov
1127ed2587
cargoNextest: use mkCargoDerivation instead of cargoBuild
2022-10-09 09:40:53 -10:00
Ivan Petkov
2b70a82caf
cargoClippy: use mkCargoDerivation instead of cargoBuild
2022-10-09 09:40:53 -10:00
Ivan Petkov
0ad37656bc
cargoTarpaulin: use mkCargoDerivation instead of cargoBuild
2022-10-09 09:40:53 -10:00
Ivan Petkov
8c97f06448
cargoAudit: use mkCargoDerivation instead of cargoBuild
2022-10-09 09:40:53 -10:00
Ivan Petkov
b61434b0b2
cargoDoc: use mkCargoDerivation instead of cargoBuild
2022-10-09 09:40:53 -10:00
Ivan Petkov
51bbfae3f6
cargoFmt: use mkCargoDerivation instead of cargoBuild
2022-10-09 09:40:53 -10:00
Ivan Petkov
cc7d69f1ed
mkCargoDerivation: default to empty checkPhaseCargoCommand
2022-10-09 09:40:53 -10:00
Ivan Petkov
d4a3bee75f
mkCargoDerivation: populate pname and version if not specified
2022-10-09 09:40:53 -10:00
Ivan Petkov
d3db2ecf01
mkCargoDerivation: automatically vendor deps if cargoVendorDir not set
2022-10-09 09:40:53 -10:00
Ivan Petkov
0017a8da68
flake: deprecate the packages
flake output ( #130 )
...
Even though the setup hooks can be thought of as "packages", it makes
things much more simple to access everything from the same place
2022-10-09 10:28:48 -07:00
Ivan Petkov
37def1e9c3
readme: update with advice on patching Cargo.lock ( #129 )
2022-10-09 02:10:13 +00:00
Ivan Petkov
fc545e6784
hooks: do not use substitutions for needed tools ( #128 )
...
* Using substitutions for build hooks is a great way to ensure the
necessary utility is present without making the caller supply it to
the builder, except it makes things confusing when applying overrides
* For example, the `installFromCargoBuildLog` hook was inadvertently
ignoring any `cargo` overrides applied to the entire `lib`
instantiation
* By removing all explicit substations we also side step the issue of
trying to select the correct build/host/target version of the tool and
use whatever is present in the build environment
2022-10-09 02:03:05 +00:00
Ivan Petkov
755acd231a
Update changelog
2022-09-28 17:54:49 -07:00
Ivan Petkov
22f971a126
mkDummySrc: fix handling of build scripts ( #122 )
...
* Instead of injecting our own dummy `build.rs` file, we will patch the
`Cargo.toml` files to specify a build script in the Nix store
* This allow cargo to notice the difference (i.e. changed build script
path) where it could not before (due to nix enforcing that all sources
always have the same timestamp)
2022-09-28 02:05:06 +00:00
Ivan Petkov
21e627606c
mkDummySrc: allow running a custom script after dummification is done ( #116 )
2022-09-27 06:25:09 +00:00
Ivan Petkov
1428f3ae64
Update flake deps ( #121 )
2022-09-26 21:52:38 -07:00
Ivan Petkov
06b1f7bd80
Improve stripping references to vendored sources ( #120 )
...
* Also add removeReferencesToVendoredSourcesHook
2022-09-24 23:45:56 +00:00
Ivan Petkov
c12fec0a8b
Add cleanCargoSource and filterCargoSources ( #110 )
2022-09-21 01:27:47 +00:00
Ivan Petkov
78f7d689fb
docs: fix typos ( #109 )
2022-09-20 01:08:24 +00:00
Ivan Petkov
4f691ac0ce
cargoDoc: add ability to run cargo doc
on a workspace ( #107 )
2022-09-20 01:05:43 +00:00
Ivan Petkov
352c7ff1b8
mkCargoDerivation: add default configurePhase
( #106 )
...
This is done to avoid breaking builds by including puts happen to have
setup-hooks which try to claim the configure phase (such as `cmake`).
The old behavior can be brought back by setting `configurePhase = null;`
on the derivation.
2022-09-18 01:18:03 +00:00
Ivan Petkov
ca294409f3
mkCargoDerivation: allow ergonomically overriding stdenv ( #101 )
2022-09-15 10:20:48 -07:00
Ivan Petkov
99c8438f51
cargoAudit: fix tests, config file goes in .cargo/audit.toml ( #100 )
2022-09-15 16:17:48 +00:00
Ivan Petkov
924250db18
cargoAudit: ensure audit.toml is kept when cleaning source ( #98 )
2022-09-15 00:44:40 +00:00