2021-01-15 05:42:41 +00:00
|
|
|
{ lib
|
|
|
|
, config
|
2019-12-15 04:44:17 +00:00
|
|
|
, stdenv
|
2022-05-28 05:14:29 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
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
|
2022-05-28 05:14:29 +00:00
|
|
|
, libuchardet
|
2019-12-15 04:44:17 +00:00
|
|
|
, pkg-config
|
2022-05-28 05:14:29 +00:00
|
|
|
, which
|
2021-04-27 15:01:46 +00:00
|
|
|
, wxGTK
|
2019-12-15 04:44:17 +00:00
|
|
|
, zlib
|
|
|
|
|
|
|
|
, spellcheckSupport ? true
|
|
|
|
, hunspell ? null
|
|
|
|
|
|
|
|
, automationSupport ? true
|
2022-05-28 05:14:29 +00:00
|
|
|
, luajit ? null
|
2019-12-15 04:44:17 +00:00
|
|
|
|
|
|
|
, 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
|
2022-05-28 05:14:29 +00:00
|
|
|
|
2019-12-15 04:44:17 +00:00
|
|
|
}:
|
2013-12-22 17:37:41 +00:00
|
|
|
|
2015-04-07 01:57:25 +00:00
|
|
|
assert spellcheckSupport -> (hunspell != null);
|
2022-05-28 05:14:29 +00:00
|
|
|
assert automationSupport -> (luajit != null);
|
2013-12-22 17:37:41 +00:00
|
|
|
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
|
2022-05-28 05:14:29 +00:00
|
|
|
luajit52 = luajit.override { enable52Compat = true; };
|
2021-04-27 15:01:46 +00:00
|
|
|
inherit (lib) optional;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "aegisub";
|
2022-05-28 05:14:29 +00:00
|
|
|
version = "3.3.2";
|
2013-12-22 17:37:41 +00:00
|
|
|
|
2022-05-28 05:14:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wangqr";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-Er0g8fJyx7zjNVpKw7zUHE40hU10BdYlZohlqJq2LE0=";
|
2013-12-22 17:37:41 +00:00
|
|
|
};
|
|
|
|
|
2022-05-28 05:14:29 +00:00
|
|
|
patches = [ ./no-git.patch ];
|
2017-10-15 08:44:16 +00:00
|
|
|
|
2019-12-15 04:44:17 +00:00
|
|
|
nativeBuildInputs = [
|
2022-05-28 05:14:29 +00:00
|
|
|
autoreconfHook
|
2019-12-15 04:44:17 +00:00
|
|
|
intltool
|
2022-05-28 05:14:29 +00:00
|
|
|
luajit52
|
2021-04-27 15:01:46 +00:00
|
|
|
pkg-config
|
2022-05-28 05:14:29 +00:00
|
|
|
which
|
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
|
2022-05-28 05:14:29 +00:00
|
|
|
libuchardet
|
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
|
2022-05-28 05:14:29 +00:00
|
|
|
++ optional automationSupport luajit52
|
2021-04-27 15:01:46 +00:00
|
|
|
++ optional openalSupport openal
|
|
|
|
++ optional portaudioSupport portaudio
|
|
|
|
++ optional pulseaudioSupport libpulseaudio
|
|
|
|
++ optional spellcheckSupport hunspell
|
|
|
|
;
|
2014-03-22 09:01:42 +00:00
|
|
|
|
2022-05-28 05:14:29 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-boost-libdir=${boost.out}/lib"
|
|
|
|
"--with-system-luajit"
|
|
|
|
"FORCE_GIT_VERSION=${version}"
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
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; {
|
2022-05-28 05:14:29 +00:00
|
|
|
homepage = "https://github.com/wangqr/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
|
|
|
};
|
|
|
|
}
|