diff --git a/pkgs/by-name/co/collabora-online/add-missing-poco-includes.patch b/pkgs/by-name/co/collabora-online/add-missing-poco-includes.patch new file mode 100644 index 0000000000000..f1e79aea02b51 --- /dev/null +++ b/pkgs/by-name/co/collabora-online/add-missing-poco-includes.patch @@ -0,0 +1,17 @@ +diff --git a/common/JsonUtil.hpp b/common/JsonUtil.hpp +index 564812e0e6..b7eb8fe0b4 100644 +--- a/common/JsonUtil.hpp ++++ b/common/JsonUtil.hpp +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + namespace JsonUtil + { +@@ -248,4 +249,3 @@ inline std::string escapeJSONValue(std::string val) + } // end namespace JsonUtil + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +- diff --git a/pkgs/by-name/co/collabora-online/package.nix b/pkgs/by-name/co/collabora-online/package.nix index 62c33c455c327..1d867eb6f3ffb 100644 --- a/pkgs/by-name/co/collabora-online/package.nix +++ b/pkgs/by-name/co/collabora-online/package.nix @@ -63,7 +63,12 @@ stdenv.mkDerivation (finalAttrs: { "--with-lokit-path=${libreoffice-collabora.src}/include" ]; - patches = [ ./fix-file-server-regex.patch ]; + patches = [ + ./fix-file-server-regex.patch + # Work around missing includes in upstream + # https://github.com/CollaboraOnline/online/issues/11175 + ./add-missing-poco-includes.patch + ]; postPatch = '' cp ${./package-lock.json} ${finalAttrs.npmRoot}/package-lock.json diff --git a/pkgs/by-name/cr/craftos-pc/fix-poco-header-includes.patch b/pkgs/by-name/cr/craftos-pc/fix-poco-header-includes.patch new file mode 100644 index 0000000000000..6eba17581e0ba --- /dev/null +++ b/pkgs/by-name/cr/craftos-pc/fix-poco-header-includes.patch @@ -0,0 +1,37 @@ +diff --git a/src/configuration.cpp b/src/configuration.cpp +index 2196121..0c5cf27 100644 +--- a/src/configuration.cpp ++++ b/src/configuration.cpp +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include "platform.hpp" + #include "runtime.hpp" + #include "terminal/SDLTerminal.hpp" +diff --git a/src/main.cpp b/src/main.cpp +index 9ab0814..38976a2 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -34,6 +34,7 @@ static void* releaseNotesThread(void* data); + #include + #include + #include ++#include + #ifndef __EMSCRIPTEN__ + #include + #include +diff --git a/src/util.hpp b/src/util.hpp +index b8ab2d1..c643b96 100644 +--- a/src/util.hpp ++++ b/src/util.hpp +@@ -21,6 +21,8 @@ extern "C" { + #include + #include + #include ++#include ++#include + #include + #include + #include diff --git a/pkgs/by-name/cr/craftos-pc/package.nix b/pkgs/by-name/cr/craftos-pc/package.nix index 535b50b0f138b..f9774c9f20863 100644 --- a/pkgs/by-name/cr/craftos-pc/package.nix +++ b/pkgs/by-name/cr/craftos-pc/package.nix @@ -1,17 +1,18 @@ -{ lib -, stdenv -, fetchFromGitHub -, callPackage -, patchelf -, unzip -, poco -, openssl -, SDL2 -, SDL2_mixer -, ncurses -, libpng -, pngpp -, libwebp +{ + lib, + stdenv, + fetchFromGitHub, + callPackage, + patchelf, + unzip, + poco, + openssl, + SDL2, + SDL2_mixer, + ncurses, + libpng, + pngpp, + libwebp, }: let @@ -41,8 +42,20 @@ stdenv.mkDerivation rec { hash = "sha256-DbxAsXxpsa42dF6DaLmgIa+Hs/PPqJ4dE97PoKxG2Ig="; }; - nativeBuildInputs = [ patchelf unzip ]; - buildInputs = [ poco openssl SDL2 SDL2_mixer ncurses libpng pngpp libwebp ]; + nativeBuildInputs = [ + patchelf + unzip + ]; + buildInputs = [ + poco + openssl + SDL2 + SDL2_mixer + ncurses + libpng + pngpp + libwebp + ]; strictDeps = true; preBuild = '' @@ -57,6 +70,12 @@ stdenv.mkDerivation rec { runHook postBuild ''; + patches = [ + # fix includes of poco headers + # https://github.com/trofi/nixpkgs/pull/5 + ./fix-poco-header-includes.patch + ]; + dontStrip = true; installPhase = '' @@ -87,9 +106,15 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Implementation of the CraftOS-PC API written in C++ using SDL"; homepage = "https://www.craftos-pc.cc"; - license = with licenses; [ mit free ]; + license = with licenses; [ + mit + free + ]; platforms = platforms.linux; - maintainers = with maintainers; [ siraben tomodachi94 ]; + maintainers = with maintainers; [ + siraben + tomodachi94 + ]; mainProgram = "craftos"; }; } diff --git a/pkgs/by-name/po/poco/disable-internal-pcre-files-for-non-static-builds.patch b/pkgs/by-name/po/poco/disable-internal-pcre-files-for-static-builds.patch similarity index 100% rename from pkgs/by-name/po/poco/disable-internal-pcre-files-for-non-static-builds.patch rename to pkgs/by-name/po/poco/disable-internal-pcre-files-for-static-builds.patch diff --git a/pkgs/by-name/po/poco/package.nix b/pkgs/by-name/po/poco/package.nix index ba4777666ec89..3f1c71b535149 100644 --- a/pkgs/by-name/po/poco/package.nix +++ b/pkgs/by-name/po/poco/package.nix @@ -36,6 +36,7 @@ stdenv.mkDerivation rec { utf8proc libmysqlclient ]; + propagatedBuildInputs = [ zlib pcre2 @@ -58,9 +59,9 @@ stdenv.mkDerivation rec { ]; patches = [ - # poco builds its own version of pcre, disable it + # poco builds its own version of pcre, disable it for static builds # https://github.com/pocoproject/poco/issues/4871 - ./disable-internal-pcre-files-for-non-static-builds.patch + ./disable-internal-pcre-files-for-static-builds.patch ]; postFixup = ''