mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'cargo-override' into 'master'
Cargo.nix override instead of requiring manual intervention See merge request veloren/veloren!1647
This commit is contained in:
commit
726cfcb8c9
@ -1,6 +0,0 @@
|
||||
Apply these instructions after generating the `Cargo.nix` file.
|
||||
|
||||
- Find `veloren-common` crate in `Cargo.nix`:
|
||||
- Comment the `optional = true;` line for "structopt" and "csv" dependencies.
|
||||
- See [this issue](https://github.com/kolloch/crate2nix/issues/129) on `crate2nix` repository for more info.
|
||||
- Note that the suggested workaround in the issue **does not** work for us.
|
@ -192,7 +192,6 @@ To update `Cargo.nix` (and `crate-hashes.json`) using latest `Cargo.lock`, run:
|
||||
```shell
|
||||
crate2nix generate -f ../Cargo.toml
|
||||
```
|
||||
Then follow the instructions in the `Cargo.nix_patches.md` file.
|
||||
|
||||
### Rust toolchain
|
||||
|
||||
|
@ -73,7 +73,16 @@ let
|
||||
callPackage ./Cargo.nix {
|
||||
defaultCrateOverrides = with common; with crateDeps;
|
||||
defaultCrateOverrides // {
|
||||
veloren-common = _: {
|
||||
veloren-common = oldAttrs: {
|
||||
# see: https://github.com/kolloch/crate2nix/issues/129
|
||||
dependencies =
|
||||
map
|
||||
(dep:
|
||||
if dep.name == "csv" || dep.name == "structopt"
|
||||
then builtins.removeAttrs dep [ "optional" ]
|
||||
else dep)
|
||||
oldAttrs.dependencies;
|
||||
|
||||
# Disable `git-lfs` check here since we check it ourselves
|
||||
# We have to include the command output here, otherwise Nix won't run it
|
||||
DISABLE_GIT_LFS_CHECK = utils.isGitLfsSetup common.gitLfsCheckFile;
|
||||
|
Loading…
Reference in New Issue
Block a user