Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poco: 1.13.3 -> 1.14.1; fix build with new poco in dependent packages #383163

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
277 changes: 170 additions & 107 deletions pkgs/applications/networking/mumble/default.nix
Original file line number Diff line number Diff line change
@@ -1,111 +1,173 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, qt5, cmake
, avahi, boost, libopus, libsndfile, protobuf, speex, libcap
, alsa-lib, python3
, rnnoise
, nixosTests
, poco
, flac
, libogg
, libvorbis
, stdenv_32bit
, iceSupport ? true, zeroc-ice
, jackSupport ? false, libjack2
, pipewireSupport ? true, pipewire
, pulseSupport ? true, libpulseaudio
, speechdSupport ? false, speechd-minimal
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
pkg-config,
qt5,
cmake,
avahi,
boost,
libopus,
libsndfile,
protobuf,
speex,
libcap,
utf8proc,
alsa-lib,
python3,
rnnoise,
nixosTests,
poco,
flac,
libogg,
libvorbis,
stdenv_32bit,
iceSupport ? true,
zeroc-ice,
jackSupport ? false,
libjack2,
pipewireSupport ? true,
pipewire,
pulseSupport ? true,
libpulseaudio,
speechdSupport ? false,
speechd-minimal,
}:

let
generic = overrides: source: (overrides.stdenv or stdenv).mkDerivation (source // overrides // {
pname = overrides.type;
version = source.version;

nativeBuildInputs = [ cmake pkg-config python3 qt5.wrapQtAppsHook qt5.qttools ]
++ (overrides.nativeBuildInputs or [ ]);

buildInputs = [ avahi boost poco protobuf ]
++ (overrides.buildInputs or [ ]);

cmakeFlags = [
"-D g15=OFF"
"-D CMAKE_CXX_STANDARD=17" # protobuf >22 requires C++ 17
] ++ (overrides.configureFlags or [ ]);

preConfigure = ''
patchShebangs scripts
'';

passthru.tests.connectivity = nixosTests.mumble;

meta = with lib; {
description = "Low-latency, high quality voice chat software";
homepage = "https://mumble.info";
license = licenses.bsd3;
maintainers = with maintainers; [ felixsinger lilacious ];
platforms = platforms.linux;
};
});

client = source: generic {
type = "mumble";

nativeBuildInputs = [ qt5.qttools ];
buildInputs = [ flac libogg libopus libsndfile libvorbis qt5.qtsvg rnnoise speex ]
++ lib.optional (!jackSupport) alsa-lib
++ lib.optional jackSupport libjack2
++ lib.optional speechdSupport speechd-minimal
++ lib.optional pulseSupport libpulseaudio
++ lib.optional pipewireSupport pipewire;

configureFlags = [
"-D server=OFF"
"-D bundled-celt=ON"
"-D bundled-opus=OFF"
"-D bundled-speex=OFF"
"-D bundle-qt-translations=OFF"
"-D update=OFF"
"-D overlay-xcompile=OFF"
"-D oss=OFF"
"-D warnings-as-errors=OFF" # conversion error workaround
] ++ lib.optional (!speechdSupport) "-D speechd=OFF"
++ lib.optional (!pulseSupport) "-D pulseaudio=OFF"
++ lib.optional (!pipewireSupport) "-D pipewire=OFF"
++ lib.optional jackSupport "-D alsa=OFF -D jackaudio=ON";

env.NIX_CFLAGS_COMPILE = lib.optionalString speechdSupport "-I${speechd-minimal}/include/speech-dispatcher";

postFixup = ''
wrapProgram $out/bin/mumble \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath (lib.optional pulseSupport libpulseaudio ++ lib.optional pipewireSupport pipewire)}"
'';
} source;

server = source: generic {
type = "murmur";

configureFlags = [
"-D client=OFF"
] ++ lib.optional (!iceSupport) "-D ice=OFF"
++ lib.optionals iceSupport [
"-D Ice_HOME=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}"
"-D CMAKE_PREFIX_PATH=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}"
"-D Ice_SLICE_DIR=${lib.getDev zeroc-ice}/share/ice/slice"
generic =
overrides: source:
(overrides.stdenv or stdenv).mkDerivation (
source
// overrides
// {
pname = overrides.type;
version = source.version;

nativeBuildInputs = [
cmake
pkg-config
python3
qt5.wrapQtAppsHook
qt5.qttools
] ++ (overrides.nativeBuildInputs or [ ]);

buildInputs = [
avahi
boost
poco
protobuf
] ++ (overrides.buildInputs or [ ]);

cmakeFlags = [
"-D g15=OFF"
"-D CMAKE_CXX_STANDARD=17" # protobuf >22 requires C++ 17
Comment on lines +64 to +65
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are helpers available that make setting cmakeFlags more "semantic" :)

Suggested change
"-D g15=OFF"
"-D CMAKE_CXX_STANDARD=17" # protobuf >22 requires C++ 17
(lib.cmakeBool "g15" false)
(lib.cmakeFeature "CMAKE_CXX_STANDARD" "17") # protobuf >22 requires C++ 17

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applied

] ++ (overrides.configureFlags or [ ]);

preConfigure = ''
patchShebangs scripts
'';

passthru.tests.connectivity = nixosTests.mumble;

meta = with lib; {
description = "Low-latency, high quality voice chat software";
homepage = "https://mumble.info";
license = licenses.bsd3;
maintainers = with maintainers; [
felixsinger
lilacious
];
platforms = platforms.linux;
};
}
);

client =
source:
generic {
type = "mumble";

nativeBuildInputs = [ qt5.qttools ];
buildInputs =
[
flac
libogg
libopus
libsndfile
libvorbis
qt5.qtsvg
rnnoise
speex
utf8proc
]
++ lib.optional (!jackSupport) alsa-lib
++ lib.optional jackSupport libjack2
++ lib.optional speechdSupport speechd-minimal
++ lib.optional pulseSupport libpulseaudio
++ lib.optional pipewireSupport pipewire;

configureFlags =
[
"-D server=OFF"
"-D bundled-celt=ON"
"-D bundled-opus=OFF"
"-D bundled-speex=OFF"
"-D bundle-qt-translations=OFF"
"-D update=OFF"
"-D overlay-xcompile=OFF"
"-D oss=OFF"
"-D warnings-as-errors=OFF" # conversion error workaround
]
++ lib.optional (!speechdSupport) "-D speechd=OFF"
++ lib.optional (!pulseSupport) "-D pulseaudio=OFF"
++ lib.optional (!pipewireSupport) "-D pipewire=OFF"
++ lib.optional jackSupport "-D alsa=OFF -D jackaudio=ON";

env.NIX_CFLAGS_COMPILE = lib.optionalString speechdSupport "-I${speechd-minimal}/include/speech-dispatcher";

postFixup = ''
wrapProgram $out/bin/mumble \
--prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath (
lib.optional pulseSupport libpulseaudio ++ lib.optional pipewireSupport pipewire
)
}"
'';
} source;

server =
source:
generic {
type = "murmur";

configureFlags =
[
"-D client=OFF"
]
++ lib.optional (!iceSupport) "-D ice=OFF"
++ lib.optionals iceSupport [
"-D Ice_HOME=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}"
"-D CMAKE_PREFIX_PATH=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}"
"-D Ice_SLICE_DIR=${lib.getDev zeroc-ice}/share/ice/slice"
];

buildInputs = [ libcap ] ++ lib.optional iceSupport zeroc-ice;
} source;

overlay =
source:
generic {
stdenv = stdenv_32bit;
type = "mumble-overlay";

configureFlags = [
"-D server=OFF"
"-D client=OFF"
"-D overlay=ON"
];

buildInputs = [ libcap ]
++ lib.optional iceSupport zeroc-ice;
} source;

overlay = source: generic {
stdenv = stdenv_32bit;
type = "mumble-overlay";

configureFlags = [
"-D server=OFF"
"-D client=OFF"
"-D overlay=ON"
];
} source;
} source;

source = rec {
version = "1.5.735";
Expand All @@ -119,8 +181,9 @@ let
fetchSubmodules = true;
};
};
in {
mumble = lib.recursiveUpdate (client source) {meta.mainProgram = "mumble";};
murmur = lib.recursiveUpdate (server source) {meta.mainProgram = "mumble-server";};
in
{
mumble = lib.recursiveUpdate (client source) { meta.mainProgram = "mumble"; };
murmur = lib.recursiveUpdate (server source) { meta.mainProgram = "mumble-server"; };
overlay = overlay source;
}
50 changes: 50 additions & 0 deletions pkgs/applications/radio/pothos/cstring.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Submodule blocks contains modified content
diff --git a/blocks/file/BinaryFileSink.cpp b/blocks/file/BinaryFileSink.cpp
index 31c9a41..0083b0d 100644
--- a/blocks/file/BinaryFileSink.cpp
+++ b/blocks/file/BinaryFileSink.cpp
@@ -13,6 +13,7 @@
#endif //_MSC_VER
#include <stdio.h>
#include <cerrno>
+#include <cstring>

#ifndef O_BINARY
#define O_BINARY 0
diff --git a/blocks/file/BinaryFileSource.cpp b/blocks/file/BinaryFileSource.cpp
index 0151231..379d383 100644
--- a/blocks/file/BinaryFileSource.cpp
+++ b/blocks/file/BinaryFileSource.cpp
@@ -13,6 +13,7 @@
#endif //_MSC_VER
#include <stdio.h>
#include <cerrno>
+#include <cstring>

#ifndef O_BINARY
#define O_BINARY 0
diff --git a/blocks/file/TextFileSink.cpp b/blocks/file/TextFileSink.cpp
index b4b2f08..2be66e2 100644
--- a/blocks/file/TextFileSink.cpp
+++ b/blocks/file/TextFileSink.cpp
@@ -6,6 +6,7 @@
#include <complex>
#include <fstream>
#include <cerrno>
+#include <cstring>

/***********************************************************************
* |PothosDoc Text File Sink
Submodule soapy contains modified content
diff --git a/soapy/DemoController.cpp b/soapy/DemoController.cpp
index 4ce8ead..9a4e742 100644
--- a/soapy/DemoController.cpp
+++ b/soapy/DemoController.cpp
@@ -6,6 +6,7 @@
#include <iostream>
#include <chrono>
#include <algorithm> //min/max
+#include <cstring>

/***********************************************************************
* |PothosDoc SDR Demo Controller
8 changes: 8 additions & 0 deletions pkgs/applications/radio/pothos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
alsa-lib,
muparserx,
python3,
utf8proc,
}:

mkDerivation rec {
Expand All @@ -41,8 +42,14 @@ mkDerivation rec {
url = "https://github.com/pothosware/PothosCore/commit/092d1209b0fd0aa8a1733706c994fa95e66fd017.patch";
hash = "sha256-bZXG8kD4+1LgDV8viZrJ/DMjg8UvW7b5keJQDXurfkA=";
})
# various source files are missing imports of <cstring>
# https://github.com/pothosware/PothosBlocks/issues/80
./cstring.patch
];

# poco 1.14 requires c++17
NIX_CFLAGS_COMPILE = [ "-std=gnu++17" ];

nativeBuildInputs = [
cmake
pkg-config
Expand All @@ -62,6 +69,7 @@ mkDerivation rec {
alsa-lib
muparserx
python3
utf8proc
];

postInstall = ''
Expand Down
11 changes: 10 additions & 1 deletion pkgs/by-name/co/collabora-online/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
cairo,
cppunit,
fetchFromGitHub,
fetchpatch,
fetchNpmDeps,
lib,
libcap,
Expand Down Expand Up @@ -63,7 +64,15 @@ stdenv.mkDerivation (finalAttrs: {
"--with-lokit-path=${libreoffice-collabora.src}/include"
];

patches = [ ./fix-file-server-regex.patch ];
patches = [
./fix-file-server-regex.patch
# Remove after next release
(fetchpatch {
name = "add-missing-includes-for-poco-1.14.1";
url = "https://patch-diff.githubusercontent.com/raw/CollaboraOnline/online/pull/11196.patch";
hash = "sha256-ke4dOxITFHK3xMXIdp+zzUEGYMyDxMJrbbXTN+LaoVU=";
})
];

postPatch = ''
cp ${./package-lock.json} ${finalAttrs.npmRoot}/package-lock.json
Expand Down
Loading