From 75924f72d92e4d6607e79cf8e3caf9019dc153a9 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sat, 23 Mar 2024 15:40:06 +0300 Subject: [PATCH] dmalloc: init at 5.6.5 --- pkgs/by-name/dm/dmalloc/package.nix | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pkgs/by-name/dm/dmalloc/package.nix diff --git a/pkgs/by-name/dm/dmalloc/package.nix b/pkgs/by-name/dm/dmalloc/package.nix new file mode 100644 index 000000000000..a92761f749cc --- /dev/null +++ b/pkgs/by-name/dm/dmalloc/package.nix @@ -0,0 +1,45 @@ +{ lib +, stdenv +, fetchFromGitHub +, testers +, dmalloc +}: + +stdenv.mkDerivation rec { + pname = "dmalloc"; + version = "5.6.5"; + + src = fetchFromGitHub { + owner = "j256"; + repo = "dmalloc"; + rev = "dmalloc_release_${lib.replaceStrings ["."] ["_"] version}"; + hash = "sha256-P63I9s32C3v1q+Sy9joK0HKYb0ebBu9g72tTTwxvkz8="; + }; + + configureFlags = [ + "--enable-cxx" + "--enable-shlib" + "--enable-threads" + ]; + + passthru.tests.version = testers.testVersion { + package = dmalloc; + }; + + meta = with lib; { + description = "Debug Malloc memory allocation debugging C library"; + longDescription = '' + The debug memory allocation or "dmalloc" library has been designed as a + drop in replacement for the system's malloc, realloc, calloc, free and + other memory management routines while providing powerful debugging + facilities configurable at runtime. These facilities include such things + as memory-leak tracking, fence-post write detection, file/line number + reporting, and general logging of statistics. + ''; + homepage = "https://dmalloc.com"; + license = licenses.isc; + maintainers = with maintainers; [ azahi ]; + platforms = platforms.all; + mainProgram = "dmalloc"; + }; +}