2021-08-18 13:19:15 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2023-08-04 22:07:22 +00:00
|
|
|
, fetchFrom9Front
|
|
|
|
, unstableGitUpdater
|
2023-07-15 17:15:38 +00:00
|
|
|
, installShellFiles
|
|
|
|
, makeWrapper
|
2021-08-18 13:19:15 +00:00
|
|
|
, xorg
|
2023-07-15 17:15:38 +00:00
|
|
|
, pkg-config
|
|
|
|
, wayland-scanner
|
|
|
|
, pipewire
|
|
|
|
, wayland
|
|
|
|
, wayland-protocols
|
|
|
|
, libxkbcommon
|
|
|
|
, wlr-protocols
|
|
|
|
, pulseaudio
|
|
|
|
, config
|
2024-01-02 11:29:13 +00:00
|
|
|
, nixosTests
|
2021-08-18 13:19:15 +00:00
|
|
|
}:
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
stdenv.mkDerivation {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "drawterm";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "unstable-2024-02-18";
|
2021-08-18 13:19:15 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
src = fetchFrom9Front {
|
|
|
|
owner = "plan9front";
|
|
|
|
repo = "drawterm";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "bcf1eb425dd4c90a3bfcd004f6aee3854259da78";
|
|
|
|
hash = "sha256-aUQ6ay2ky9NzVUZvWyHc/GqPlCdhGpXTY8GGytJSC6g=";
|
2021-08-18 13:19:15 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [ installShellFiles ] ++ {
|
|
|
|
linux = [ pkg-config wayland-scanner ];
|
|
|
|
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");
|
2021-08-18 13:19:15 +00:00
|
|
|
|
|
|
|
# TODO: macos
|
2023-07-15 17:15:38 +00:00
|
|
|
makeFlags = [ "CONF=${config}" ];
|
2021-08-18 13:19:15 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
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
|
2021-08-18 13:19:15 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = unstableGitUpdater { shallowClone = false; };
|
|
|
|
tests = nixosTests.drawterm;
|
|
|
|
};
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
description = "Connect to Plan 9 CPU servers from other operating systems";
|
2021-08-18 13:19:15 +00:00
|
|
|
homepage = "https://drawterm.9front.org/";
|
|
|
|
license = licenses.mit;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ luc65r moody ];
|
2021-08-18 13:19:15 +00:00
|
|
|
platforms = platforms.linux;
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "drawterm";
|
2021-08-18 13:19:15 +00:00
|
|
|
};
|
|
|
|
}
|