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

70 lines
2 KiB
Nix
Raw Normal View History

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