2019-02-03 15:31:21 +00:00
|
|
|
{ config, stdenv, fetchurl
|
2014-11-03 11:11:43 +00:00
|
|
|
, libX11, wxGTK
|
2014-11-26 23:16:50 +00:00
|
|
|
, libiconv, fontconfig, freetype
|
2018-02-24 13:12:44 +00:00
|
|
|
, libGLU_combined
|
2013-12-22 17:37:41 +00:00
|
|
|
, libass, fftw, ffms
|
|
|
|
, ffmpeg, pkgconfig, zlib # Undocumented (?) dependencies
|
2014-05-06 02:56:41 +01:00
|
|
|
, icu, boost, intltool # New dependencies
|
2015-04-07 02:57:25 +01:00
|
|
|
, spellcheckSupport ? true, hunspell ? null
|
2014-03-22 09:01:42 +00:00
|
|
|
, automationSupport ? true, lua ? null
|
2013-12-22 17:37:41 +00:00
|
|
|
, openalSupport ? false, openal ? null
|
2019-02-03 15:31:21 +00:00
|
|
|
, alsaSupport ? stdenv.isLinux, alsaLib ? null
|
|
|
|
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null
|
2014-09-10 19:59:54 +01:00
|
|
|
, portaudioSupport ? false, portaudio ? null }:
|
2013-12-22 17:37:41 +00:00
|
|
|
|
2015-04-07 02:57:25 +01:00
|
|
|
assert spellcheckSupport -> (hunspell != null);
|
2013-12-22 17:37:41 +00:00
|
|
|
assert automationSupport -> (lua != null);
|
|
|
|
assert openalSupport -> (openal != null);
|
|
|
|
assert alsaSupport -> (alsaLib != null);
|
2015-05-27 20:42:15 +01:00
|
|
|
assert pulseaudioSupport -> (libpulseaudio != null);
|
2013-12-22 17:37:41 +00:00
|
|
|
assert portaudioSupport -> (portaudio != null);
|
|
|
|
|
2015-04-07 02:57:25 +01:00
|
|
|
with stdenv.lib;
|
2013-12-22 17:37:41 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "aegisub";
|
2015-04-07 02:57:25 +01:00
|
|
|
version = "3.2.2";
|
2013-12-22 17:37:41 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "http://ftp.aegisub.org/pub/releases/${pname}-${version}.tar.xz";
|
2015-04-07 02:57:25 +01:00
|
|
|
sha256 = "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5";
|
2013-12-22 17:37:41 +00:00
|
|
|
};
|
|
|
|
|
2017-10-15 09:44:16 +01:00
|
|
|
# Fixup build with icu-59
|
|
|
|
postPatch = "sed '1i#include <unicode/unistr.h>' -i src/utils.cpp";
|
|
|
|
|
2013-12-22 17:37:41 +00:00
|
|
|
buildInputs = with stdenv.lib;
|
2018-02-24 13:12:44 +00:00
|
|
|
[ pkgconfig intltool libX11 wxGTK fontconfig freetype libGLU_combined
|
2016-04-27 22:41:28 +01:00
|
|
|
libass fftw ffms ffmpeg zlib icu boost boost.out libiconv
|
2014-11-03 11:11:43 +00:00
|
|
|
]
|
2015-04-07 02:57:25 +01:00
|
|
|
++ optional spellcheckSupport hunspell
|
2014-11-03 11:11:43 +00:00
|
|
|
++ optional automationSupport lua
|
|
|
|
++ optional openalSupport openal
|
|
|
|
++ optional alsaSupport alsaLib
|
2015-05-27 20:42:15 +01:00
|
|
|
++ optional pulseaudioSupport libpulseaudio
|
2014-11-03 11:11:43 +00:00
|
|
|
++ optional portaudioSupport portaudio
|
|
|
|
;
|
2014-03-22 09:01:42 +00:00
|
|
|
|
2014-11-03 11:11:43 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "bindnow" "relro" ];
|
2016-02-09 14:32:47 +00:00
|
|
|
|
2019-06-05 22:16:23 +01:00
|
|
|
# compat with icu61+ https://github.com/unicode-org/icu/blob/release-64-2/icu4c/readme.html#L554
|
|
|
|
CXXFLAGS = [ "-DU_USING_ICU_NAMESPACE=1" ];
|
|
|
|
|
2019-01-04 19:33:49 +00:00
|
|
|
# this is fixed upstream though not yet in an officially released version,
|
|
|
|
# should be fine remove on next release (if one ever happens)
|
|
|
|
NIX_LDFLAGS = [
|
|
|
|
"-lpthread"
|
|
|
|
];
|
|
|
|
|
2014-05-06 02:56:41 +01:00
|
|
|
postInstall = "ln -s $out/bin/aegisub-* $out/bin/aegisub";
|
2014-03-22 09:01:42 +00:00
|
|
|
|
2015-04-07 02:57:25 +01:00
|
|
|
meta = {
|
2013-12-22 17:37:41 +00:00
|
|
|
description = "An advanced subtitle editor";
|
|
|
|
longDescription = ''
|
|
|
|
Aegisub is a free, cross-platform open source tool for creating and
|
|
|
|
modifying subtitles. Aegisub makes it quick and easy to time subtitles to
|
|
|
|
audio, and features many powerful tools for styling them, including a
|
|
|
|
built-in real-time video preview.
|
|
|
|
'';
|
|
|
|
homepage = http://www.aegisub.org/;
|
2014-05-06 02:56:41 +01:00
|
|
|
license = licenses.bsd3;
|
2014-03-22 09:01:42 +00:00
|
|
|
# The Aegisub sources are itself BSD/ISC,
|
2014-03-22 04:12:48 +00:00
|
|
|
# but they are linked against GPL'd softwares
|
|
|
|
# - so the resulting program will be GPL
|
2014-05-06 02:56:41 +01:00
|
|
|
maintainers = [ maintainers.AndersonTorres ];
|
2018-02-27 17:40:37 +00:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
2013-12-22 17:37:41 +00:00
|
|
|
};
|
|
|
|
}
|