Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
111 lines
2.2 KiB
Nix
111 lines
2.2 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitLab,
|
|
gitUpdater,
|
|
makeFontsConf,
|
|
testers,
|
|
# https://gitlab.com/ubports/development/core/lib-cpp/net-cpp/-/issues/5
|
|
boost186,
|
|
cmake,
|
|
curl,
|
|
doxygen,
|
|
graphviz,
|
|
gtest,
|
|
jsoncpp,
|
|
lomiri,
|
|
pkg-config,
|
|
process-cpp,
|
|
properties-cpp,
|
|
python3,
|
|
validatePkgConfig,
|
|
writableTmpDirAsHomeHook,
|
|
}:
|
|
|
|
let
|
|
pythonEnv = python3.withPackages (
|
|
ps: with ps; [
|
|
httpbin
|
|
]
|
|
);
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "net-cpp";
|
|
version = "3.2.0";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "ubports";
|
|
repo = "development/core/lib-cpp/net-cpp";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-JfVSAwBWtHw7a0CtY5C1xuxThO3FbS4MgNuIO1CGuts=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
"doc"
|
|
];
|
|
|
|
postPatch = lib.optionalString finalAttrs.finalPackage.doCheck ''
|
|
# Use wrapped python. Removing just the /usr/bin doesn't seem to work?
|
|
substituteInPlace tests/httpbin.h.in \
|
|
--replace '/usr/bin/python3' '${lib.getExe pythonEnv}'
|
|
'';
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
doxygen
|
|
graphviz
|
|
validatePkgConfig
|
|
writableTmpDirAsHomeHook # makes doc generation quieter
|
|
];
|
|
|
|
buildInputs = [
|
|
boost186
|
|
curl
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pkg-config
|
|
pythonEnv
|
|
];
|
|
|
|
checkInputs = [
|
|
lomiri.cmake-extras
|
|
gtest
|
|
jsoncpp
|
|
process-cpp
|
|
properties-cpp
|
|
];
|
|
|
|
cmakeFlags = [
|
|
(lib.cmakeBool "ENABLE_WERROR" true)
|
|
];
|
|
|
|
env.FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
|
|
|
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
|
|
|
# Tests start HTTP server in separate process with fixed URL, parallelism breaks things
|
|
enableParallelChecking = false;
|
|
|
|
passthru = {
|
|
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
updateScript = gitUpdater { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Simple yet beautiful networking API for C++11";
|
|
homepage = "https://gitlab.com/ubports/development/core/lib-cpp/net-cpp";
|
|
changelog = "https://gitlab.com/ubports/development/core/lib-cpp/net-cpp/-/blob/${finalAttrs.version}/ChangeLog";
|
|
license = lib.licenses.lgpl3Only;
|
|
teams = [ lib.teams.lomiri ];
|
|
platforms = lib.platforms.linux;
|
|
pkgConfigModules = [
|
|
"net-cpp"
|
|
];
|
|
};
|
|
})
|