@@ -1678,3 +1678,44 @@ (define-public pcg-c
Linear Congruential Generator (LCG) with a permutation function to increase
output randomness while retaining speed, simplicity, and conciseness.")
(license (list license:expat license:asl2.0))))) ; dual licensed
+
+(define-public memento
+ (let ((commit "46f8beaad330b9b9e1dc1678cf41f78c1b902d11")
+ (revision "0"))
+ (package
+ (name "memento")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ArtifexSoftware/memento")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1gmvbybm9s07g3n7k0zswv88s4bkk7yd66ydaljqwvf6w7d9dzg4"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; There are no build system files
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (invoke #$(cc-for-target) "memento.c" "-O2" "-g" "-shared"
+ "-o" "libmemento.so")))
+ (replace 'install
+ (lambda _
+ (install-file "libmemento.so" (string-append #$output "/lib"))
+ (install-file "memento.h" (string-append #$output "/include"))
+ (install-file "docs/README.md"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))
+ #:tests? #f))
+ (home-page "https://github.com/ArtifexSoftware/memento")
+ (synopsis "Memory debugging library for C and C++ programs")
+ (description "Memento is a debugging library, which intercepts calls to
+malloc, free, realloc etc. to detect memory leaks and errors.")
+ (license license:isc))))