2022-01-13 20:06:32 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
# build time
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
|
|
|
|
# run time
|
|
|
|
, pcre2
|
|
|
|
|
|
|
|
# update script
|
2022-03-05 16:20:37 +00:00
|
|
|
, gitUpdater
|
2022-01-13 20:06:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libyang";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.1.128";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CESNET";
|
|
|
|
repo = "libyang";
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
sha256 = "sha256-qwEHGUizjsWQZSwQkh7Clevd1OQfj1mse7Q8YiRCMyQ=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pcre2
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
|
|
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
|
|
|
];
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
2022-01-13 20:06:32 +00:00
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "YANG data modelling language parser and toolkit";
|
|
|
|
longDescription = ''
|
|
|
|
libyang is a YANG data modelling language parser and toolkit written (and
|
|
|
|
providing API) in C. The library is used e.g. in libnetconf2, Netopeer2,
|
|
|
|
sysrepo or FRRouting projects.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/CESNET/libyang";
|
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ woffs ];
|
|
|
|
};
|
|
|
|
}
|