From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: [PATCH v2 2/6] gnu: fpga: Add abc. Date: Tue, 16 Aug 2016 20:06:49 +0200 Message-ID: <20160816180653.22524-3-dannym@scratchpost.org> References: <20160816180653.22524-1-dannym@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.9.1" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZilr-0002Ln-FF for guix-devel@gnu.org; Tue, 16 Aug 2016 14:07:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZilm-0007xA-JY for guix-devel@gnu.org; Tue, 16 Aug 2016 14:07:27 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:43545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZilm-0007wt-C0 for guix-devel@gnu.org; Tue, 16 Aug 2016 14:07:22 -0400 In-Reply-To: <20160816180653.22524-1-dannym@scratchpost.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org This is a multi-part message in MIME format. --------------2.9.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: quoted-printable * gnu/packages/fpga.scm (abc): New variable. --- gnu/packages/fpga.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) --------------2.9.1 Content-Type: text/x-patch; name="0002-gnu-fpga-Add-abc.patch" Content-Disposition: attachment; filename="0002-gnu-fpga-Add-abc.patch" Content-Transfer-Encoding: quoted-printable 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)) =20 +;; To compile as C code (default): +;; make sure that CC=3Dgcc and ABC_NAMESPACE is not defined. +;; To compile as C++ code with namespaces: +;; make sure that CC=3Dg++ and ABC_NAMESPACE is set to the namespace. +;; For example, add -DABC_NAMESPACE=3Dxxx 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)))) --------------2.9.1--