Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pterm: init at 6.0.4 #264288

Merged
merged 3 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions pkgs/by-name/pt/pterm/0001-dtnetsubs-remove-null-check.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/dtnetsubs.c b/dtnetsubs.c
index ad1c30d..c1fda9b 100644
--- a/dtnetsubs.c
+++ b/dtnetsubs.c
@@ -865,10 +865,7 @@ int dtSend (NetFet *fet, const void *buf, int len)
** Update the IN pointer, then wake the send thread.
*/
fet->sendin = in;
- if (ssemp (fet) != NULL)
- {
- sem_post (ssemp (fet));
- }
+ sem_post (ssemp (fet));

if (dtSendFree (fet) == 0)
{
48 changes: 48 additions & 0 deletions pkgs/by-name/pt/pterm/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{ lib
, stdenv
, fetchurl
, libsndfile
, wxGTK32
, SDL
}:

stdenv.mkDerivation rec {
pname = "pterm";
version = "6.0.4";

buildInputs = [ libsndfile SDL wxGTK32 ];

src = fetchurl {
url = "https://www.cyber1.org/download/linux/pterm-${version}.tar.bz2";
hash = "sha256-0OJvoCOGx/a51Ja7n3fOTeQJEcdyn/GhaJ0NtVCyuC8=";
};

patches = [ ./0001-dtnetsubs-remove-null-check.patch ];

preBuild = ''
substituteInPlace Makefile.common Makefile.wxpterm --replace "/bin/echo" "echo"
echo "exit 0" > wxversion.py
'';

hardeningDisable = [ "format" ];

env.PTERMVERSION = "${version}";

installPhase = ''
runHook preInstall
install -Dm755 "pterm" "$out/bin/pterm"
runHook postInstall
'';

meta = with lib; {
description = "terminal emulator for the Cyber1 mainframe-based CYBIS system";
homepage = "https://www.cyber1.org/";
license = licenses.zlib;
maintainers = with maintainers; [ sarcasticadmin ];
sarcasticadmin marked this conversation as resolved.
Show resolved Hide resolved
mainProgram = "pterm";
platforms = platforms.unix;
broken = stdenv.isDarwin;
};
}