11{
22 lib ,
33 stdenv ,
4- fetchFromGitLab ,
4+ fetchFromGitea ,
55 pkg-config ,
66 autoreconfHook ,
77 rake ,
88 boost ,
99 cmark ,
1010 docbook_xsl ,
1111 expat ,
12- fetchpatch2 ,
1312 file ,
1413 flac ,
1514 fmt ,
2524 libxslt ,
2625 nlohmann_json ,
2726 pugixml ,
28- qtbase ,
29- qtmultimedia ,
30- qtwayland ,
27+ qt6 ,
3128 utf8cpp ,
3229 xdg-utils ,
3330 zlib ,
31+ nix-update-script ,
3432 withGUI ? true ,
35- wrapQtAppsHook ,
3633} :
3734
3835let
5350 '' ;
5451
5552in
56- stdenv . mkDerivation rec {
53+ stdenv . mkDerivation ( finalAttrs : {
5754 pname = "mkvtoolnix" ;
58- version = "87 .0" ;
55+ version = "91 .0" ;
5956
60- src = fetchFromGitLab {
57+ src = fetchFromGitea {
58+ domain = "codeberg.org" ;
6159 owner = "mbunkus" ;
6260 repo = "mkvtoolnix" ;
63- rev = "release-${ version } " ;
64- hash = "sha256-UU57ZgH1sxCXspwfKXScw08aJYiv+k526U8q8N1tA+4 =" ;
61+ tag = "release-${ finalAttrs . version } " ;
62+ hash = "sha256-cBzW8zj2JxzhdMkvs8nWiBID/8FSMT7FkrZ78c0f0ts =" ;
6563 } ;
6664
67- patches = [
68- ( fetchpatch2 {
69- url = "https://gitlab.com/mbunkus/mkvtoolnix/-/commit/fc83003f541ac690fe308c3f4ac36e62814a40db.diff" ;
70- hash = "sha256-HOS79g5xm70upV5Okv1COEg0SanXs7brRRB59Ofx5HA=" ;
71- } )
72- ] ;
65+ passthru = {
66+ updateScript = nix-update-script {
67+ extraArgs = [ "--version-regex=release-(.*)" ] ;
68+ } ;
69+ } ;
7370
7471 nativeBuildInputs = [
7572 autoreconfHook
@@ -79,7 +76,7 @@ stdenv.mkDerivation rec {
7976 libxslt
8077 pkg-config
8178 rake
82- ] ++ optionals withGUI [ wrapQtAppsHook ] ;
79+ ] ++ optionals withGUI [ qt6 . wrapQtAppsHook ] ;
8380
8481 # qtbase and qtmultimedia are needed without the GUI
8582 buildInputs =
@@ -97,14 +94,14 @@ stdenv.mkDerivation rec {
9794 libvorbis
9895 nlohmann_json
9996 pugixml
100- qtbase
101- qtmultimedia
97+ qt6 . qtbase
98+ qt6 . qtmultimedia
10299 utf8cpp
103100 xdg-utils
104101 zlib
105102 ]
106103 ++ optionals withGUI [ cmark ]
107- ++ optionals stdenv . hostPlatform . isLinux [ qtwayland ] ;
104+ ++ optionals stdenv . hostPlatform . isLinux [ qt6 . qtwayland ] ;
108105
109106 # autoupdate is not needed but it silences a ton of pointless warnings
110107 postPatch = ''
@@ -116,7 +113,6 @@ stdenv.mkDerivation rec {
116113 "--disable-debug"
117114 "--disable-precompiled-headers"
118115 "--disable-profiling"
119- "--disable-static-qt"
120116 "--disable-update-check"
121117 "--enable-optimization"
122118 "--with-boost-libdir=${ getLib boost } /lib"
@@ -141,15 +137,15 @@ stdenv.mkDerivation rec {
141137 wrapQtApp $out/bin/mkvtoolnix-gui
142138 '' ;
143139
144- meta = with lib ; {
140+ meta = {
145141 description = "Cross-platform tools for Matroska" ;
146142 homepage = "https://mkvtoolnix.download/" ;
147- license = licenses . gpl2Only ;
143+ license = lib . licenses . gpl2Only ;
148144 mainProgram = if withGUI then "mkvtoolnix-gui" else "mkvtoolnix" ;
149- maintainers = with maintainers ; [
145+ maintainers = with lib . maintainers ; [
150146 codyopel
151147 rnhmjoj
152148 ] ;
153- platforms = platforms . unix ;
149+ platforms = lib . platforms . unix ;
154150 } ;
155- }
151+ } )
0 commit comments