mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 15:21:24 +01:00
Revert "do default-feature unification in nix"
This reverts commit 8f24ac1f27.
This is no longer necessary since the set of all features is equal to
the set of default features.
This commit is contained in:
parent
b5294f9aa0
commit
40da74f28c
1 changed files with 6 additions and 16 deletions
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
# Options (keep sorted)
|
||||
, default-features ? true
|
||||
, all-features ? false
|
||||
, features ? []
|
||||
, profile ? "release"
|
||||
, version-extra ? inputs.self.shortRev
|
||||
|
|
@ -20,19 +19,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
# We perform default-feature unification in nix, because some of the dependencies
|
||||
# on the nix side depend on feature values.
|
||||
cargoManifest = lib.importTOML "${inputs.self}/Cargo.toml";
|
||||
allDefaultFeatures = cargoManifest.features.default;
|
||||
allFeatures = lib.unique (
|
||||
lib.remove "default" (lib.attrNames cargoManifest.features) ++
|
||||
lib.attrNames
|
||||
(lib.filterAttrs (_: dependency: dependency.optional or false)
|
||||
cargoManifest.dependencies));
|
||||
features' = lib.unique
|
||||
(features ++
|
||||
lib.optionals default-features allDefaultFeatures ++
|
||||
lib.optionals all-features allFeatures);
|
||||
|
||||
buildDepsOnlyEnv =
|
||||
{
|
||||
|
|
@ -104,10 +91,13 @@ craneLib.buildPackage (commonAttrs // {
|
|||
env = buildDepsOnlyEnv;
|
||||
});
|
||||
|
||||
cargoExtraArgs = "--locked --no-default-features "
|
||||
cargoExtraArgs = "--locked "
|
||||
+ lib.optionalString
|
||||
(features' != [])
|
||||
"--features " + (builtins.concatStringsSep "," features');
|
||||
(!default-features)
|
||||
"--no-default-features "
|
||||
+ lib.optionalString
|
||||
(features != [])
|
||||
"--features " + (builtins.concatStringsSep "," features);
|
||||
|
||||
env = buildPackageEnv;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue