depot/third_party/nixpkgs/pkgs/development/libraries/libyang/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

57 lines
1.1 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
# build time
, cmake
, pkg-config
# run time
, pcre2
# update script
, gitUpdater
}:
stdenv.mkDerivation rec {
pname = "libyang";
version = "2.1.128";
src = fetchFromGitHub {
owner = "CESNET";
repo = "libyang";
rev = "v${version}";
sha256 = "sha256-qwEHGUizjsWQZSwQkh7Clevd1OQfj1mse7Q8YiRCMyQ=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
pcre2
];
cmakeFlags = [
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
];
passthru.updateScript = gitUpdater {
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 ];
};
}