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