{ lib
, rustPlatform
, fetchzip
, pkg-config
, makeWrapper
, libxkbcommon
, eww
, bash
, gawk
, bluez
, coreutils
, inotify-tools
, playerctl
, networkmanager
, wireplumber
, pulseaudio
}:
rustPlatform.buildRustPackage rec {

  pname = "ewwbar";
  version = "v0.1.2";

  src = fetchzip {
    url = "https://git.huwe.mooo.com/willifan/desktop-utils/archive/${version}.tar.gz";
    sha256 = "sha256-I9UcAn8RWC8DMQqln1n4VMdzG03tugkAaPOqNMSI90o=";
  };

  cargoHash = "sha256-V92FaY0DKlTYkzRkTha9WoKcqibrn6+3HzFTaMhkc80=";


  nativeBuildInputs = [
    pkg-config
    makeWrapper
  ];

  buildInputs = [
    libxkbcommon
  ];

  postInstall = ''
    mkdir -p $out/bin
    cp -r $src/eww $out/bin/eww
  '';

  postFixup = ''
    wrapProgram $out/bin/ewwbar \
      --set PATH ${lib.makeBinPath  [
        eww
        bash
        gawk
        bluez
        coreutils
        inotify-tools
        playerctl
        networkmanager
        wireplumber
        pulseaudio
      ]}
  '';

  meta = with lib; {
    description = "utils for my desktop";
    homepage = " git.huwe.mooo.com/willifan/desktop-utils";
    license = licenses.gpl3;
    platforms = platforms.unix;
    mainProgram = "ewwbar";
  };

}