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 + (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))))))) + (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: + ;; + (license license:expat))))