From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thompson, David" Subject: Re: [PATCH v2 2/6] gnu: fpga: Add abc. Date: Tue, 16 Aug 2016 14:40:23 -0400 Message-ID: References: <20160816180653.22524-1-dannym@scratchpost.org> <20160816180653.22524-3-dannym@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZjHl-0002IT-Q9 for guix-devel@gnu.org; Tue, 16 Aug 2016 14:40:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZjHk-0006Yr-Fh for guix-devel@gnu.org; Tue, 16 Aug 2016 14:40:25 -0400 Received: from mail-ua0-x242.google.com ([2607:f8b0:400c:c08::242]:32863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZjHk-0006Ym-BX for guix-devel@gnu.org; Tue, 16 Aug 2016 14:40:24 -0400 Received: by mail-ua0-x242.google.com with SMTP id u13so7179606uau.0 for ; Tue, 16 Aug 2016 11:40:24 -0700 (PDT) In-Reply-To: <20160816180653.22524-3-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: Danny Milosavljevic Cc: guix-devel 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: + ;; + (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