diff mbox

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

Message ID CAJ=RwfaND7DyyGD+49tZzQm5=wX3OFCpWzNJhz23hTsAWzhyzQ@mail.gmail.com
State New
Headers show

Commit Message

David Thompson Aug. 16, 2016, 6:40 p.m. UTC
+    (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

Comments

Leo Famulari Aug. 16, 2016, 7:57 p.m. UTC | #1
On Tue, Aug 16, 2016 at 02:40:23PM -0400, Thompson, David wrote:
> +    ;; 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?

I would use the non-copyleft "license" variable.
diff mbox

Patch

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.