all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "\(unmatched-parenthesis via Guix-patches" via <guix-patches@gnu.org>
To: 53834@debbugs.gnu.org
Cc: "\(unmatched-parenthesis" <paren@disroot.org>
Subject: [bug#53834] [PATCH v2] gnu: Add cproc.
Date: Sun,  8 May 2022 21:25:00 +0100	[thread overview]
Message-ID: <20220508202500.10449-1-paren@disroot.org> (raw)
In-Reply-To: <20220207011414.28849-1-jgart@dismail.de>

* gnu/packages/c.scm (cproc): New variable.

Signed-off-by: (unmatched-parenthesis <paren@disroot.org>
---
This improved patch fixes some style nits.

Thanks to lilyp for pointing them out on #guix!

 gnu/packages/c.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index c9a25eb801..216ddfef88 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -47,6 +47,7 @@ (define-module (gnu packages c)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages check)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages guile)
@@ -1108,3 +1109,48 @@ (define-public qbe
 language as input.")
     (home-page "https://c9x.me/compile/")
     (license license:expat))))
+
+(define-public cproc
+  (let ((commit "70fe9ef1810cc6c05bde9eb0970363c35fa7e802")
+        (revision "1"))
+    (package
+     (name "cproc")
+     (version (git-version "0.0" revision commit))
+     (source
+      (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.sr.ht/~mcf/cproc")
+             (commit commit)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1qmgzll7z7mn587azkj4cizyyd8ii6iznfxpc66ja08140sbn9yx"))))
+     (build-system gnu-build-system)
+     (arguments
+      (list #:make-flags
+            #~(list (string-append "CC=" #$(cc-for-target))
+                    (string-append "PREFIX=" #$output))
+            #:phases
+            #~(modify-phases %standard-phases
+                (replace 'configure
+                  (lambda* (#:key inputs outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out"))
+                          (gcc-lib (assoc-ref inputs "gcc:lib"))
+                          (host-system #$(nix-system->gnu-triplet (%current-system)))
+                          (target-system
+                           #$(nix-system->gnu-triplet (or (%current-target-system)
+                                                          (%current-system)))))
+                      (invoke "./configure"
+                              (string-append "--prefix=" out)
+                              (string-append "--host=" host-system)
+                              (string-append "--target=" target-system)
+                              (string-append "--with-ld=" #$(ld-for-target))
+                              (string-append "--with-gcc-libdir=" gcc-lib))))))))
+     (inputs `(("qbe" ,qbe)
+               ("gcc:lib" ,gcc "lib")))
+     (supported-systems (list "x86_64-linux" "aarch64-linux"))
+     (synopsis "Simple C11 compiler backed by QBE")
+     (description "@code{cproc} is a C compiler using QBE as a backend, supporting most of C11
+along with some GCC and C2x extensions.")
+     (home-page "https://sr.ht/~mcf/cproc")
+     (license license:expat))))
-- 
2.36.0





  parent reply	other threads:[~2022-05-08 20:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07  1:14 [bug#53834] [PATCH] gnu: Add cproc jgart via Guix-patches via
2022-04-05 16:12 ` bug#53834: " Ludovic Courtès
2022-05-07 18:04 ` [bug#53834] " (unmatched-parenthesis via Guix-patches via
2022-05-08 20:25 ` (unmatched-parenthesis via Guix-patches via [this message]
2022-07-07 20:12   ` bug#53834: " Maxim Cournoyer
2022-07-08  6:40     ` [bug#53834] " ( via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220508202500.10449-1-paren@disroot.org \
    --to=guix-patches@gnu.org \
    --cc=53834@debbugs.gnu.org \
    --cc=paren@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.