Files
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

71 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitLab,
gitUpdater,
testers,
cmake,
pkg-config,
gtest,
doxygen,
graphviz,
lomiri,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "properties-cpp";
version = "0.0.3";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/lib-cpp/properties-cpp";
rev = finalAttrs.version;
hash = "sha256-C/BDEuKNMQHOjATO5aWBptjIlgfv6ykzjFAsHb6uP3Q=";
};
postPatch = ''
# GTest needs C++17
# Remove when https://gitlab.com/ubports/development/core/lib-cpp/properties-cpp/-/merge_requests/3 merged & in release
substituteInPlace CMakeLists.txt \
--replace-fail 'std=c++14' 'std=c++17'
''
+ lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
sed -i "/add_subdirectory(tests)/d" CMakeLists.txt
'';
strictDeps = true;
nativeBuildInputs = [
cmake
doxygen
graphviz
pkg-config
];
buildInputs = [
lomiri.cmake-extras
];
checkInputs = [
gtest
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = gitUpdater { };
};
meta = with lib; {
homepage = "https://gitlab.com/ubports/development/core/lib-cpp/properties-cpp";
description = "Very simple convenience library for handling properties and signals in C++11";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ edwtjo ];
platforms = platforms.linux;
pkgConfigModules = [
"properties-cpp"
];
};
})