2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
2022-11-27 09:42:12 +00:00
|
|
|
, stdenv
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchFromGitLab
|
|
|
|
, cmake
|
2022-11-27 09:42:12 +00:00
|
|
|
, pkg-config
|
2021-12-06 16:07:01 +00:00
|
|
|
, spdlog
|
|
|
|
, nlohmann_json
|
|
|
|
, systemd
|
|
|
|
}:
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "ananicy-cpp";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "1.0.2";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "ananicy-cpp";
|
|
|
|
repo = "ananicy-cpp";
|
2022-11-27 09:42:12 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2023-01-11 07:51:40 +00:00
|
|
|
sha256 = "sha256-iR7yIIGJbRwu62GIEYi70PjtlKXmkPYqSJtMddspBKA=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2022-11-27 09:42:12 +00:00
|
|
|
pkg-config
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
spdlog
|
|
|
|
nlohmann_json
|
|
|
|
systemd
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2022-11-27 09:42:12 +00:00
|
|
|
"-DUSE_EXTERNAL_JSON=ON"
|
2021-12-06 16:07:01 +00:00
|
|
|
"-DUSE_EXTERNAL_SPDLOG=ON"
|
|
|
|
"-DUSE_EXTERNAL_FMTLIB=ON"
|
2022-11-27 09:42:12 +00:00
|
|
|
"-DVERSION=${version}"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
postInstall = ''
|
|
|
|
rm -rf "$out"/include
|
|
|
|
rm -rf "$out"/lib/cmake
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://gitlab.com/ananicy-cpp/ananicy-cpp";
|
|
|
|
description = "Rewrite of ananicy in c++ for lower cpu and memory usage";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ artturin ];
|
|
|
|
};
|
|
|
|
}
|