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

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

74 lines
1.8 KiB
Nix
Raw Normal View History

2021-08-12 20:03:43 +00:00
{ stdenv
, lib
2023-07-17 03:50:37 +00:00
, fetchFrom9Front
, unstableGitUpdater
, installShellFiles
, makeWrapper
2021-08-12 20:03:43 +00:00
, xorg
, pkg-config
, wayland-scanner
, pipewire
, wayland
, wayland-protocols
, libxkbcommon
, wlr-protocols
, pulseaudio
, config
2023-12-23 21:53:20 +00:00
, nixosTests
2021-08-12 20:03:43 +00:00
}:
stdenv.mkDerivation {
2021-08-12 20:03:43 +00:00
pname = "drawterm";
version = "0-unstable-2024-09-09";
2021-08-12 20:03:43 +00:00
2023-07-17 03:50:37 +00:00
src = fetchFrom9Front {
owner = "plan9front";
repo = "drawterm";
rev = "789b8fe40e156ad0252230b13dd4ada96f3eed8b";
hash = "sha256-M/kTV13MCcWycpJ2+jhXBTIoQuXakqO2llEL3PEjI/g=";
2021-08-12 20:03:43 +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-12 20:03:43 +00:00
# TODO: macos
makeFlags = [ "CONF=${config}" ];
2021-08-12 20:03:43 +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-12 20:03:43 +00:00
'';
2023-12-23 21:53:20 +00:00
passthru = {
updateScript = unstableGitUpdater { shallowClone = false; };
tests = nixosTests.drawterm;
};
2023-07-17 03:50:37 +00:00
2021-08-12 20:03:43 +00:00
meta = with lib; {
description = "Connect to Plan 9 CPU servers from other operating systems";
2021-08-12 20:03:43 +00:00
homepage = "https://drawterm.9front.org/";
license = licenses.mit;
maintainers = with maintainers; [ luc65r moody ];
2021-08-12 20:03:43 +00:00
platforms = platforms.linux;
2023-09-05 20:06:33 +00:00
mainProgram = "drawterm";
2021-08-12 20:03:43 +00:00
};
}