41 alsaSupport ? stdenv.hostPlatform.isLinux,
43 portaudioSupport ? true,
44 pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux,
45 spellcheckSupport ? true,
46 useBundledLuaJIT ? false,
50 inherit (darwin.apple_sdk.frameworks)
59 stdenv.mkDerivation (finalAttrs: {
63 src = fetchFromGitHub {
66 rev = "v${finalAttrs.version}";
67 hash = "sha256-oKhLv81EFudrJaaJ2ga3pVh4W5Hd2YchpjsoYoqRm78=";
103 ++ lib.optionals alsaSupport [ alsa-lib ]
104 ++ lib.optionals openalSupport [
105 (if stdenv.hostPlatform.isDarwin then OpenAL else openal)
107 ++ lib.optionals portaudioSupport [ portaudio ]
108 ++ lib.optionals pulseaudioSupport [ libpulseaudio ]
109 ++ lib.optionals spellcheckSupport [ hunspell ]
110 ++ lib.optionals stdenv.hostPlatform.isDarwin [
126 name = "move-iconv-include-to-charset_conv.h.patch";
127 url = "https://github.com/arch1t3cht/Aegisub/commit/b8f4c98c4cbc698e4adbba302c2dc328fe193435.patch";
128 hash = "sha256-dCm/VG+8yK7qWKWF4Ew/M2hbbAC/d3hiuRglR9BvWtw=";
130 ] ++ lib.optionals (!useBundledLuaJIT) [
131 ./000-remove-bundled-luajit.patch
134 # error: unknown type name 'NSUInteger'
136 substituteInPlace src/dialog_colorpicker.cpp \
137 --replace-fail "NSUInteger" "size_t"
141 NIX_CFLAGS_COMPILE = "-I${lib.getDev luajit}/include";
142 NIX_CFLAGS_LINK = "-L${lib.getLib luajit}/lib";
146 export FORCE_GIT_VERSION=${finalAttrs.version}
149 cmakeBuildDir = "build-directory";
154 homepage = "https://github.com/wangqr/Aegisub";
155 description = "Advanced subtitle editor; wangqr's fork";
157 Aegisub is a free, cross-platform open source tool for creating and
158 modifying subtitles. Aegisub makes it quick and easy to time subtitles to
159 audio, and features many powerful tools for styling them, including a
160 built-in real-time video preview.
162 # The Aegisub sources are itself BSD/ISC, but they are linked against GPL'd
163 # softwares - so the resulting program will be GPL
164 license = with lib.licenses; [
167 mainProgram = "aegisub";
168 maintainers = with lib.maintainers; [ wegank ];
169 platforms = lib.platforms.unix;