Waybar/nix/default.nix

43 lines
936 B
Nix
Raw Normal View History

{ lib
, pkgs
, waybar
, version
}:
let
libcava = rec {
2024-05-24 00:18:25 +00:00
version = "0.10.2";
src = pkgs.fetchFromGitHub {
owner = "LukashonakV";
repo = "cava";
rev = version;
2024-05-24 00:18:25 +00:00
hash = "sha256-jU7RQV2txruu/nUUl0TzjK4nai7G38J1rcTjO7UXumY=";
};
};
in
(waybar.overrideAttrs (
oldAttrs: {
inherit version;
src = lib.cleanSourceWith {
filter = name: type: type != "regular" || !lib.hasSuffix ".nix" name;
src = lib.cleanSource ../.;
};
mesonFlags = lib.remove "-Dgtk-layer-shell=enabled" oldAttrs.mesonFlags;
# downstream patch should not affect upstream
patches = [];
2024-03-25 14:47:37 +00:00
buildInputs = (builtins.filter (p: p.pname != "wireplumber") oldAttrs.buildInputs) ++ [
pkgs.wireplumber
];
postUnpack = ''
pushd "$sourceRoot"
cp -R --no-preserve=mode,ownership ${libcava.src} subprojects/cava-${libcava.version}
patchShebangs .
popd
'';
}
2024-03-25 14:47:37 +00:00
))