2021-10-28 06:52:43 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, gtk3
|
2022-11-21 17:40:18 +00:00
|
|
|
, gdk-pixbuf
|
2021-10-28 06:52:43 +00:00
|
|
|
, withWayland ? false
|
|
|
|
, gtk-layer-shell
|
2021-12-06 16:07:01 +00:00
|
|
|
, stdenv
|
2021-10-28 06:52:43 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "eww";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "unstable-2023-06-10";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elkowar";
|
2023-07-15 17:15:38 +00:00
|
|
|
repo = "eww";
|
|
|
|
rev = "25e50eda46379bccd8a7887c18ee35833e0460e8";
|
|
|
|
hash = "sha256-8e6gHSg6FDp6nU5v89D44Tqb1lR5aQpS0lXOVqzoUS4=";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
cargoHash = "sha256-dC7yVJdR7mO0n+sxWwigM1Q4tbDv5ZuOINHHlUIPdA0=";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
buildInputs = [ gtk3 gdk-pixbuf ] ++ lib.optional withWayland gtk-layer-shell;
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildNoDefaultFeatures = true;
|
|
|
|
buildFeatures = [
|
|
|
|
(if withWayland then "wayland" else "x11")
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
cargoBuildFlags = [ "--bin" "eww" ];
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
cargoTestFlags = cargoBuildFlags;
|
|
|
|
|
|
|
|
# requires unstable rust features
|
|
|
|
RUSTC_BOOTSTRAP = 1;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "ElKowars wacky widgets";
|
|
|
|
homepage = "https://github.com/elkowar/eww";
|
|
|
|
license = licenses.mit;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ figsoda lom ];
|
|
|
|
broken = stdenv.isDarwin;
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
}
|