feat(nix): use cargo default features

This commit is contained in:
yavko 2023-02-27 20:25:06 -08:00
parent b2749fee92
commit b1475a1aff
No known key found for this signature in database
GPG Key ID: F07D19A32407F857

View File

@ -31,15 +31,15 @@
];
};
mkRustToolchain = pkgs: pkgs.rust-bin.stable.latest.default;
defaultFeatures = [
"http"
"config+all"
"clock"
"music+all"
"sys_info"
"tray"
"workspaces+all"
];
# defaultFeatures = [
# "http"
# "config+all"
# "clock"
# "music+all"
# "sys_info"
# "tray"
# "workspaces+all"
# ];
in {
overlays.default = final: prev: let
rust = mkRustToolchain final;
@ -57,7 +57,7 @@
name = "ironbar";
path = prev.lib.cleanSource ./.;
};
buildNoDefaultFeatures = true;
buildNoDefaultFeatures = if features == [] then false else true;
buildFeatures = features;
cargoDeps = rustPlatform.importCargoLock {lockFile = ./Cargo.lock;};
cargoLock.lockFile = ./Cargo.lock;
@ -72,7 +72,7 @@
in
(self.overlays.default pkgs pkgs)
// {
default = self.packages.${system}.ironbar defaultFeatures;
default = self.packages.${system}.ironbar [];
}
);
devShells = genSystems (system: let
@ -100,7 +100,7 @@
...
}: let
cfg = config.programs.ironbar;
defaultIronbarPackage = self.packages.${pkgs.hostPlatform.system}.default defaultFeatures;
defaultIronbarPackage = self.packages.${pkgs.hostPlatform.system}.default [];
jsonFormat = pkgs.formats.json {};
in {
options.programs.ironbar = {