Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

swayrbar: Fix pulseaudio as optional dependency (default: disabled)

+8 -1
+8 -1
pkgs/tools/wayland/swayrbar/default.nix
··· 1 - { lib, fetchFromSourcehut, rustPlatform }: 2 3 rustPlatform.buildRustPackage rec { 4 pname = "swayrbar"; ··· 16 # don't build swayr 17 buildAndTestSubdir = pname; 18 19 preCheck = '' 20 export HOME=$TMPDIR 21 ''; 22 23 meta = with lib; {
··· 1 + { lib, fetchFromSourcehut, rustPlatform, makeWrapper, withPulseaudio ? false, pulseaudio }: 2 3 rustPlatform.buildRustPackage rec { 4 pname = "swayrbar"; ··· 16 # don't build swayr 17 buildAndTestSubdir = pname; 18 19 + nativeBuildInputs = [ makeWrapper ]; 20 + 21 preCheck = '' 22 export HOME=$TMPDIR 23 + ''; 24 + 25 + postInstall = lib.optionals withPulseaudio '' 26 + wrapProgram "$out/bin/swayrbar" \ 27 + --prefix PATH : "$out/bin:${lib.makeBinPath [ pulseaudio ]}" 28 ''; 29 30 meta = with lib; {