about summary refs log tree commit diff
path: root/pkgs/by-name/ew/eww/package.nix
blob: e60ad71ae9c2b77cad36169a0d1ea538f6995644 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, wrapGAppsHook3
, gtk3
, librsvg
, gtk-layer-shell
, stdenv
, libdbusmenu-gtk3
}:

rustPlatform.buildRustPackage rec {
  pname = "eww";
  version = "0.6.0";

  src = fetchFromGitHub {
    owner = "elkowar";
    repo = "eww";
    rev = "refs/tags/v${version}";
    hash = "sha256-rzDnplFJNiHe+XbxbhZMEhPJMiJsmdVqtZxlxhzzpTk=";
  };

  cargoHash = "sha256-n9nd5E/VO+0BgkhrfQpeihlIkoVQRf6CMiPCK5opvvw=";

  nativeBuildInputs = [ pkg-config wrapGAppsHook3 ];

  buildInputs = [
    gtk3
    gtk-layer-shell
    libdbusmenu-gtk3
    librsvg
  ];

  cargoBuildFlags = [ "--bin" "eww" ];

  cargoTestFlags = cargoBuildFlags;

  # requires unstable rust features
  RUSTC_BOOTSTRAP = 1;

  meta = {
    description = "ElKowars wacky widgets";
    homepage = "https://github.com/elkowar/eww";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ coffeeispower eclairevoyant figsoda lom w-lfchen ];
    mainProgram = "eww";
    broken = stdenv.isDarwin;
  };
}