15 stdenv.mkDerivation rec {
20 url = "mirror://sourceforge/${pname}/${pname}-${version}-src.tgz";
21 sha256 = "19m76bisipp1h3bc8mbq83b851rx3lbysxb0azpbr5nbqr2f8xyi";
25 # Cherry-picks from the upstream Synchronet tree, removing calls to `pthread_yield`.
26 # See upstream issue: https://gitlab.synchro.net/main/sbbs/-/issues/299
28 url = "https://gitlab.synchro.net/main/sbbs/-/commit/851627df99f48d8eaad33d3a98ef309b4371f359.patch";
29 hash = "sha256-DbFAeJnrwFyfEpZgZFN8etqX6vQ3ca2TJwaqp0aHeo4=";
31 ./0001-use-sched-yield-53264f2b.patch
33 # We can't use sourceRoot, as the cherry-picked patches apply to files outside of it.
34 postPatch = ''cd src/syncterm'';
39 "-DXPDEV_DONT_DEFINE_INTTYPES"
44 ++ (lib.optionals stdenv.hostPlatform.isLinux [
45 "-DUSE_ALSA_SOUND" # Don't use OSS for beeps.
59 ]; # SDL2 for `sdl2-config`.
63 ] ++ (lib.optional stdenv.hostPlatform.isLinux alsa-lib);
64 runtimeDependencies = [
67 ]; # Both of these are dlopen()'ed at runtime.
70 # error: unsupported option '-fsanitize=safe-stack' for target 'x86_64-apple-darwin'
72 (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isDarwin;
73 homepage = "https://syncterm.bbsdev.net/";
74 description = "BBS terminal emulator";
75 mainProgram = "syncterm";
76 maintainers = with maintainers; [ embr ];
77 platforms = platforms.unix;
78 license = licenses.gpl2Plus;