1{
2 lib,
3 stdenv,
4 build2,
5 fetchurl,
6 libbutl,
7 enableShared ? !stdenv.hostPlatform.isStatic,
8 enableStatic ? !enableShared,
9}:
10
11stdenv.mkDerivation rec {
12 pname = "libbpkg";
13 version = "0.17.0";
14 outputs = [
15 "out"
16 "dev"
17 "doc"
18 ];
19
20 src = fetchurl {
21 url = "https://pkg.cppget.org/1/alpha/build2/libbpkg-${version}.tar.gz";
22 hash = "sha256-4P4+uJGWB3iblYPuErJNr8c7/pS2UhN6LXr7MY2rWDY=";
23 };
24
25 nativeBuildInputs = [
26 build2
27 ];
28 buildInputs = [
29 libbutl
30 ];
31
32 build2ConfigureFlags = [
33 "config.bin.lib=${build2.configSharedStatic enableShared enableStatic}"
34 ];
35
36 strictDeps = true;
37
38 doCheck = true;
39
40 meta = with lib; {
41 description = "Build2 package dependency manager utility library";
42 longDescription = ''
43 This library defines the types and utilities for working with build2 packages.
44 In particular, it provides C++ classes as well as the parser and serializer
45 implementations that can be used to read, manipulate, and write package,
46 repository and signature manifests.
47 '';
48 homepage = "https://build2.org/";
49 changelog = "https://git.build2.org/cgit/libbpkg/log";
50 license = licenses.mit;
51 maintainers = with maintainers; [ r-burns ];
52 platforms = platforms.all;
53 };
54}