File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8787 ] ;
8888 } ) ;
8989
90+ # Static gmp for Windows builds
91+ gmpStatic = pkgsForHost . gmp . overrideAttrs ( old : {
92+ dontDisableStatic = true ;
93+ configureFlags = ( old . configureFlags or [ ] ) ++ [
94+ "--enable-static"
95+ "--disable-shared"
96+ ] ;
97+ } ) ;
98+
9099 # libpng that uses zlib-ng instead of plain zlib
91100 libpngWithZlibNg = pkgsForHost . libpng . override {
92101 zlib = zlibNgStatic ;
115124 withShared = false ;
116125 withStatic = true ;
117126 zlib = zlibNgStatic ;
127+ gmp = gmpStatic ;
118128
119129 # Disable CUDA/LLVM to avoid compiler-rt dependency
120130 withCuda = false ;
201211 # Use static versions of libpng and libjpeg for Windows
202212 (
203213 if isWindows then
204- libjpeg . override {
214+ ( libjpeg . override {
205215 enableStatic = true ;
206216 enableShared = false ;
207- }
217+ } ) . overrideAttrs
218+ ( old : {
219+ cmakeFlags = ( old . cmakeFlags or [ ] ) ++ [
220+ "-DWITH_SIMD=0"
221+ ] ;
222+ # Fix the existing mingw-boolean patch which leaves an unterminated #ifndef
223+ postPatch = ( old . postPatch or "" ) + ''
224+ sed -i '/#ifndef HAVE_BOOLEAN/d' src/jmorecfg.h
225+ '' ;
226+ } )
208227 else
209228 libjpeg
210229 )
253272 "-Denable_tests=false"
254273 ] ;
255274 } ) )
275+ gmpStatic
256276 ]
257277 ++ pkgsForHost . lib . optionals ( pkgsForHost . stdenv . isLinux && ! isStatic ) [
258278 glib
Original file line number Diff line number Diff line change 1+ configure :
2+ cmake -S . -B build -G Ninja -DCMAKe_BUILT_TYPE=Release
3+
4+ build : configure
5+ cmake --build ./ build
6+
7+ test : build
8+ ctest --test-dir ./ build
You can’t perform that action at this time.
0 commit comments