mirror of
https://github.com/elkowar/eww.git
synced 2024-08-18 00:00:38 +03:00
1b819fb646
* Allow tokio on gtk thread * Basic notifier host implementation * Implement systray widget * Use dbusmenu-gtk3 * Update flake.nix * US spelling of license * Fix possible TOCTOU * Change how hosts are started * Add watcher * Bunch of refactor * Handle errors better * Refactor service parsing * Avoid duplicate dbus connections * Fix watcher producing bad items * Handle zbus::Error::NameTaken * Refactor icon loading & don't panic on zoom * Implement pixbuf icons Co-authored-by: Bojan Nemčić <bnemcic@gmail.com> * Don't panic on icon/menu error * Improve icon error handling to make discord work * Update comments * Big refactor into actor model * Reword error messages * Remove redundant watcher_on function * Big icon handling refactor * Don't unnecessarily wrap StatusNotifierItem * cargo fmt * Documentation * Avoid registering to StatusNotifierWatcher multiple times * None theme means default theme * Add dbus logging * Add libdbusmenu-gtk3 dependency to docs * Some code tidying * Make Item more clearer * Make clippy happy * Systray widget improvements * Remove unwraps from dbus state * Temporarily add libdbusmenu-gtk3 to flake buildInputs * Fix blurry tray icon for HiDPI display * feat: dynamic icons * fix: don't cache IconPixmap property this fixes dynamic icons for some icons, e.g. syncthingtray * fixup! feat: dynamic icons * Fix unused borrow warning * Add some documentation to notifier_host * Rename notifier_host::dbus to more descriptive notifier_host::proxy * fixup! Rename notifier_host::dbus to more descriptive notifier_host::proxy * fixup! Merge remote-tracking branch 'upstream/master' into tray-3 * fixup! Merge remote-tracking branch 'upstream/master' into tray-3 * Remove commented out fields of DBusSession * Refactor host * Remove git conflict marker * Various improvements * Icon documentation * cargo fmt * Add dependency to CI --------- Co-authored-by: Bojan Nemčić <bnemcic@gmail.com> Co-authored-by: MoetaYuko <loli@yuko.moe> Co-authored-by: hylo <hylo@posteo.de>
87 lines
2.4 KiB
Nix
87 lines
2.4 KiB
Nix
{
|
|
inputs = {
|
|
flake-compat = {
|
|
url = "github:edolstra/flake-compat";
|
|
flake = false;
|
|
};
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, rust-overlay, flake-compat }:
|
|
let
|
|
pkgsFor = system:
|
|
import nixpkgs {
|
|
inherit system;
|
|
overlays = [ self.overlays.default rust-overlay.overlays.default ];
|
|
};
|
|
|
|
targetSystems = [ "aarch64-linux" "x86_64-linux" ];
|
|
mkRustToolchain = pkgs:
|
|
pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
|
in {
|
|
overlays.default = final: prev:
|
|
let
|
|
rust = mkRustToolchain final;
|
|
|
|
rustPlatform = prev.makeRustPlatform {
|
|
cargo = rust;
|
|
rustc = rust;
|
|
};
|
|
in {
|
|
eww = (prev.eww.override { inherit rustPlatform; }).overrideAttrs
|
|
(old: {
|
|
version = self.rev or "dirty";
|
|
src = builtins.path {
|
|
name = "eww";
|
|
path = prev.lib.cleanSource ./.;
|
|
};
|
|
cargoDeps =
|
|
rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };
|
|
patches = [ ];
|
|
# remove this when nixpkgs includes it
|
|
buildInputs = old.buildInputs ++ [ final.libdbusmenu-gtk3 ];
|
|
});
|
|
|
|
eww-wayland = final.eww;
|
|
};
|
|
|
|
packages = nixpkgs.lib.genAttrs targetSystems (system:
|
|
let pkgs = pkgsFor system;
|
|
in (self.overlays.default pkgs pkgs) // {
|
|
default = self.packages.${system}.eww;
|
|
});
|
|
|
|
devShells = nixpkgs.lib.genAttrs targetSystems (system:
|
|
let
|
|
pkgs = pkgsFor system;
|
|
rust = mkRustToolchain pkgs;
|
|
in {
|
|
default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
rust
|
|
rust-analyzer-unwrapped
|
|
gcc
|
|
glib
|
|
gdk-pixbuf
|
|
librsvg
|
|
libdbusmenu-gtk3
|
|
gtk3
|
|
gtk-layer-shell
|
|
pkg-config
|
|
deno
|
|
mdbook
|
|
];
|
|
|
|
RUST_SRC_PATH = "${rust}/lib/rustlib/src/rust/library";
|
|
};
|
|
});
|
|
|
|
formatter =
|
|
nixpkgs.lib.genAttrs targetSystems (system: (pkgsFor system).nixfmt);
|
|
};
|
|
}
|