nixpkgs/pkgs/tools/admin/drawterm/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.6 KiB
Nix
Raw Normal View History

2021-08-12 22:03:43 +02:00
{ stdenv
, lib
, fetchgit
, installShellFiles
, makeWrapper
2021-08-12 22:03:43 +02:00
, xorg
, pkg-config
, wayland-scanner
, pipewire
, wayland
, wayland-protocols
, libxkbcommon
, wlr-protocols
, pulseaudio
, config
2021-08-12 22:03:43 +02:00
}:
stdenv.mkDerivation rec {
pname = "drawterm";
2023-06-27 19:55:56 +02:00
version = "unstable-2023-06-27";
2021-08-12 22:03:43 +02:00
src = fetchgit {
url = "git://git.9front.org/plan9front/drawterm";
2023-06-27 19:55:56 +02:00
rev = "36debf46ac184a22c6936345d22e4cfad995948c";
sha256 = "ebqw1jqeRC0FWeUIO/HaEovuwzU6+B48TjZbVJXByvA=";
2021-08-12 22:03:43 +02:00
};
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-12 22:03:43 +02:00
# TODO: macos
makeFlags = [ "CONF=${config}" ];
2021-08-12 22:03:43 +02: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-12 22:03:43 +02:00
'';
2021-08-12 22:03:43 +02:00
meta = with lib; {
description = "Connect to Plan 9 CPU servers from other operating systems.";
2021-08-12 22:03:43 +02:00
homepage = "https://drawterm.9front.org/";
license = licenses.mit;
maintainers = with maintainers; [ luc65r moody ];
2021-08-12 22:03:43 +02:00
platforms = platforms.linux;
};
}