guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#72569] [PATCH 2/4] gnu: Add sort-h.


From: Liliana Marie Prikler
Subject: [bug#72569] [PATCH 2/4] gnu: Add sort-h.
Date: Sat, 17 Aug 2024 14:26:15 +0200
User-agent: Evolution 3.48.4

Am Sonntag, dem 11.08.2024 um 13:17 +0800 schrieb Adam Faiz:

> +(define-public sort-h
> +  ;; The latest commit is used as there is no release.
> +  (let ((commit "24f5b8b13810ad130109c7b56daf8e99ab0fe1b8")
> +        (revision "0"))
> +  (package
> +    (name "sort-h")
I'd call this one c-template-sort, after the "subject" on Github.
> +    (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"))
> +              (modules '((guix build utils)))
> +              (snippet
> +               #~(begin
> +                   (substitute* "Makefile"
> +                     (("^demo:" all)
> +                      (string-append
> +                       "install:\n\t"
> +                       "install -d $(DESTDIR)$(PREFIX)/include\n\t"
> +                       "install sort.h
> $(DESTDIR)$(PREFIX)/include\n\t"
> +                       "install sort_extra.h
> $(DESTDIR)$(PREFIX)/include\n\n"
> +                       all)))))))
Note: this package might be a better fit for copy-build-system.  You
can still have a check phase, but I think you'll benefit from the
install plan.
> +    (build-system gnu-build-system)
> +    (arguments
> +     (list
> +      #:make-flags
> +      #~(list
> +         (string-append "CC=" #$(cc-for-target))
> +         (string-append "PREFIX=" #$output))
> +      #:test-target "test"
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (delete 'configure)
> +          (delete 'build))))
> +    (home-page "https://github.com/swenson/sort";)
> +    (synopsis "C implementation of many sorting algorithms")
> +    (description "@code{sort.h} is an implementation of a ton of
> sorting
> +algorithms in C with a user-defined type that is provided at include
> time.")
I'd say something like "This package provides a header-only C library,
that implements several sorting algorithms.  It is configured using
macros and supports user-defined types."

Cheers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]