gnu: kdenlive: Add missing dependencies.
[jackhill/guix/guix.git] / gnu / packages / fpga.scm
index 129b41f..f07c726 100644 (file)
@@ -2,7 +2,7 @@
 ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
 ;;; Copyright © 2016, 2017 Theodoros Foradis <theodoros@foradis.org>
 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2019 Amin Bandali <mab@gnu.org>
+;;; Copyright © 2019 Amin Bandali <bandali@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -44,6 +44,9 @@
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages libftdi))
 
 (define-public abc
        (revision "1"))
   (package
     (name "abc")
-    (version (string-append "0.0-" revision "-" (string-take commit 9)))
+    (version (git-version "0.0" revision commit))
     (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"))))
+               (base32
+                "1syygi1x40rdryih3galr4q8yg1w5bvdzl75hd27v1xq0l5bz3d0"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("unzip" ,unzip)))
@@ -124,7 +127,7 @@ For synthesis, the compiler generates netlists in the desired format.")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/cliffordwolf/yosys.git")
+                    (url "https://github.com/cliffordwolf/yosys")
                     (commit (string-append "yosys-" version))
                     (recursive? #t))) ; for the ‘iverilog’ submodule
               (sha256
@@ -212,20 +215,20 @@ For synthesis, the compiler generates netlists in the desired format.")
     (license license:isc)))
 
 (define-public icestorm
-  (let ((commit "c0cbae88ab47a3879aacf80d53b6a85710682a6b")
-        (revision "2"))
+  (let ((commit "0ec00d892a91cc68e45479b46161f649caea2933")
+        (revision "3"))
    (package
     (name "icestorm")
-    (version (string-append "0.0-" revision "-" (string-take commit 9)))
+    (version (git-version "0.0" revision commit))
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                     (url "https://github.com/cliffordwolf/icestorm.git")
+                     (url "https://github.com/cliffordwolf/icestorm")
                      (commit commit)))
-              (file-name (string-append name "-" version "-checkout"))
+              (file-name (git-file-name name version))
               (sha256
                 (base32
-                   "0bqm0rpywm64yvbq75klpyzb1g9sdsp1kvdlyqg4hvm8jw9w8lya"))))
+                   "1qlh99fafb7xga702k64fmc9m700nsddrfgcq4x8qn8fplsb64f1"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; no unit tests that don't need an FPGA exist.
@@ -256,6 +259,42 @@ For synthesis, the compiler generates netlists in the desired format.")
 Includes the actual FTDI connector.")
     (license license:isc))))
 
+(define-public nextpnr-ice40
+  (let [(commit "fbe486df459909065d6852a7495a212dfd2accef")
+        (revision "1")]
+    (package
+      (name "nextpnr-ice40")
+      (version (git-version "0.0.0" revision commit))
+      (source
+        (origin
+          (method git-fetch)
+          (uri (git-reference
+                 (url "git://github.com/YosysHQ/nextpnr")
+                 (commit commit)))
+          (file-name (git-file-name name version))
+          (sha256
+           (base32
+            "1fmxsywgs45g88ra7ips5s2niiiwrkyxdcy742ws18dfk2y4vi9c"))))
+      (inputs
+       `(("boost" ,boost)
+         ("eigen" ,eigen)
+         ("icestorm" ,icestorm)
+         ("python" ,python)
+         ("qtbase" ,qtbase)
+         ("yosys" ,yosys)))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:configure-flags `("-DARCH=ice40"
+                             ,(string-append "-DICEBOX_ROOT="
+                                             (assoc-ref %build-inputs "icestorm")
+                                             "/share/icebox"))
+         #:tests? #f))
+      (synopsis "Place-and-Route tool for FPGAs")
+      (description "Nextpnr aims to be a vendor neutral, timing driven,
+FOSS FPGA place and route tool.")
+      (home-page "https://github.com/YosysHQ/nextpnr")
+      (license license:expat))))
+
 (define-public arachne-pnr
   (let ((commit "840bdfdeb38809f9f6af4d89dd7b22959b176fdd")
         (revision "2"))
@@ -265,9 +304,9 @@ Includes the actual FTDI connector.")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                     (url "https://github.com/YosysHQ/arachne-pnr.git")
+                     (url "https://github.com/YosysHQ/arachne-pnr")
                      (commit commit)))
-              (file-name (string-append name "-" version "-checkout"))
+              (file-name (git-file-name name version))
               (sha256
                 (base32
                    "1dqvjvgvsridybishv4pnigw9gypxh7r7nrqp9z9qq92v7c5rxzl"))))
@@ -301,7 +340,7 @@ Includes the actual FTDI connector.")
 (define-public gtkwave
   (package
     (name "gtkwave")
-    (version "3.3.103")
+    (version "3.3.106")
     (source
      (origin
        (method url-fetch)
@@ -311,7 +350,7 @@ Includes the actual FTDI connector.")
                   (string-append "http://gtkwave.sourceforge.net/"
                                  "gtkwave-" version ".tar.gz")))
        (sha256
-        (base32 "1xzaxqbabj4sb4n10yki5acglx3736pwl3kwlq4k7i96rzvsn9f3"))))
+        (base32 "1pyij6dlmapjyzrmn255fkf8gyhz8i4vaipd75a68i2bnq021nn8"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("gperf" ,gperf)