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