2021-10-28 06:52:43 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, gtk3
|
|
|
|
, 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";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "0.3.0";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elkowar";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "055il2b3k8x6mrrjin6vkajpksc40phcp4j1iq0pi8v3j7zsfk1a";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
cargoSha256 = "sha256-3hGA730g8E4rwQ9V0wSLUcAEmockXi+spwp50cgf0Mw=";
|
|
|
|
|
|
|
|
cargoPatches = [ ./Cargo.lock.patch ];
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ gtk3 ] ++ lib.optional withWayland gtk-layer-shell;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildNoDefaultFeatures = withWayland;
|
|
|
|
buildFeatures = lib.optional withWayland "wayland";
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|