2021-01-15 05:42:41 +00:00
|
|
|
{ lib
|
|
|
|
, config
|
2019-12-15 04:44:17 +00:00
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
2021-04-27 15:01:46 +00:00
|
|
|
, boost
|
|
|
|
, ffmpeg
|
|
|
|
, ffms
|
|
|
|
, fftw
|
2019-12-15 04:44:17 +00:00
|
|
|
, fontconfig
|
|
|
|
, freetype
|
2021-04-27 15:01:46 +00:00
|
|
|
, icu
|
|
|
|
, intltool
|
2019-12-15 04:44:17 +00:00
|
|
|
, libGL
|
2021-04-27 15:01:46 +00:00
|
|
|
, libGLU
|
|
|
|
, libX11
|
2019-12-15 04:44:17 +00:00
|
|
|
, libass
|
2021-04-27 15:01:46 +00:00
|
|
|
, libiconv
|
2019-12-15 04:44:17 +00:00
|
|
|
, pkg-config
|
2021-04-27 15:01:46 +00:00
|
|
|
, wxGTK
|
2019-12-15 04:44:17 +00:00
|
|
|
, zlib
|
|
|
|
|
|
|
|
, spellcheckSupport ? true
|
|
|
|
, hunspell ? null
|
|
|
|
|
|
|
|
, automationSupport ? true
|
|
|
|
, lua ? null
|
|
|
|
|
|
|
|
, openalSupport ? false
|
|
|
|
, openal ? null
|
|
|
|
|
|
|
|
, alsaSupport ? stdenv.isLinux
|
2021-06-10 02:57:09 +00:00
|
|
|
, alsa-lib ? null
|
2019-12-15 04:44:17 +00:00
|
|
|
|
|
|
|
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
|
|
|
|
, libpulseaudio ? null
|
|
|
|
|
|
|
|
, portaudioSupport ? false
|
|
|
|
, portaudio ? null
|
|
|
|
}:
|
2013-12-22 17:37:41 +00:00
|
|
|
|
2015-04-07 01:57:25 +00:00
|
|
|
assert spellcheckSupport -> (hunspell != null);
|
2013-12-22 17:37:41 +00:00
|
|
|
assert automationSupport -> (lua != null);
|
|
|
|
assert openalSupport -> (openal != null);
|
2021-06-10 02:57:09 +00:00
|
|
|
assert alsaSupport -> (alsa-lib != null);
|
2015-05-27 19:42:15 +00:00
|
|
|
assert pulseaudioSupport -> (libpulseaudio != null);
|
2013-12-22 17:37:41 +00:00
|
|
|
assert portaudioSupport -> (portaudio != null);
|
|
|
|
|
2021-04-27 15:01:46 +00:00
|
|
|
let
|
|
|
|
inherit (lib) optional;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "aegisub";
|
2015-04-07 01:57:25 +00:00
|
|
|
version = "3.2.2";
|
2013-12-22 17:37:41 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "http://ftp.aegisub.org/pub/releases/${pname}-${version}.tar.xz";
|
2021-04-27 15:01:46 +00:00
|
|
|
hash = "sha256-xV4zlFuC2FE8AupueC8Ncscmrc03B+lbjAAi9hUeaIU=";
|
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";
|
2021-04-27 15:01:46 +00:00
|
|
|
sha256 = "sha256-R2rN7EiyA5cuBYIAMpa0eKZJ3QZahfnRp8R4HyejGB8=";
|
2019-12-15 04:36:24 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
# Compatbility with Boost 1.69
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/Aegisub/Aegisub/commit/c3c446a8d6abc5127c9432387f50c5ad50012561.patch";
|
2021-04-27 15:01:46 +00:00
|
|
|
sha256 = "sha256-7nlfojrb84A0DT82PqzxDaJfjIlg5BvWIBIgoqasHNk=";
|
2019-12-15 04:36:24 +00:00
|
|
|
})
|
2020-09-09 11:00:49 +00:00
|
|
|
|
|
|
|
# Compatbility with make 4.3
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/Aegisub/Aegisub/commit/6bd3f4c26b8fc1f76a8b797fcee11e7611d59a39.patch";
|
2021-04-27 15:01:46 +00:00
|
|
|
sha256 = "sha256-rG8RJokd4V4aSYOQw2utWnrWPVrkqSV3TAvnGXNhLOk=";
|
2020-09-09 11:00:49 +00:00
|
|
|
})
|
2021-05-10 03:09:17 +00:00
|
|
|
|
|
|
|
# Compatibility with ffms2
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/Aegisub/Aegisub/commit/1aa9215e7fc360de05da9b7ec2cd68f1940af8b2.patch";
|
|
|
|
sha256 = "sha256-JsuI4hQTcT0TEqHHoSsGbuiTg4hMCH3Cxp061oLk8Go=";
|
|
|
|
})
|
|
|
|
|
|
|
|
./update-ffms2.patch
|
|
|
|
|
|
|
|
# Compatibility with X11
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/Aegisub/Aegisub/commit/7a6da26be6a830f4e1255091952cc0a1326a4520.patch";
|
|
|
|
sha256 = "sha256-/aTcIjFlZY4N9+IyHL4nwR0hUR4HTJM7ibbdKmNxq0w=";
|
|
|
|
})
|
2019-12-15 04:36:24 +00:00
|
|
|
];
|
2017-10-15 08:44:16 +00:00
|
|
|
|
2019-12-15 04:44:17 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
intltool
|
2021-04-27 15:01:46 +00:00
|
|
|
pkg-config
|
2019-12-15 04:44:17 +00:00
|
|
|
];
|
2021-04-27 15:01:46 +00:00
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
ffmpeg
|
|
|
|
ffms
|
|
|
|
fftw
|
2019-12-15 04:44:17 +00:00
|
|
|
fontconfig
|
|
|
|
freetype
|
2021-04-27 15:01:46 +00:00
|
|
|
icu
|
2019-12-15 04:44:17 +00:00
|
|
|
libGL
|
2021-04-27 15:01:46 +00:00
|
|
|
libGLU
|
|
|
|
libX11
|
2019-12-15 04:44:17 +00:00
|
|
|
libass
|
|
|
|
libiconv
|
2021-04-27 15:01:46 +00:00
|
|
|
wxGTK
|
|
|
|
zlib
|
2014-11-03 11:11:43 +00:00
|
|
|
]
|
2021-06-10 02:57:09 +00:00
|
|
|
++ optional alsaSupport alsa-lib
|
2021-04-27 15:01:46 +00:00
|
|
|
++ optional automationSupport lua
|
|
|
|
++ optional openalSupport openal
|
|
|
|
++ optional portaudioSupport portaudio
|
|
|
|
++ optional pulseaudioSupport libpulseaudio
|
|
|
|
++ optional spellcheckSupport hunspell
|
|
|
|
;
|
2014-03-22 09:01:42 +00:00
|
|
|
|
2014-11-03 11:11:43 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-04-27 15:01:46 +00:00
|
|
|
hardeningDisable = [
|
|
|
|
"bindnow"
|
|
|
|
"relro"
|
|
|
|
];
|
2016-02-09 14:32:47 +00:00
|
|
|
|
2021-05-10 03:09:17 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's/-Wno-c++11-narrowing/-Wno-narrowing/' configure.ac src/Makefile
|
|
|
|
'';
|
|
|
|
|
2021-04-27 15:01:46 +00:00
|
|
|
# compat with icu61+
|
|
|
|
# https://github.com/unicode-org/icu/blob/release-64-2/icu4c/readme.html#L554
|
2019-06-05 21:16:23 +00:00
|
|
|
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 01:56:41 +00:00
|
|
|
postInstall = "ln -s $out/bin/aegisub-* $out/bin/aegisub";
|
2014-03-22 09:01:42 +00:00
|
|
|
|
2021-04-27 15:01:46 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/Aegisub/Aegisub";
|
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.
|
|
|
|
'';
|
2021-04-27 15:01:46 +00:00
|
|
|
# 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 01:56:41 +00: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
|
|
|
};
|
|
|
|
}
|
2021-04-27 15:01:46 +00:00
|
|
|
# TODO [ AndersonTorres ]: update to fork release
|