diff --git a/nix/Cargo.nix b/nix/Cargo.nix index 9dcaf75a95..1a0719cbb5 100644 --- a/nix/Cargo.nix +++ b/nix/Cargo.nix @@ -14287,7 +14287,7 @@ rec { { name = "csv"; packageId = "csv"; - optional = true; + # optional = true; } { name = "directories-next"; @@ -14396,7 +14396,7 @@ rec { { name = "structopt"; packageId = "structopt"; - optional = true; + # optional = true; } { name = "sum_type"; diff --git a/nix/Cargo.nix_patches.md b/nix/Cargo.nix_patches.md new file mode 100644 index 0000000000..39ef390580 --- /dev/null +++ b/nix/Cargo.nix_patches.md @@ -0,0 +1,6 @@ +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. diff --git a/nix/README.md b/nix/README.md index b5f8812859..cd0de67841 100644 --- a/nix/README.md +++ b/nix/README.md @@ -192,6 +192,7 @@ 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 diff --git a/nix/veloren.nix b/nix/veloren.nix index 68418634ae..e7b2912aff 100644 --- a/nix/veloren.nix +++ b/nix/veloren.nix @@ -37,7 +37,7 @@ let prettyRev = with sourceInfo; if sourceInfo ? rev && sourceInfo ? lastModified then builtins.substring 0 8 rev + "/" + utils.dateTimeFormat lastModified - else throw "Need revision + lastModified to determine version"; + else throw "Need revision + lastModified to determine pretty revision"; tag = with sourceInfo; if sourceInfo ? tag @@ -51,7 +51,7 @@ let version = if tag != "" then tag else if prettyRev != "" then prettyRev - else throw "Need a tag or at least revision + lastModified in order to determine version"; + else throw "Need a tag or pretty revision in order to determine version"; veloren-assets = pkgs.runCommand "makeAssetsDir" { } '' mkdir $out