5 , enableShared ? !stdenv.hostPlatform.isStatic
6 , enableStatic ? !enableShared
9 stdenv.mkDerivation rec {
13 outputs = [ "out" "dev" "doc" ];
16 url = "https://pkg.cppget.org/1/alpha/build2/libbutl-${version}.tar.gz";
17 sha256 = "sha256-yzs6DFt6peJPPaMQ3rtx+kiYu7H+bUuShcdnEN90WWI=";
26 # Should be true for anything built with build2,
27 # but especially important when bootstrapping
28 disallowedReferences = [ build2 ];
30 postPatch = lib.optionalString stdenv.isLinux ''
31 substituteInPlace libbutl/uuid-linux.cxx \
32 --replace '"libuuid.so' '"${lib.getLib libuuid}/lib/libuuid.so'
35 build2ConfigureFlags = [
36 "config.bin.lib=${build2.configSharedStatic enableShared enableStatic}"
42 description = "build2 utility library";
44 This library is a collection of utilities that are used throughout the
47 homepage = "https://build2.org/";
48 changelog = "https://git.build2.org/cgit/libbutl/log";
49 license = licenses.mit;
50 maintainers = with maintainers; [ r-burns ];
51 platforms = platforms.all;