diff --git a/README.md b/README.md index 9aa46c7..ef094a2 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ it is converted to an attribute set equivalent to `{ root = theArg; }`. | `cargoTestCommands` | The commands to run in the `checkPhase`. Default: `[ ''cargo $cargo_options test $cargo_test_options'' ]` | | `cargoTestOptions` | baaaar Default: `[ "$cargo_release" ''-j "$NIX_BUILD_CORES"'' ]` | | `buildInputs` | Extra `buildInputs` to all derivations. Default: `[]` | -| `cargoOptions` | Options passed to cargo before the command (cargo OPTIONS ) used by the default cargoBuild Default: `[ "--locked" "-Z" "unstable-options" ]` | +| `cargoOptions` | Options passed to cargo before the command (cargo OPTIONS ) used by the default cargoBuild Default: `[ "-Z" "unstable-options" ]` | | `doDoc` | When true, `cargo doc` is run and a new output `doc` is generated. Default: `false` | | `release` | When true, all cargo builds are run with `--release`. sets cargo_release Default: `true` | | `override` | An override for all derivations involved in the build. Default: `(x: x)` | diff --git a/config.nix b/config.nix index dd8cc90..53b47ff 100644 --- a/config.nix +++ b/config.nix @@ -47,7 +47,7 @@ let # Options passed to cargo before the command (cargo OPTIONS ) # used by the default cargoBuild cargoOptions = - allowFun attrs0 "cargoOptions" [ "--locked" "-Z" "unstable-options" ]; + allowFun attrs0 "cargoOptions" [ "-Z" "unstable-options" ]; # When true, `cargo doc` is run and a new output `doc` is generated. doDoc = attrs0.doDoc or false; diff --git a/test.nix b/test.nix index 11a8f30..6ec59a1 100644 --- a/test.nix +++ b/test.nix @@ -110,11 +110,7 @@ rec doDoc = true; }; - simple-dep-patched = naersk.buildPackage - { root = ./test/simple-dep-patched; - # TODO: the lockfile needs to be regenerated - cargoOptions = builtins.filter (x: x != "--locked"); - }; + simple-dep-patched = ./test/simple-dep-patched; dummyfication = naersk.buildPackage ./test/dummyfication; dummyfication_test = pkgs.runCommand @@ -124,12 +120,12 @@ rec git-dep = naersk.buildPackage { root = ./test/git-dep; - cargoOptions = [ "--locked" ]; + cargoOptions = (opts: opts ++ [ "--locked" ]); }; git-dep-dup = naersk.buildPackage { root = ./test/git-dep-dup; - cargoOptions = [ "--locked" ]; + cargoOptions = (opts: opts ++ [ "--locked" ]); }; cargo-wildcard = naersk.buildPackage ./test/cargo-wildcard;