Merge pull request #240170 from majiru/drawterm-wayland

Drawterm: 2023-03-05 -> 2023-06-27, drawterm-wayland, and audio fixes
This commit is contained in:
Sandro 2023-07-02 17:19:46 +02:00 committed by GitHub
commit bc4f34bc07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 14 deletions

View File

@ -1,37 +1,63 @@
{ stdenv { stdenv
, lib , lib
, fetchgit , fetchgit
, installShellFiles
, makeWrapper
, xorg , xorg
, pkg-config
, wayland-scanner
, pipewire
, wayland
, wayland-protocols
, libxkbcommon
, wlr-protocols
, pulseaudio
, config
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "drawterm"; pname = "drawterm";
version = "unstable-2023-03-05"; version = "unstable-2023-06-27";
src = fetchgit { src = fetchgit {
url = "git://git.9front.org/plan9front/drawterm"; url = "git://git.9front.org/plan9front/drawterm";
rev = "ed9cff5a4c39322744c4708699c9ae6651b7c9ab"; rev = "36debf46ac184a22c6936345d22e4cfad995948c";
sha256 = "LM6UnggoxKC3e6xOlHYk9VFF99Abbdmp37nuUML8RgI="; sha256 = "ebqw1jqeRC0FWeUIO/HaEovuwzU6+B48TjZbVJXByvA=";
}; };
buildInputs = [ nativeBuildInputs = [ installShellFiles ] ++ {
xorg.libX11 linux = [ pkg-config wayland-scanner ];
xorg.libXt unix = [ makeWrapper ];
]; }."${config}" or (throw "unsupported CONF");
buildInputs = {
linux = [ pipewire wayland wayland-protocols libxkbcommon wlr-protocols ];
unix = [ xorg.libX11 xorg.libXt ];
}."${config}" or (throw "unsupported CONF");
# TODO: macos # TODO: macos
makeFlags = [ "CONF=unix" ]; makeFlags = [ "CONF=${config}" ];
installPhase = '' installPhase = {
install -Dm755 -t $out/bin/ drawterm linux = ''
install -Dm644 -t $out/man/man1/ drawterm.1 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; { meta = with lib; {
description = "Connect to Plan9 CPU servers from other operating systems."; description = "Connect to Plan 9 CPU servers from other operating systems.";
homepage = "https://drawterm.9front.org/"; homepage = "https://drawterm.9front.org/";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ luc65r ]; maintainers = with maintainers; [ luc65r moody ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View File

@ -30525,7 +30525,8 @@ with pkgs;
buildServerGui = false; buildServerGui = false;
}; };
drawterm = callPackage ../tools/admin/drawterm { }; drawterm = callPackage ../tools/admin/drawterm { config = "unix"; };
drawterm-wayland = callPackage ../tools/admin/drawterm { config = "linux"; };
droopy = python3Packages.callPackage ../applications/networking/droopy { }; droopy = python3Packages.callPackage ../applications/networking/droopy { };