about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/video/mkvtoolnix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/video/mkvtoolnix')
-rw-r--r--nixpkgs/pkgs/applications/video/mkvtoolnix/default.nix60
1 files changed, 60 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/video/mkvtoolnix/default.nix b/nixpkgs/pkgs/applications/video/mkvtoolnix/default.nix
new file mode 100644
index 000000000000..c13bf3480d25
--- /dev/null
+++ b/nixpkgs/pkgs/applications/video/mkvtoolnix/default.nix
@@ -0,0 +1,60 @@
+{ 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
+, withGUI ? true
+  , qtbase ? null
+  , qtmultimedia ? null
+}:
+
+assert withGUI -> qtbase != null && qtmultimedia != null;
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  pname = "mkvtoolnix";
+  version = "35.0.0";
+
+  src = fetchFromGitLab {
+    owner  = "mbunkus";
+    repo   = "mkvtoolnix";
+    rev    = "release-${version}";
+    sha256 = "163msz6l1d5vwirr1c6cm820kwxcjinwh91svf8ddg5181nwhmrx";
+  };
+
+  nativeBuildInputs = [
+    pkgconfig autoconf automake gettext
+    drake ruby docbook_xsl libxslt
+  ];
+
+  buildInputs = [
+    expat file xdg_utils boost libebml zlib fmt
+    libmatroska libogg libvorbis flac cmark
+  ] ++ optional  stdenv.isDarwin libiconv
+    ++ optionals withGUI [ qtbase qtmultimedia ];
+
+  preConfigure = "./autogen.sh; patchShebangs .";
+  buildPhase   = "drake -j $NIX_BUILD_CORES";
+  installPhase = "drake install -j $NIX_BUILD_CORES";
+
+  configureFlags = [
+    "--enable-magic"
+    "--enable-optimization"
+    "--with-boost-libdir=${boost.out}/lib"
+    "--disable-debug"
+    "--disable-profiling"
+    "--disable-precompiled-headers"
+    "--disable-static-qt"
+    "--with-gettext"
+    "--with-docbook-xsl-root=${docbook_xsl}/share/xml/docbook-xsl"
+    (enableFeature withGUI "qt")
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Cross-platform tools for Matroska";
+    homepage    = http://www.bunkus.org/videotools/mkvtoolnix/;
+    license     = licenses.gpl2;
+    maintainers = with maintainers; [ codyopel fuuzetsu rnhmjoj ];
+    platforms   = platforms.linux
+      ++ optionals (!withGUI) platforms.darwin;
+  };
+}