@@ -695,6 +695,41 @@ (define-public sfsexp
expressions.")
(license license:lgpl2.1+)))
+(define-public c-template-sort
+ ;; The latest commit is used as there is no release.
+ (let ((commit "24f5b8b13810ad130109c7b56daf8e99ab0fe1b8")
+ (revision "0"))
+ (package
+ (name "c-template-sort")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/swenson/sort")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0q3pgw51rjq7pb6gc7zx9i48pckyl930lcab4ngxrpa5a8flq850"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan
+ #~'(("sort.h" "include/sort.h")
+ ("sort_extra.h" "include/sort_extra.h"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "make" (string-append "CC=" #$(cc-for-target)))))))))
+ (home-page "https://github.com/swenson/sort")
+ (synopsis "C implementation of many sorting algorithms")
+ (description "This package provides a header-only C library,
+that implements several sorting algorithms. It is configured using
+macros and supports user-defined types.")
+ (license license:expat))))
+
(define-public sparse
(package
(name "sparse")
From 666ad0b1961163d67a07abe0e25d4b50fdd98f12 Mon Sep 17 00:00:00 2001 Message-ID: <666ad0b1961163d67a07abe0e25d4b50fdd98f12.1724856297.git.adam.faiz@disroot.org> In-Reply-To: <91bf9bff2c3c365d006a0e88024db50f416cd436.1724856297.git.adam.faiz@disroot.org> References: <91bf9bff2c3c365d006a0e88024db50f416cd436.1724856297.git.adam.faiz@disroot.org> From: AwesomeAdam54321 <adam.faiz@disroot.org> Date: Sun, 11 Aug 2024 08:41:05 +0800 Subject: [PATCH v2 2/4] gnu: Add c-template-sort. * gnu/packages/c.scm (c-template-sort): New variable. --- gnu/packages/c.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)