drawterm: add wayland+pipewire 'linux' build target support

This commit is contained in:
Jacob Moody 2023-06-27 12:57:29 -05:00
parent bf452e6987
commit 6b98875ef9
2 changed files with 25 additions and 9 deletions

View file

@ -1,7 +1,16 @@
{ stdenv
, lib
, fetchgit
, installShellFiles
, xorg
, pkg-config
, wayland-scanner
, pipewire
, wayland
, wayland-protocols
, libxkbcommon
, wlr-protocols
, config
}:
stdenv.mkDerivation rec {
@ -14,24 +23,30 @@ stdenv.mkDerivation rec {
sha256 = "ebqw1jqeRC0FWeUIO/HaEovuwzU6+B48TjZbVJXByvA=";
};
buildInputs = [
xorg.libX11
xorg.libXt
];
nativeBuildInputs = [ installShellFiles ] ++ {
linux = [ pkg-config wayland-scanner ];
unix = [];
}."${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
makeFlags = [ "CONF=unix" ];
makeFlags = [ "CONF=${config}" ];
installPhase = ''
install -Dm755 -t $out/bin/ drawterm
install -Dm644 -t $out/man/man1/ drawterm.1
installManPage drawterm.1
'';
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/";
license = licenses.mit;
maintainers = with maintainers; [ luc65r ];
maintainers = with maintainers; [ luc65r moody ];
platforms = platforms.linux;
};
}

View file

@ -30434,7 +30434,8 @@ with pkgs;
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 { };