Skip to content
Snippets Groups Projects
Commit 95ca9d00 authored by 🥺's avatar 🥺 :transgender_flag: Committed by Jason Volk
Browse files

nix: get all features from main crate

parent 887496d0
No related branches found
No related tags found
No related merge requests found
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
let let
# We perform default-feature unification in nix, because some of the dependencies # We perform default-feature unification in nix, because some of the dependencies
# on the nix side depend on feature values. # on the nix side depend on feature values.
workspaceMembers = builtins.map (member: "${inputs.self}/src/${member}")
(builtins.attrNames (builtins.readDir "${inputs.self}/src"));
crateFeatures = path: crateFeatures = path:
let manifest = lib.importTOML "${path}/Cargo.toml"; in let manifest = lib.importTOML "${path}/Cargo.toml"; in
lib.remove "default" (lib.attrNames manifest.features) ++ lib.remove "default" (lib.attrNames manifest.features) ++
...@@ -34,10 +32,8 @@ crateFeatures = path: ...@@ -34,10 +32,8 @@ crateFeatures = path:
manifest.dependencies); manifest.dependencies);
crateDefaultFeatures = path: crateDefaultFeatures = path:
(lib.importTOML "${path}/Cargo.toml").features.default; (lib.importTOML "${path}/Cargo.toml").features.default;
allDefaultFeatures = lib.unique allDefaultFeatures = crateDefaultFeatures "${inputs.self}/src/main";
(lib.flatten (builtins.map crateDefaultFeatures workspaceMembers)); allFeatures = crateFeatures "${inputs.self}/src/main";
allFeatures = lib.unique
(lib.flatten (builtins.map crateFeatures workspaceMembers));
features' = lib.unique features' = lib.unique
(features ++ (features ++
lib.optionals default_features allDefaultFeatures ++ lib.optionals default_features allDefaultFeatures ++
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment