eww/flake.nix

87 lines
2.4 KiB
Nix
Raw Normal View History

{
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 ];
};
2022-08-15 11:56:05 +03:00
targetSystems = [ "aarch64-linux" "x86_64-linux" ];
mkRustToolchain = pkgs:
pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
in {
overlays.default = final: prev:
let
rust = mkRustToolchain final;
2022-08-15 11:56:05 +03:00
rustPlatform = prev.makeRustPlatform {
cargo = rust;
rustc = rust;
2022-08-15 11:56:05 +03:00
};
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 = [ ];
System Tray (#743) * 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>
2024-03-30 12:55:01 +03:00
# remove this when nixpkgs includes it
buildInputs = old.buildInputs ++ [ final.libdbusmenu-gtk3 ];
});
2022-08-15 11:56:05 +03:00
eww-wayland = final.eww;
2022-08-15 11:56:05 +03:00
};
packages = nixpkgs.lib.genAttrs targetSystems (system:
let pkgs = pkgsFor system;
in (self.overlays.default pkgs pkgs) // {
default = self.packages.${system}.eww;
});
2022-08-15 11:56:05 +03:00
devShells = nixpkgs.lib.genAttrs targetSystems (system:
let
pkgs = pkgsFor system;
rust = mkRustToolchain pkgs;
in {
default = pkgs.mkShell {
packages = with pkgs; [
rust
rust-analyzer-unwrapped
2022-08-15 11:56:05 +03:00
gcc
System Tray (#743) * 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>
2024-03-30 12:55:01 +03:00
glib
gdk-pixbuf
librsvg
libdbusmenu-gtk3
2022-08-15 11:56:05 +03:00
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);
};
}