diff --git a/pkgs/by-name/pl/plan9port-wayland/package.nix b/pkgs/by-name/pl/plan9port-wayland/package.nix new file mode 100644 index 000000000000..041a9990210c --- /dev/null +++ b/pkgs/by-name/pl/plan9port-wayland/package.nix @@ -0,0 +1,129 @@ +{ + lib, + stdenv, + fetchFromGitHub, + perl, # For building web manuals + which, + wayland, + libxkbcommon, + ed, +}: + +stdenv.mkDerivation { + pname = "plan9port-wayland"; + version = "0-unstable-2025-11-26"; + + src = fetchFromGitHub { + owner = "eaburns"; + repo = "plan9port"; + rev = "5848a455a79e4c3c5089fdeb7dcad69d67349bcd"; + hash = "sha256-tBuGdfy/ApQoOXpfnJUmv4oM4D4yHAeoTDhISkwg1TI="; + }; + + postPatch = '' + substituteInPlace bin/9c \ + --replace 'which uniq' '${which}/bin/which uniq' + + ed -sE INSTALL <LOCAL.config <LOCAL.INSTALL <test.c < + #include + #include + void + threadmain(int argc, char **argv) + { + threadexitsall(nil); + } + EOF + $out/bin/9 9c -o test.o test.c + $out/bin/9 9l -o test test.o + ./test + + runHook postInstallCheck + ''; + + env.XDG_SESSION_TYPE = "wayland"; + + meta = { + homepage = "https://github.com/eaburns/plan9port"; + description = "Plan 9 from User Space (fork with wayland support)"; + longDescription = '' + Plan 9 from User Space (aka plan9port) is a port of many Plan 9 programs + from their native Plan 9 environment to Unix-like operating systems. + ''; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + aleksana + ]; + mainProgram = "9"; + platforms = lib.platforms.linux; + }; +}