nixos/packages/eww/default.nix

51 lines
1.3 KiB
Nix

with import <nixpkgs> {
overlays = [
(import (fetchTarball
"https://github.com/oxalica/rust-overlay/archive/master.tar.gz"))
];
};
{ lib, fetchzip, pkg-config, wrapGAppsHook, gtk3, librsvg, gtk-layer-shell
, stdenv, libdbusmenu, libdbusmenu-gtk3 }:
let
rustPlatform = makeRustPlatform {
cargo = rust-bin.stable.latest.minimal;
rustc = rust-bin.stable.latest.minimal;
};
in rustPlatform.buildRustPackage rec {
pname = "eww";
version = "0.6.0";
src = fetchzip { # for now the github release is broken
url = "https://github.com/elkowar/eww/archive/refs/heads/master.zip";
hash = "sha256-eDOg5Ink3iWT/B1WpD9po5/UxS4DEaVO4NPIRyjSheM=";
};
cargoHash = "sha256-3XlI6dwooPCacLGYxD7RsN//DkORXv+1/bRPqkjbTYA=";
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
buildInputs = [ gtk3 librsvg libdbusmenu libdbusmenu-gtk3 gtk-layer-shell ];
buildNoDefaultFeatures = true;
buildFeatures = [ "wayland" ];
cargoBuildFlags = [ "--release" "--bin" "eww" ];
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;
maintainers = with maintainers; [ figsoda lom ];
mainProgram = "eww";
broken = stdenv.isDarwin;
};
}