diff options
Diffstat (limited to 'pkgs/development/libraries/libyang/default.nix')
-rw-r--r-- | pkgs/development/libraries/libyang/default.nix | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libyang/default.nix b/pkgs/development/libraries/libyang/default.nix new file mode 100644 index 0000000000000..6a07371261ae6 --- /dev/null +++ b/pkgs/development/libraries/libyang/default.nix @@ -0,0 +1,61 @@ +{ stdenv +, lib +, fetchFromGitHub + +# build time +, cmake +, pkg-config + +# run time +, pcre2 + +# update script +, genericUpdater +, common-updater-scripts +}: + +stdenv.mkDerivation rec { + pname = "libyang"; + version = "2.0.112"; + + src = fetchFromGitHub { + owner = "CESNET"; + repo = "libyang"; + rev = "v${version}"; + sha256 = "sha256-f8x0tC3XcQ9fnUE987GYw8qEo/B+J759vpCImqG3QWs="; + }; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + pcre2 + ]; + + cmakeFlags = [ + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + "-DCMAKE_BUILD_TYPE:String=Release" + ]; + + passthru.updateScript = genericUpdater { + inherit pname version; + versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}"; + 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 ]; + }; +} |