diff --git a/pkgs/bdwgc/default.nix b/pkgs/bdwgc/default.nix new file mode 100644 index 0000000..21774bf --- /dev/null +++ b/pkgs/bdwgc/default.nix @@ -0,0 +1,39 @@ +{ cmake +, stdenv +, fetchFromGitHub +, lib +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "bdwgc"; + version = "8.2.12"; + src = fetchFromGitHub { + owner = "bdwgc"; + repo = "bdwgc"; + tag = "v${finalAttrs.version}"; + hash = "sha256-5yeAB5Y92YjOutwRXBJkMxoOLkmzmqIJs4PirKX89fE="; + }; + nativeBuildInputs = [ + cmake + ]; + meta = { + homepage = "https://www.hboehm.info/gc/"; + description = '' + The Boehm-Demers-Weiser conservative C/C++ Garbage Collector + (bdwgc, also known as bdw-gc, boehm-gc, libgc) + ''; + longDescription = '' + This is a garbage collecting storage allocator that is intended + to be used as a plug-in replacement for C's malloc. + + Since the collector does not require pointers to be tagged, it + does not attempt to ensure that all inaccessible storage is + reclaimed. However, in our experience, it is typically more + successful at reclaiming unused memory than most C programs + using explicit deallocation. Unlike manually introduced leaks, + the amount of unreclaimed memory typically stays bounded. + ''; + license = lib.licenses.mit; + platforms = lib.platforms.all; + }; +})