|
1 | 1 | { |
2 | 2 | stdenv, |
3 | 3 | lib, |
| 4 | + buildPackages, |
4 | 5 | fetchurl, |
5 | 6 | pkg-config, |
6 | 7 | gnome, |
@@ -133,25 +134,40 @@ stdenv.mkDerivation rec { |
133 | 134 | json-glib |
134 | 135 | ]; |
135 | 136 |
|
136 | | - cmakeFlags = [ |
137 | | - "-DENABLE_VALA_BINDINGS=ON" |
138 | | - "-DENABLE_INTROSPECTION=ON" |
139 | | - "-DINCLUDE_INSTALL_DIR=${placeholder "dev"}/include" |
140 | | - "-DWITH_PHONENUMBER=ON" |
141 | | - "-DENABLE_GTK=${lib.boolToString withGtk3}" |
142 | | - "-DENABLE_EXAMPLES=${lib.boolToString withGtk3}" |
143 | | - "-DENABLE_CANBERRA=${lib.boolToString withGtk3}" |
144 | | - "-DENABLE_GTK4=${lib.boolToString withGtk4}" |
145 | | - "-DENABLE_OAUTH2_WEBKITGTK=${lib.boolToString (withGtk3 && enableOAuth2)}" |
146 | | - "-DENABLE_OAUTH2_WEBKITGTK4=${lib.boolToString (withGtk4 && enableOAuth2)}" |
147 | | - ]; |
| 137 | + cmakeFlags = |
| 138 | + [ |
| 139 | + "-DENABLE_VALA_BINDINGS=ON" |
| 140 | + "-DENABLE_INTROSPECTION=ON" |
| 141 | + "-DINCLUDE_INSTALL_DIR=${placeholder "dev"}/include" |
| 142 | + "-DWITH_PHONENUMBER=ON" |
| 143 | + "-DENABLE_GTK=${lib.boolToString withGtk3}" |
| 144 | + "-DENABLE_EXAMPLES=${lib.boolToString withGtk3}" |
| 145 | + "-DENABLE_CANBERRA=${lib.boolToString withGtk3}" |
| 146 | + "-DENABLE_GTK4=${lib.boolToString withGtk4}" |
| 147 | + "-DENABLE_OAUTH2_WEBKITGTK=${lib.boolToString (withGtk3 && enableOAuth2)}" |
| 148 | + "-DENABLE_OAUTH2_WEBKITGTK4=${lib.boolToString (withGtk4 && enableOAuth2)}" |
| 149 | + ] |
| 150 | + ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ |
| 151 | + (lib.cmakeFeature "CMAKE_CROSSCOMPILING_EMULATOR" (stdenv.hostPlatform.emulator buildPackages)) |
| 152 | + ]; |
148 | 153 |
|
149 | | - postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' |
150 | | - substituteInPlace cmake/modules/SetupBuildFlags.cmake \ |
151 | | - --replace "-Wl,--no-undefined" "" |
152 | | - substituteInPlace src/services/evolution-alarm-notify/e-alarm-notify.c \ |
153 | | - --replace "G_OS_WIN32" "__APPLE__" |
154 | | - ''; |
| 154 | + strictDeps = true; |
| 155 | + |
| 156 | + postPatch = |
| 157 | + lib.optionalString stdenv.hostPlatform.isDarwin '' |
| 158 | + substituteInPlace cmake/modules/SetupBuildFlags.cmake \ |
| 159 | + --replace "-Wl,--no-undefined" "" |
| 160 | + substituteInPlace src/services/evolution-alarm-notify/e-alarm-notify.c \ |
| 161 | + --replace "G_OS_WIN32" "__APPLE__" |
| 162 | + '' |
| 163 | + + lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' |
| 164 | + substituteInPlace src/addressbook/libebook-contacts/CMakeLists.txt --replace-fail \ |
| 165 | + 'COMMAND ''${CMAKE_CURRENT_BINARY_DIR}/gen-western-table' \ |
| 166 | + 'COMMAND ${stdenv.hostPlatform.emulator buildPackages} ''${CMAKE_CURRENT_BINARY_DIR}/gen-western-table' |
| 167 | + substituteInPlace src/camel/CMakeLists.txt --replace-fail \ |
| 168 | + 'COMMAND ''${CMAKE_CURRENT_BINARY_DIR}/camel-gen-tables' \ |
| 169 | + 'COMMAND ${stdenv.hostPlatform.emulator buildPackages} ''${CMAKE_CURRENT_BINARY_DIR}/camel-gen-tables' |
| 170 | + ''; |
155 | 171 |
|
156 | 172 | postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' |
157 | 173 | ln -s $out/lib/evolution-data-server/*.dylib $out/lib/ |
|
0 commit comments