mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 22:53:42 +00:00
ba59355e81
- Add the 'gitUpdater' helper function to update git based packages, using the 'genericUpdater' function. - Rework argument passing to the `list-git-tags' and 'list-archive-two-level-versions' scripts. - Replace 'genericUpdater' plus 'list-git-tags' by 'gitUpdater'
60 lines
1.2 KiB
Nix
60 lines
1.2 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
|
|
# build time
|
|
, cmake
|
|
, pkg-config
|
|
|
|
# run time
|
|
, pcre2
|
|
|
|
# update script
|
|
, gitUpdater
|
|
}:
|
|
|
|
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 = gitUpdater {
|
|
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 ];
|
|
};
|
|
}
|