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