diff --git a/pkgs/tools/admin/drawterm/default.nix b/pkgs/tools/admin/drawterm/default.nix index ddb2fd139185..4955fc8f6613 100644 --- a/pkgs/tools/admin/drawterm/default.nix +++ b/pkgs/tools/admin/drawterm/default.nix @@ -2,6 +2,7 @@ , lib , fetchgit , installShellFiles +, makeWrapper , xorg , pkg-config , wayland-scanner @@ -10,6 +11,7 @@ , wayland-protocols , libxkbcommon , wlr-protocols +, pulseaudio , config }: @@ -25,10 +27,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ installShellFiles ] ++ { linux = [ pkg-config wayland-scanner ]; - unix = []; + unix = [ makeWrapper ]; }."${config}" or (throw "unsupported CONF"); - buildInputs = { linux = [ pipewire wayland wayland-protocols libxkbcommon wlr-protocols ]; unix = [ xorg.libX11 xorg.libXt ]; @@ -37,11 +38,21 @@ stdenv.mkDerivation rec { # TODO: macos makeFlags = [ "CONF=${config}" ]; - installPhase = '' - install -Dm755 -t $out/bin/ drawterm - installManPage drawterm.1 + installPhase = { + linux = '' + install -Dm755 -t $out/bin/ drawterm + ''; + unix = '' + # wrapping the oss output with pulse seems to be the easiest + mv drawterm drawterm.bin + install -Dm755 -t $out/bin/ drawterm.bin + makeWrapper ${pulseaudio}/bin/padsp $out/bin/drawterm --add-flags $out/bin/drawterm.bin + ''; + }."${config}" or (throw "unsupported CONF") + '' + installManPage drawterm.1 ''; + meta = with lib; { description = "Connect to Plan 9 CPU servers from other operating systems."; homepage = "https://drawterm.9front.org/";