2021-11-08 16:31:01 +01:00
|
|
|
{ lib
|
2022-11-22 23:20:33 +01:00
|
|
|
, stdenv
|
2021-11-08 16:31:01 +01:00
|
|
|
, fetchFromGitLab
|
|
|
|
, cmake
|
2022-11-22 23:20:33 +01:00
|
|
|
, pkg-config
|
2021-11-08 16:31:01 +01:00
|
|
|
, spdlog
|
|
|
|
, nlohmann_json
|
|
|
|
, systemd
|
|
|
|
}:
|
|
|
|
|
2022-11-22 23:20:33 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2021-11-08 16:31:01 +01:00
|
|
|
pname = "ananicy-cpp";
|
2023-01-09 06:20:57 +01:00
|
|
|
version = "1.0.2";
|
2021-11-08 16:31:01 +01:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "ananicy-cpp";
|
|
|
|
repo = "ananicy-cpp";
|
2022-11-22 23:20:33 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2023-01-09 06:20:57 +01:00
|
|
|
sha256 = "sha256-iR7yIIGJbRwu62GIEYi70PjtlKXmkPYqSJtMddspBKA=";
|
2021-11-08 16:31:01 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2022-11-22 23:20:33 +01:00
|
|
|
pkg-config
|
2021-11-08 16:31:01 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
spdlog
|
|
|
|
nlohmann_json
|
|
|
|
systemd
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2022-11-22 23:20:33 +01:00
|
|
|
"-DUSE_EXTERNAL_JSON=ON"
|
2021-11-08 16:31:01 +01:00
|
|
|
"-DUSE_EXTERNAL_SPDLOG=ON"
|
|
|
|
"-DUSE_EXTERNAL_FMTLIB=ON"
|
2022-11-22 23:20:33 +01:00
|
|
|
"-DVERSION=${version}"
|
2021-11-08 16:31:01 +01:00
|
|
|
];
|
|
|
|
|
2022-11-22 23:20:33 +01:00
|
|
|
postInstall = ''
|
|
|
|
rm -rf "$out"/include
|
|
|
|
rm -rf "$out"/lib/cmake
|
|
|
|
'';
|
|
|
|
|
2021-11-08 16:31:01 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|