From b6b60bdfb755b5aebde9680a1bf3a952df86106a Mon Sep 17 00:00:00 2001 From: coolcuber Date: Wed, 29 Apr 2026 15:24:42 -0400 Subject: [PATCH] memtailor: init at 1.3 (cherry picked from commit a513b83ffc07a6cfef861cc71932c9646d12b36f) --- pkgs/by-name/me/memtailor/package.nix | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 pkgs/by-name/me/memtailor/package.nix diff --git a/pkgs/by-name/me/memtailor/package.nix b/pkgs/by-name/me/memtailor/package.nix new file mode 100644 index 000000000000..11fba610ce69 --- /dev/null +++ b/pkgs/by-name/me/memtailor/package.nix @@ -0,0 +1,55 @@ +{ + lib, + fetchFromGitHub, + stdenv, + + autoreconfHook, + gtest, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "memtailor"; + version = "1.3"; + + src = fetchFromGitHub { + owner = "Macaulay2"; + repo = "memtailor"; + tag = "v${finalAttrs.version}"; + hash = "sha256-x6z/BzU78od21l72ZAnX37UHHdyMHfJ6cjwJwNYOIcY="; + }; + + nativeBuildInputs = [ + autoreconfHook + ]; + + checkInputs = [ + gtest + ]; + + __structuredAttrs = true; + + strictDeps = true; + + configureFlags = [ + (lib.withFeature finalAttrs.doCheck "gtest") + ]; + + enableParallelBuilding = true; + + doCheck = true; + + meta = { + description = "C++ library of special purpose memory allocators"; + longDescription = '' + Memtailor is a C++ library of special purpose memory allocators. It + currently offers an arena allocator and a memory pool. + + The main motivation to use a memtailor allocator is better and more + predictable performance than you get with new/delete. Sometimes a + memtailor allocator can also be more convenient due to the ability to + free many allocations at one time. + ''; + homepage = "https://github.com/Macaulay2/memtailor"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ coolcuber ]; + }; +})