Skip to content

Commit

Permalink
allow disabling default features via override
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Hall authored and girlbossceo committed Apr 25, 2024
1 parent 92d3f83 commit 95fb05a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nix/pkgs/main/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
, stdenv

# Options
, default_features ? true
, features ? []
, profile ? "release"
}:
Expand Down Expand Up @@ -57,6 +58,9 @@ craneLib.buildPackage rec {
++ lib.optionals stdenv.isDarwin [ libiconv ];

cargoExtraArgs = ""
+ lib.optionalString
(!default_features)
"--no-default-features "
+ lib.optionalString
(features != [])
"--features " + (builtins.concatStringsSep "," features);
Expand Down

0 comments on commit 95fb05a

Please sign in to comment.