2021-01-15 05:42:41 +00:00
|
|
|
{ lib
|
|
|
|
, config
|
2019-12-15 04:44:17 +00:00
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
|
|
|
, libX11
|
|
|
|
, wxGTK
|
|
|
|
, libiconv
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
, libGLU
|
|
|
|
, libGL
|
|
|
|
, libass
|
|
|
|
, fftw
|
|
|
|
, ffms
|
2020-06-07 13:39:09 +01:00
|
|
|
, ffmpeg_3
|
2019-12-15 04:44:17 +00:00
|
|
|
, pkg-config
|
|
|
|
, zlib
|
|
|
|
, icu
|
|
|
|
, boost
|
|
|
|
, intltool
|
|
|
|
|
|
|
|
, spellcheckSupport ? true
|
|
|
|
, hunspell ? null
|
|
|
|
|
|
|
|
, automationSupport ? true
|
|
|
|
, lua ? null
|
|
|
|
|
|
|
|
, openalSupport ? false
|
|
|
|
, openal ? null
|
|
|
|
|
|
|
|
, alsaSupport ? stdenv.isLinux
|
|
|
|
, alsaLib ? null
|
|
|
|
|
|
|
|
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
|
|
|
|
, libpulseaudio ? null
|
|
|
|
|
|
|
|
, 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);
|
|
|
|
|
2021-01-15 05:42:41 +00:00
|
|
|
with lib;
|
2019-12-15 04:44:17 +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
|
|
|
};
|
|
|
|
|
2019-12-15 04:36:24 +00:00
|
|
|
patches = [
|
|
|
|
# Compatibility with ICU 59
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/Aegisub/Aegisub/commit/dd67db47cb2203e7a14058e52549721f6ff16a49.patch";
|
|
|
|
sha256 = "07qqlckiyy64lz8zk1as0vflk9kqnjb340420lp9f0xj93ncssj7";
|
|
|
|
})
|
|
|
|
|
|
|
|
# Compatbility with Boost 1.69
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/Aegisub/Aegisub/commit/c3c446a8d6abc5127c9432387f50c5ad50012561.patch";
|
|
|
|
sha256 = "1n8wmjka480j43b1pr30i665z8hdy6n3wdiz1ls81wyv7ai5yygf";
|
|
|
|
})
|
2020-09-09 12:00:49 +01:00
|
|
|
|
|
|
|
# Compatbility with make 4.3
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/Aegisub/Aegisub/commit/6bd3f4c26b8fc1f76a8b797fcee11e7611d59a39.patch";
|
|
|
|
sha256 = "1s9cc5rikrqb9ivjbag4b8yxcyjsmmmw744394d5xq8xi4k12vxc";
|
|
|
|
})
|
2019-12-15 04:36:24 +00:00
|
|
|
];
|
2017-10-15 09:44:16 +01:00
|
|
|
|
2019-12-15 04:44:17 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
intltool
|
|
|
|
];
|
|
|
|
|
2021-01-15 05:42:41 +00:00
|
|
|
buildInputs = with lib; [
|
2019-12-15 04:44:17 +00:00
|
|
|
libX11
|
|
|
|
wxGTK
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
libGLU
|
|
|
|
libGL
|
|
|
|
libass
|
|
|
|
fftw
|
|
|
|
ffms
|
2020-06-07 13:39:09 +01:00
|
|
|
ffmpeg_3
|
2019-12-15 04:44:17 +00:00
|
|
|
zlib
|
|
|
|
icu
|
|
|
|
boost
|
|
|
|
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)
|
2019-10-30 00:40:49 +00:00
|
|
|
NIX_LDFLAGS = "-lpthread";
|
2019-01-04 19:33:49 +00:00
|
|
|
|
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.
|
|
|
|
'';
|
2019-12-15 04:44:17 +00:00
|
|
|
homepage = "http://www.aegisub.org/";
|
|
|
|
# The Aegisub sources are itself BSD/ISC,
|
|
|
|
# but they are linked against GPL'd softwares
|
|
|
|
# - so the resulting program will be GPL
|
2014-05-06 02:56:41 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|