1{ lib
2, stdenv
3, fetchFromGitLab
4, cmake
5, pkg-config
6, spdlog
7, nlohmann_json
8, systemd
9}:
10
11stdenv.mkDerivation rec {
12 pname = "ananicy-cpp";
13 version = "1.0.2";
14
15 src = fetchFromGitLab {
16 owner = "ananicy-cpp";
17 repo = "ananicy-cpp";
18 rev = "v${version}";
19 fetchSubmodules = true;
20 sha256 = "sha256-iR7yIIGJbRwu62GIEYi70PjtlKXmkPYqSJtMddspBKA=";
21 };
22
23 nativeBuildInputs = [
24 cmake
25 pkg-config
26 ];
27
28 buildInputs = [
29 spdlog
30 nlohmann_json
31 systemd
32 ];
33
34 cmakeFlags = [
35 "-DUSE_EXTERNAL_JSON=ON"
36 "-DUSE_EXTERNAL_SPDLOG=ON"
37 "-DUSE_EXTERNAL_FMTLIB=ON"
38 "-DVERSION=${version}"
39 ];
40
41 postInstall = ''
42 rm -rf "$out"/include
43 rm -rf "$out"/lib/cmake
44 '';
45
46 meta = with lib; {
47 homepage = "https://gitlab.com/ananicy-cpp/ananicy-cpp";
48 description = "Rewrite of ananicy in c++ for lower cpu and memory usage";
49 license = licenses.gpl3Only;
50 platforms = platforms.linux;
51 maintainers = with maintainers; [ artturin ];
52 };
53}