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;
|
rustc = pkgs.rustc;
|
||||||
});
|
});
|
||||||
|
|
||||||
eww = naersk-lib.buildPackage {
|
eww = { wayland ? false }:
|
||||||
pname = "eww";
|
naersk-lib.buildPackage {
|
||||||
nativeBuildInputs = with pkgs; [ pkg-config gtk3 ];
|
pname = "eww";
|
||||||
root = ./.;
|
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
|
defaultPackage = self.packages.${system}.eww;
|
||||||
rec {
|
|
||||||
packages.eww = eww;
|
|
||||||
|
|
||||||
defaultPackage = eww;
|
apps.eww = flake-utils.lib.mkApp { drv = packages.eww; };
|
||||||
|
apps.eww-wayland = flake-utils.lib.mkApp { drv = packages.eww-wayland; };
|
||||||
apps.eww = flake-utils.lib.mkApp {
|
|
||||||
drv = eww;
|
|
||||||
};
|
|
||||||
defaultApp = apps.eww;
|
defaultApp = apps.eww;
|
||||||
|
|
||||||
devShell = import ./shell.nix { inherit pkgs; };
|
devShell = import ./shell.nix { inherit pkgs; };
|
||||||
|
|
Loading…
Add table
Reference in a new issue