* gnu/packages/fpga.scm (icestorm): New variable.
---
 gnu/packages/fpga.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index 0e51626..25c4570 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -189,3 +189,40 @@ For synthesis, the compiler generates netlists in the desired format.")
     (synopsis "FPGA Verilog RTL Synthesizer")
     (description "Yosys synthesizes Verilog-2005.")
     (license license:isc)))
+
+(define-public icestorm
+  (let ((commit "12b2295c9087d94b75e374bb205ae4d76cf17e2f"))
+   (package
+    (name "icestorm")
+    (version (string-append "0.0-" (string-take commit 7)))
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/cliffordwolf/icestorm.git";)
+                     (commit commit)))
+              (file-name (string-append name "-" version "-checkout"))
+              (sha256
+                (base32
+                   "1mmzlqvap6w8n4qzv3idvy51arkgn03692ssplwncy3akjrbsd2b"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no unit tests that don't need an FPGA exist.
+       #:make-flags (list "CC=gcc" "CXX=g++"
+                          (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       #:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'remove-usr-local
+            (lambda _
+              (substitute* "iceprog/Makefile"
+                (("-L/usr/local/lib") ""))))
+          (delete 'configure))))
+    (inputs
+      `(("libftdi" ,libftdi)))
+    (native-inputs
+      `(("python-3" ,python)
+        ("pkg-config" ,pkg-config)))
+    (home-page "http://www.clifford.at/icestorm/";)
+    (synopsis "Project IceStorm - Lattice iCE40 FPGAs Bitstream Tools")
+    (description "Project IceStorm - Lattice iCE40 FPGAs Bitstream Tools. 
+Includes the actual FTDI connector.")
+    (license license:isc)))) ; FIXME more licenses?

Reply via email to