nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 installShellFiles,
6 pkg-config,
7 wrapGAppsHook3,
8 gtk3,
9 librsvg,
10 gtk-layer-shell,
11 stdenv,
12 libdbusmenu-gtk3,
13 nix-update-script,
14}:
15
16rustPlatform.buildRustPackage rec {
17 pname = "eww";
18 version = "0.6.0-unstable-2025-06-30";
19
20 src = fetchFromGitHub {
21 owner = "elkowar";
22 repo = "eww";
23 rev = "fddb4a09b107237819e661151e007b99b5cab36d";
24 hash = "sha256-PJW4LvW9FmkG9HyUtgXOq7MDjYtBc/iJuOxyf29nD0Y=";
25 };
26
27 cargoHash = "sha256-Kf99eojqXvdbZ3eRS8GBgyLYNpZKJGIJtsOsvhhSVDk=";
28
29 nativeBuildInputs = [
30 installShellFiles
31 pkg-config
32 wrapGAppsHook3
33 ];
34
35 buildInputs = [
36 gtk3
37 gtk-layer-shell
38 libdbusmenu-gtk3
39 librsvg
40 ];
41
42 cargoBuildFlags = [
43 "--bin"
44 "eww"
45 ];
46
47 cargoTestFlags = cargoBuildFlags;
48
49 # requires unstable rust features
50 env.RUSTC_BOOTSTRAP = 1;
51
52 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
53 installShellCompletion --cmd eww \
54 --bash <($out/bin/eww shell-completions --shell bash) \
55 --fish <($out/bin/eww shell-completions --shell fish) \
56 --zsh <($out/bin/eww shell-completions --shell zsh)
57 '';
58
59 passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
60
61 meta = {
62 description = "Widget system made in Rust to create widgets for any WM";
63 longDescription = ''
64 Eww (ElKowar's Wacky Widgets) is a widget system made in Rust which lets
65 you create your own widgets similarly to how you can in AwesomeWM.
66 The key difference: It is independent of your window manager!
67 It can be configured in yuck and themed using CSS, is very easy
68 to customize and provides all the flexibility you need!
69 '';
70 homepage = "https://github.com/elkowar/eww";
71 license = lib.licenses.mit;
72 maintainers = with lib.maintainers; [
73 coffeeispower
74 w-lfchen
75 ];
76 mainProgram = "eww";
77 broken = stdenv.hostPlatform.isDarwin;
78 };
79}