unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Fis Trivial <ybbs.daans@hotmail.com>
To: Fis Trivial <ybbs.daans@hotmail.com>
Cc: "31430@debbugs.gnu.org" <31430@debbugs.gnu.org>
Subject: [bug#31430] [PATCH 2/6] gnu: Add amalgamate.
Date: Mon, 28 May 2018 08:09:35 +0000	[thread overview]
Message-ID: <BLUPR16MB05000A9FA6E4920B56ADD534926E0@BLUPR16MB0500.namprd16.prod.outlook.com> (raw)
In-Reply-To: <BLUPR16MB0500328748A5B5C06BAA0D07926E0@BLUPR16MB0500.namprd16.prod.outlook.com>


This commit also re-orders some module statements.

* gnu/packages/code.scm (amalgamate): New variable.
---
 gnu/packages/code.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 56 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index fc1c000b9..0f641464d 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -30,12 +30,16 @@
 (define-module (gnu packages code)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autogen)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpp)
   #:use-module (gnu packages databases)
@@ -43,15 +47,13 @@
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages pcre)
-  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages autogen)
   #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages autotools)
   #:use-module (gnu packages llvm)
-  #:use-module (gnu packages lua)
-  #:use-module (gnu packages bash))
+  #:use-module (gnu packages lua))
 
 ;;; Tools to deal with source code: metrics, cross-references, etc.
 
@@ -645,3 +647,52 @@ deal with incomplete or malformed syntax.  GNU indent offers several
 extensions over the standard utility.")
    (license license:gpl3+)
    (home-page "https://www.gnu.org/software/indent/")))
+
+(define-public amalgamate
+  (let* ((commit "c91f07eea1133aa184f652b8f1398eaf03586208")
+         (revision "0")
+         (version (string-append "1.1.1" revision commit)))
+    (package
+      (name "amalgamate")
+      (version version)
+      (home-page "https://github.com/edlund/amalgamate")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url home-page)
+               (commit commit)))
+         (sha256
+          (base32
+           "0cllaraw8mxs8q2nr28nhgzkb417gj2wcklqg59w84f4lc78k3yb"))
+         (file-name (git-file-name name version))
+         (modules '((guix build utils)))
+         (snippet
+          '(substitute* "test.sh"
+             (("test_command \"cc -Wall -Wextra -o source.out source.c\"" all)
+              "test_command \"gcc -Wall -Wextra -o source.out source.c\"")))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("python" ,python-wrapper)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (delete 'build)
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (bin (string-append out "/bin")))
+                 (mkdir out)
+                 (mkdir bin)
+                 (copy-file "amalgamate.py"
+                            (string-append bin "/amalgamate.py")))))
+           (replace 'check
+             (lambda _
+               (invoke "./test.sh"))))))
+      (synopsis "Tool for amalgamating C source and header files")
+      ;; The package is indeed a script file, and the term "amalgamate.py" is
+      ;; used by upstream.
+      (description "amalgamate.py aims to make it easy to use SQLite-style C
+source and header amalgamation in projects.")
+      (license license:bsd-3))))
-- 
2.14.3

  parent reply	other threads:[~2018-05-28  8:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-12 14:21 [bug#31430] [PATCH 0/3] gnu: Add xtensor and its dependencies Fis Trivial
2018-05-12 14:23 ` [bug#31430] [PATCH 1/3] gnu: Add json-modern-cxx Fis Trivial
2018-05-12 14:24 ` [bug#31430] [PATCH 2/3] gnu: Add xtl Fis Trivial
2018-05-24 21:31   ` Ludovic Courtès
2018-05-25  8:46     ` Fis Trivial
2018-05-12 14:25 ` [bug#31430] [PATCH 3/3] gnu: Add xtensor Fis Trivial
2018-05-24 21:34   ` Ludovic Courtès
2018-05-23 12:09 ` [bug#31430] [PATCH 0/3] gnu: Add xtensor and its dependencies Ludovic Courtès
2018-05-28  7:57 ` [bug#31430] [PATCH 0/6] Add xtensor and its dependencies (new patches) Fis Trivial
2018-05-28  8:08   ` [bug#31430] [PATCH 1/6] gnu: Add catch-framework2 Fis Trivial
2018-05-28  8:09   ` Fis Trivial [this message]
2018-05-28 11:44     ` [bug#31430] [PATCH 2/6] gnu: Add amalgamate Ludovic Courtès
2018-05-28  8:10   ` [bug#31430] [PATCH 3/6] gnu: Add fifo-map Fis Trivial
2018-05-28 11:48     ` Ludovic Courtès
2018-05-28  8:11   ` [bug#31430] [PATCH 4/6] gnu: Add json-modern-cxx Fis Trivial
2018-05-28 12:18     ` Ludovic Courtès
2018-05-28  8:12   ` [bug#31430] [PATCH 5/6] gnu: Add xtl Fis Trivial
2018-05-28  8:12   ` [bug#31430] [PATCH 6/6] gnu: Add xtensor Fis Trivial
2018-05-28 12:24     ` bug#31430: " Ludovic Courtès

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=BLUPR16MB05000A9FA6E4920B56ADD534926E0@BLUPR16MB0500.namprd16.prod.outlook.com \
    --to=ybbs.daans@hotmail.com \
    --cc=31430@debbugs.gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).