2017-12-22 03:58:10 +01:00
|
|
|
{ stdenv, fetchFromGitLab, pkgconfig, autoconf, automake, libiconv
|
2017-03-13 22:16:38 +01:00
|
|
|
, drake, ruby, docbook_xsl, file, xdg_utils, gettext, expat, qt5, boost
|
2018-01-27 13:04:15 +01:00
|
|
|
, libebml, zlib, libmatroska, libogg, libvorbis, flac, libxslt, cmark
|
2016-03-07 19:24:24 +01:00
|
|
|
, withGUI ? true
|
2011-02-12 21:18:53 +01:00
|
|
|
}:
|
|
|
|
|
2015-05-11 12:20:12 +02:00
|
|
|
assert withGUI -> qt5 != null;
|
2016-03-07 19:24:24 +01:00
|
|
|
|
|
|
|
with stdenv.lib;
|
2015-01-10 14:46:05 +01:00
|
|
|
|
2011-02-12 21:18:53 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2014-08-29 15:06:23 +02:00
|
|
|
name = "mkvtoolnix-${version}";
|
2018-01-27 13:04:15 +01:00
|
|
|
version = "20.0.0";
|
2011-02-12 21:18:53 +01:00
|
|
|
|
2017-12-22 03:58:10 +01:00
|
|
|
src = fetchFromGitLab {
|
2016-07-09 17:14:01 +02:00
|
|
|
owner = "mbunkus";
|
|
|
|
repo = "mkvtoolnix";
|
|
|
|
rev = "release-${version}";
|
2018-01-27 13:04:15 +01:00
|
|
|
sha256 = "0qrjvvp0pvw9i91rh0zrxpclq7xap2dpjip0s5bm4gv14gh4l4mc";
|
2011-02-12 21:18:53 +01:00
|
|
|
};
|
|
|
|
|
2017-03-13 22:16:38 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig autoconf automake gettext drake ruby docbook_xsl libxslt ];
|
2015-05-11 12:20:12 +02:00
|
|
|
|
2014-08-29 15:06:23 +02:00
|
|
|
buildInputs = [
|
2016-09-23 12:20:02 +02:00
|
|
|
expat file xdg_utils boost libebml zlib libmatroska libogg
|
2018-01-27 13:04:15 +01:00
|
|
|
libvorbis flac cmark
|
2017-03-13 22:20:26 +01:00
|
|
|
]
|
|
|
|
++ optional stdenv.isDarwin libiconv
|
2017-05-02 11:09:51 +02:00
|
|
|
++ optionals withGUI [qt5.qtbase qt5.qtmultimedia];
|
2011-02-12 21:18:53 +01:00
|
|
|
|
2016-03-13 00:43:29 +01:00
|
|
|
preConfigure = "./autogen.sh; patchShebangs .";
|
2017-01-24 21:50:56 +01:00
|
|
|
buildPhase = "drake -j $NIX_BUILD_CORES";
|
|
|
|
installPhase = "drake install -j $NIX_BUILD_CORES";
|
2011-02-12 21:18:53 +01:00
|
|
|
|
2016-03-07 19:24:24 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-magic"
|
|
|
|
"--enable-optimization"
|
2016-04-27 23:41:28 +02:00
|
|
|
"--with-boost-libdir=${boost.out}/lib"
|
2016-03-07 19:24:24 +01:00
|
|
|
"--disable-debug"
|
|
|
|
"--disable-profiling"
|
|
|
|
"--disable-precompiled-headers"
|
|
|
|
"--disable-static-qt"
|
|
|
|
"--with-gettext"
|
2017-03-13 22:16:38 +01:00
|
|
|
"--with-docbook-xsl-root=${docbook_xsl}/share/xml/docbook-xsl"
|
2016-03-07 19:24:24 +01:00
|
|
|
(enableFeature withGUI "qt")
|
|
|
|
];
|
2011-02-12 21:18:53 +01:00
|
|
|
|
2015-05-11 12:20:12 +02:00
|
|
|
meta = with stdenv.lib; {
|
2011-02-12 21:22:55 +01:00
|
|
|
description = "Cross-platform tools for Matroska";
|
2016-03-07 19:24:24 +01:00
|
|
|
homepage = http://www.bunkus.org/videotools/mkvtoolnix/;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ codyopel fuuzetsu rnhmjoj ];
|
2017-03-13 22:20:26 +01:00
|
|
|
platforms = platforms.linux
|
|
|
|
++ optionals (!withGUI) platforms.darwin;
|
2011-02-12 21:18:53 +01:00
|
|
|
};
|
|
|
|
}
|