Skip to content

Commit

Permalink
nix: get all features from main crate
Browse files Browse the repository at this point in the history
  • Loading branch information
girlbossceo authored and jevolk committed Jun 2, 2024
1 parent 887496d commit 95ca9d0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions nix/pkgs/main/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
let
# We perform default-feature unification in nix, because some of the dependencies
# 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:
let manifest = lib.importTOML "${path}/Cargo.toml"; in
lib.remove "default" (lib.attrNames manifest.features) ++
Expand All @@ -34,10 +32,8 @@ crateFeatures = path:
manifest.dependencies);
crateDefaultFeatures = path:
(lib.importTOML "${path}/Cargo.toml").features.default;
allDefaultFeatures = lib.unique
(lib.flatten (builtins.map crateDefaultFeatures workspaceMembers));
allFeatures = lib.unique
(lib.flatten (builtins.map crateFeatures workspaceMembers));
allDefaultFeatures = crateDefaultFeatures "${inputs.self}/src/main";
allFeatures = crateFeatures "${inputs.self}/src/main";
features' = lib.unique
(features ++
lib.optionals default_features allDefaultFeatures ++
Expand Down

0 comments on commit 95ca9d0

Please sign in to comment.