nixpkgs/pkgs/applications/video/mkvtoolnix/default.nix

69 lines
1.9 KiB
Nix
Raw Normal View History

2019-02-16 04:18:50 +00:00
{ stdenv, fetchFromGitLab, pkgconfig, autoconf, automake, libiconv, drake
, ruby, docbook_xsl, file, xdg_utils, gettext, expat, boost, libebml, zlib
, fmt, libmatroska, libogg, libvorbis, flac, libxslt, cmark
2016-03-07 18:24:24 +00:00
, withGUI ? true
2018-02-28 22:27:43 +00:00
, qtbase ? null
, qtmultimedia ? null
2019-08-15 16:28:53 +01:00
, wrapQtAppsHook ? null
}:
2019-08-15 16:28:53 +01:00
assert withGUI -> qtbase != null && qtmultimedia != null && wrapQtAppsHook != null;
2016-03-07 18:24:24 +00:00
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "mkvtoolnix";
2020-05-06 01:56:15 +01:00
version = "46.0.0";
2017-12-22 02:58:10 +00:00
src = fetchFromGitLab {
2018-02-28 22:27:43 +00:00
owner = "mbunkus";
repo = "mkvtoolnix";
rev = "release-${version}";
2020-05-06 01:56:15 +01:00
sha256 = "1vyfvpsllnzhzaaz3s9lqlnkmnqchyhxj2d47bfyizs982r5kg24";
};
2018-02-28 22:27:43 +00:00
nativeBuildInputs = [
pkgconfig autoconf automake gettext
drake ruby docbook_xsl libxslt
];
2015-05-11 11:20:12 +01:00
2014-08-29 14:06:23 +01:00
buildInputs = [
2019-02-16 04:18:50 +00:00
expat file xdg_utils boost libebml zlib fmt
2018-02-28 22:27:43 +00:00
libmatroska libogg libvorbis flac cmark
] ++ optional stdenv.isDarwin libiconv
2019-08-15 16:28:53 +01:00
++ optionals withGUI [ qtbase qtmultimedia wrapQtAppsHook ];
2016-03-12 23:43:29 +00:00
preConfigure = "./autogen.sh; patchShebangs .";
buildPhase = "drake -j $NIX_BUILD_CORES";
installPhase = "drake install -j $NIX_BUILD_CORES";
2016-03-07 18:24:24 +00:00
configureFlags = [
"--enable-magic"
"--enable-optimization"
"--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"
"--with-docbook-xsl-root=${docbook_xsl}/share/xml/docbook-xsl"
2016-03-07 18:24:24 +00:00
(enableFeature withGUI "qt")
];
CXXFLAGS = optional stdenv.cc.isClang "-std=c++17";
2019-09-18 04:41:28 +01:00
2019-08-15 16:28:53 +01:00
dontWrapQtApps = true;
postFixup = optionalString withGUI ''
wrapQtApp $out/bin/mkvtoolnix-gui
'';
2015-05-11 11:20:12 +01:00
meta = with stdenv.lib; {
description = "Cross-platform tools for Matroska";
homepage = "http://www.bunkus.org/videotools/mkvtoolnix/";
2016-03-07 18:24:24 +00:00
license = licenses.gpl2;
maintainers = with maintainers; [ codyopel rnhmjoj ];
2017-03-13 21:20:26 +00:00
platforms = platforms.linux
++ optionals (!withGUI) platforms.darwin;
};
}