2021-10-26 20:05:15 +02:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, gtk3
|
2022-11-07 08:32:04 +01:00
|
|
|
, gdk-pixbuf
|
2021-10-26 20:05:15 +02:00
|
|
|
, withWayland ? false
|
|
|
|
, gtk-layer-shell
|
2021-11-05 02:30:01 +01:00
|
|
|
, stdenv
|
2021-10-26 20:05:15 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "eww";
|
2022-09-05 15:18:48 +02:00
|
|
|
version = "0.4.0";
|
2021-10-26 20:05:15 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elkowar";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-09-05 15:18:48 +02:00
|
|
|
sha256 = "sha256-wzgWx3QxZvCAzRKLFmo/ru8hsIQsEDNeb4cPdlEyLxE=";
|
2021-10-26 20:05:15 +02:00
|
|
|
};
|
|
|
|
|
2022-09-05 15:18:48 +02:00
|
|
|
cargoSha256 = "sha256-9RfYDF31wFYylhZv53PJpZofyCdMiUiH/nhRB2Ni/Is=";
|
2022-06-07 20:11:02 +02:00
|
|
|
|
|
|
|
cargoPatches = [ ./Cargo.lock.patch ];
|
2021-10-26 20:05:15 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2022-11-07 08:32:04 +01:00
|
|
|
buildInputs = [ gtk3 gdk-pixbuf ] ++ lib.optional withWayland gtk-layer-shell;
|
2021-10-26 20:05:15 +02:00
|
|
|
|
2021-11-16 01:03:01 +01:00
|
|
|
buildNoDefaultFeatures = withWayland;
|
|
|
|
buildFeatures = lib.optional withWayland "wayland";
|
|
|
|
|
|
|
|
cargoBuildFlags = [ "--bin" "eww" ];
|
2021-10-26 20:05:15 +02: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-02 00:19:48 +01:00
|
|
|
maintainers = with maintainers; [ figsoda lom ];
|
2021-11-05 02:30:01 +01:00
|
|
|
broken = stdenv.isDarwin;
|
2021-10-26 20:05:15 +02:00
|
|
|
};
|
|
|
|
}
|