Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 testers, 6 dmalloc, 7}: 8 9stdenv.mkDerivation rec { 10 pname = "dmalloc"; 11 version = "5.6.5"; 12 13 src = fetchFromGitHub { 14 owner = "j256"; 15 repo = "dmalloc"; 16 rev = "dmalloc_release_${lib.replaceStrings [ "." ] [ "_" ] version}"; 17 hash = "sha256-P63I9s32C3v1q+Sy9joK0HKYb0ebBu9g72tTTwxvkz8="; 18 }; 19 20 configureFlags = [ 21 "--enable-cxx" 22 "--enable-shlib" 23 "--enable-threads" 24 ]; 25 26 passthru.tests.version = testers.testVersion { 27 package = dmalloc; 28 }; 29 30 meta = with lib; { 31 description = "Debug Malloc memory allocation debugging C library"; 32 longDescription = '' 33 The debug memory allocation or "dmalloc" library has been designed as a 34 drop in replacement for the system's malloc, realloc, calloc, free and 35 other memory management routines while providing powerful debugging 36 facilities configurable at runtime. These facilities include such things 37 as memory-leak tracking, fence-post write detection, file/line number 38 reporting, and general logging of statistics. 39 ''; 40 homepage = "https://dmalloc.com"; 41 license = licenses.isc; 42 maintainers = with maintainers; [ azahi ]; 43 platforms = platforms.all; 44 mainProgram = "dmalloc"; 45 }; 46}