guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 2/6] gnu: fpga: Add abc.


From: Thompson, David
Subject: Re: [PATCH v2 2/6] gnu: fpga: Add abc.
Date: Tue, 16 Aug 2016 14:40:23 -0400

diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index 112d53b..7571f87 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -38,3 +38,46 @@
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages libftdi))

+;; To compile as C code (default):
+;;   make sure that CC=gcc and ABC_NAMESPACE is not defined.
+;; To compile as C++ code with namespaces:
+;;   make sure that CC=g++ and ABC_NAMESPACE is set to the namespace.
+;;   For example, add -DABC_NAMESPACE=xxx to OPTFLAGS.
+(define-public abc
+ (let ((commit "5ae4b975c49c"))
+  (package
+    (name "abc")
+    (version (string-append "0.0-" (string-take commit 7)))
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://bitbucket.org/alanmi/abc/get/";
+                              commit ".zip"))
+              (file-name (string-append name "-" version "-checkout.zip"))
+              (sha256
+                (base32
+                   "1syygi1x40rdryih3galr4q8yg1w5bvdzl75hd27v1xq0l5bz3d0"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (inputs
+     `(("readline" ,readline)))
+    (arguments
+     `(#:tests? #f ; 'check target does not exist.
+       #:phases
+        (modify-phases %standard-phases

The opening paren should be aligned with the "#" in "#:phases" and the
rest of the form should be reindented accordingly.

+          (delete 'configure)
+          (replace 'install
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((out (assoc-ref outputs "out"))
+                     (outbin (string-append out "/bin"))
+                     (target (string-append outbin "/abc")))
+                (mkdir-p outbin)
+                (copy-file "abc" target)))))))

You over-indented by 4 spaces here and the line above it.

+    (home-page "http://people.eecs.berkeley.edu/~alanmi/abc/";)
+    (synopsis "Sequential Logic Synthesis and Formal Verification")
+    (description "ABC is a program for sequential logic synthesis
+and formal verification.")
+    ;; FIXME use license: MIT Modern variant as described in:
+    ;;   <https://fedoraproject.org/wiki/Licensing:MIT>
+    (license license:expat))))

Could someone who knows more about this license chime in about what
the best thing to do is?

LGTM other than these few minor things.

- Dave



reply via email to

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