2021-06-08 21:32:14 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2021-12-22 19:31:51 +01:00
|
|
|
|
|
|
|
# build time
|
2021-06-08 21:32:14 +02:00
|
|
|
, cmake
|
|
|
|
, pkg-config
|
2021-12-22 19:31:51 +01:00
|
|
|
|
|
|
|
# run time
|
|
|
|
, pcre2
|
|
|
|
|
|
|
|
# update script
|
2022-02-21 02:11:49 +01:00
|
|
|
, gitUpdater
|
2021-06-08 21:32:14 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libyang";
|
2022-05-07 07:47:22 +02:00
|
|
|
version = "2.0.194";
|
2021-06-08 21:32:14 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CESNET";
|
|
|
|
repo = "libyang";
|
|
|
|
rev = "v${version}";
|
2022-05-07 07:47:22 +02:00
|
|
|
sha256 = "sha256-5dgSBXJIeGXT+jGqT2MFqtsEFcIn+ULjybnyXz+95Gk=";
|
2021-06-08 21:32:14 +02:00
|
|
|
};
|
|
|
|
|
2021-12-22 19:31:51 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pcre2
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
|
|
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
|
|
|
"-DCMAKE_BUILD_TYPE:String=Release"
|
|
|
|
];
|
2021-06-08 21:32:14 +02:00
|
|
|
|
2022-02-21 02:11:49 +01:00
|
|
|
passthru.updateScript = gitUpdater {
|
2021-06-08 21:32:14 +02:00
|
|
|
inherit pname version;
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|