2021-10-26 19:05:15 +01:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, gtk3
|
|
|
|
, withWayland ? false
|
|
|
|
, gtk-layer-shell
|
2021-11-05 01:30:01 +00:00
|
|
|
, stdenv
|
2021-10-26 19:05:15 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "eww";
|
|
|
|
version = "0.2.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elkowar";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "050zc3w1z9f2vg6sz86mdxf345gd3s3jf09gf4y8y1mqkzs86b8x";
|
|
|
|
};
|
|
|
|
|
|
|
|
cargoSha256 = "sha256-LejnTVv9rhL9CVW1fgj2gFv4amHQeziu5uaH2ae8AAw=";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ gtk3 ] ++ lib.optional withWayland gtk-layer-shell;
|
|
|
|
|
2021-11-16 00:03:01 +00:00
|
|
|
buildNoDefaultFeatures = withWayland;
|
|
|
|
buildFeatures = lib.optional withWayland "wayland";
|
|
|
|
|
|
|
|
cargoBuildFlags = [ "--bin" "eww" ];
|
2021-10-26 19:05:15 +01: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-01 23:19:48 +00:00
|
|
|
maintainers = with maintainers; [ figsoda lom ];
|
2021-11-05 01:30:01 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2021-10-26 19:05:15 +01:00
|
|
|
};
|
|
|
|
}
|