drawterm: fix audio using padsp
drawterm uses an oss audio backend by default for CONF=unix. The easiest way I've seen to get this working for most systems is to wrap it with padsp.
This commit is contained in:
parent
6b98875ef9
commit
d1f2d75d20
1 changed files with 16 additions and 5 deletions
|
@ -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 = ''
|
||||
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/";
|
||||
|
|
Loading…
Reference in a new issue