Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv
2, lib
3, fetchFromGitHub
4
5# build time
6, cmake
7, pkg-config
8
9# run time
10, pcre2
11
12# update script
13, gitUpdater
14}:
15
16stdenv.mkDerivation rec {
17 pname = "libyang";
18 version = "2.1.80";
19
20 src = fetchFromGitHub {
21 owner = "CESNET";
22 repo = "libyang";
23 rev = "v${version}";
24 sha256 = "sha256-3Lf8JUnzD20Xq6UswCbcWpgEBs0z4OEo7CGt0vWiPhI=";
25 };
26
27 nativeBuildInputs = [
28 cmake
29 pkg-config
30 ];
31
32 buildInputs = [
33 pcre2
34 ];
35
36 cmakeFlags = [
37 "-DCMAKE_INSTALL_LIBDIR=lib"
38 "-DCMAKE_INSTALL_INCLUDEDIR=include"
39 "-DCMAKE_BUILD_TYPE:String=Release"
40 ];
41
42 passthru.updateScript = gitUpdater {
43 rev-prefix = "v";
44 };
45
46 meta = with lib; {
47 description = "YANG data modelling language parser and toolkit";
48 longDescription = ''
49 libyang is a YANG data modelling language parser and toolkit written (and
50 providing API) in C. The library is used e.g. in libnetconf2, Netopeer2,
51 sysrepo or FRRouting projects.
52 '';
53 homepage = "https://github.com/CESNET/libyang";
54 license = with licenses; [ bsd3 ];
55 platforms = platforms.unix;
56 maintainers = with maintainers; [ woffs ];
57 };
58}