@@ -0,0 +1,58 @@
1+{ lib
2+, stdenv
3+, fetchFromGitLab
4+, cmake
5+
6+, arpa2cm
7+, doxygen
8+, e2fsprogs
9+, lmdb
10+, openssl
11+, pkg-config
12+, ragel
13+}:
14+
15+stdenv.mkDerivation rec {
16+ pname = "arpa2common";
17+ version = "2.2.14";
18+
19+ src = fetchFromGitLab {
20+ owner = "arpa2";
21+ repo = pname;
22+ rev = "v${version}";
23+ sha256 = "sha256-LWsWoHRdLWRSF9JaEwrw+CXm5Azgh7zNeq0a8Z/hijQ=";
24+ };
25+
26+ nativeBuildInputs = [
27+ cmake
28+ arpa2cm
29+ doxygen
30+ pkg-config
31+ ];
32+
33+ propagatedBuildInputs = [
34+ e2fsprogs
35+ lmdb
36+ openssl
37+ ragel
38+ ];
39+
40+ # the project uses single argument `printf` throughout the program
41+ hardeningDisable = [ "format" ];
42+
43+ meta = {
44+ description =
45+ "ARPA2 ID and ACL libraries and other core data structures for ARPA2";
46+ longDescription = ''
47+ The ARPA2 Common Library package offers elementary services that can
48+ benefit many software packages. They are designed to be easy to
49+ include, with a minimum of dependencies. At the same time, they were
50+ designed with the InternetWide Architecture in mind, thus helping to
51+ liberate users.
52+ '';
53+ homepage = "https://gitlab.com/arpa2/arpa2common";
54+ license = with lib.licenses; [ bsd2 cc-by-sa-40 cc0 isc ];
55+ maintainers = with lib.maintainers; [ fufexan ];
56+ platforms = lib.platforms.linux;
57+ };
58+}