Wayland support in flake.nix (#297)
This commit is contained in:
parent
90466ab9bf
commit
7096a5b9d0
1 changed files with 14 additions and 13 deletions
27
flake.nix
27
flake.nix
|
@ -23,22 +23,23 @@
|
|||
rustc = pkgs.rustc;
|
||||
});
|
||||
|
||||
eww = naersk-lib.buildPackage {
|
||||
pname = "eww";
|
||||
nativeBuildInputs = with pkgs; [ pkg-config gtk3 ];
|
||||
root = ./.;
|
||||
};
|
||||
eww = { wayland ? false }:
|
||||
naersk-lib.buildPackage {
|
||||
pname = "eww";
|
||||
buildInputs = pkgs.lib.optional wayland pkgs.gtk-layer-shell;
|
||||
nativeBuildInputs = with pkgs; [ pkg-config gtk3 ];
|
||||
cargoBuildOptions = opts: opts ++ pkgs.lib.optionals wayland [ "--no-default-features" "--features=wayland" ];
|
||||
root = ./.;
|
||||
};
|
||||
|
||||
in rec {
|
||||
packages.eww = eww {};
|
||||
packages.eww-wayland = eww {wayland=true;};
|
||||
|
||||
in
|
||||
rec {
|
||||
packages.eww = eww;
|
||||
defaultPackage = self.packages.${system}.eww;
|
||||
|
||||
defaultPackage = eww;
|
||||
|
||||
apps.eww = flake-utils.lib.mkApp {
|
||||
drv = eww;
|
||||
};
|
||||
apps.eww = flake-utils.lib.mkApp { drv = packages.eww; };
|
||||
apps.eww-wayland = flake-utils.lib.mkApp { drv = packages.eww-wayland; };
|
||||
defaultApp = apps.eww;
|
||||
|
||||
devShell = import ./shell.nix { inherit pkgs; };
|
||||
|
|
Loading…
Add table
Reference in a new issue