2222 miniz ,
2323 tinyxml-2 ,
2424 xorg ,
25- qtbase ,
26- qtwayland ,
27- wrapQtAppsHook ,
25+ qt6 ,
2826 copyDesktopItems ,
2927 makeDesktopItem ,
3028} :
3129
3230stdenv . mkDerivation rec {
3331 pname = "TrenchBroom" ;
34- version = "2024.1 " ;
32+ version = "2025.2 " ;
3533
3634 src = fetchFromGitHub {
3735 owner = "TrenchBroom" ;
3836 repo = "TrenchBroom" ;
39- rev = "v${ version } " ;
40- hash = "sha256-HNK/gLbew7MKN6GVStxDb2tyMgyw2l1+dhPr6fSaZ4A =" ;
37+ tag = "v${ version } " ;
38+ hash = "sha256-aOHhL0yBDgFTMcDY7RKZXRrReRiThcQdf7QMHEpRuks =" ;
4139 fetchSubmodules = true ;
4240 } ;
41+
4342 # Manually simulate a vcpkg installation so that it can link the libraries
4443 # properly.
4544 postUnpack =
@@ -87,13 +86,14 @@ stdenv.mkDerivation rec {
8786 ln -s ${ miniz } /lib/lib* $VCPKG_ROOT/installed/${ vcpkg_target } /lib/
8887 ln -s ${ tinyxml-2 } /lib/lib* $VCPKG_ROOT/installed/${ vcpkg_target } /lib/
8988 '' ;
89+
9090 postPatch = ''
9191 substituteInPlace common/src/Version.h.in \
9292 --subst-var-by APP_VERSION_YEAR ${ lib . versions . major version } \
9393 --subst-var-by APP_VERSION_NUMBER ${ lib . versions . minor version } \
9494 --subst-var-by GIT_DESCRIBE v${ version }
9595 substituteInPlace app/CMakeLists.txt \
96- --replace 'set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")' 'set(CPACK_PACKAGING_INSTALL_PREFIX "'$out'")'
96+ --replace-fail 'set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")' 'set(CPACK_PACKAGING_INSTALL_PREFIX "'$out'")'
9797 '' ;
9898
9999 nativeBuildInputs = [
@@ -102,29 +102,33 @@ stdenv.mkDerivation rec {
102102 curl
103103 git
104104 pandoc
105- wrapQtAppsHook
105+ qt6 . wrapQtAppsHook
106106 copyDesktopItems
107107 pkg-config
108108 unzip
109109 zip
110110 ] ;
111+
111112 buildInputs = [
112113 libGL
113114 libGLU
114115 xorg . libXxf86vm
115116 xorg . libSM
116117 freeimage
117118 freetype
118- qtbase
119- qtwayland
119+ qt6 . qtbase
120+ qt6 . qtwayland
121+ qt6 . qtsvg
120122 catch2
121123 fmt
122124 glew
123125 miniz
124126 tinyxml-2
125127 assimp
126128 ] ;
127- QT_PLUGIN_PATH = "${ qtbase } /${ qtbase . qtPluginPrefix } " ;
129+
130+ QT_PLUGIN_PATH = "${ qt6 . qtbase } /${ qt6 . qtbase . qtPluginPrefix } " ;
131+
128132 QT_QPA_PLATFORM = "offscreen" ;
129133
130134 cmakeFlags = [
@@ -134,6 +138,7 @@ stdenv.mkDerivation rec {
134138 # https://github.com/TrenchBroom/TrenchBroom/issues/4002#issuecomment-1125390780
135139 "-DCMAKE_PREFIX_PATH=cmake/packages"
136140 ] ;
141+
137142 ninjaFlags = [
138143 "TrenchBroom"
139144 ] ;
@@ -162,12 +167,12 @@ stdenv.mkDerivation rec {
162167 } )
163168 ] ;
164169
165- meta = with lib ; {
170+ meta = {
166171 homepage = "https://trenchbroom.github.io/" ;
167172 changelog = "https://github.com/TrenchBroom/TrenchBroom/releases/tag/v${ version } " ;
168173 description = "Level editor for Quake-engine based games" ;
169- license = licenses . gpl3Only ;
170- maintainers = with maintainers ; [ astro ] ;
174+ license = lib . licenses . gpl3Only ;
175+ maintainers = with lib . maintainers ; [ astro ] ;
171176 platforms = [ "x86_64-linux" ] ;
172177 } ;
173178}
0 commit comments