From 59d3a471cd960f9d1f6c645a4fe578a670848e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Sat, 16 May 2026 14:08:17 -0600 Subject: [PATCH] bdwgc: init --- pkgs/bdwgc/default.nix | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/bdwgc/default.nix 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; + }; +})