unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Theodoros Foradis <theodoros.for@openmailbox.org>
To: guix-devel@gnu.org
Subject: [PATCH v2 2/3] gnu: Add kicad.
Date: Tue, 25 Oct 2016 19:09:06 +0300	[thread overview]
Message-ID: <20161025160907.30181-3-theodoros.for@openmailbox.org> (raw)
In-Reply-To: <20161025160907.30181-1-theodoros.for@openmailbox.org>

* gnu/packages/engineering.scm (kicad): New variable.
---
 gnu/packages/engineering.scm | 89 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 829ceb0..e5a48fc 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,6 +30,7 @@
   #:use-module (guix store)
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
   #:use-module (gnu packages)
@@ -39,6 +41,7 @@
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages curl)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gd)
@@ -55,9 +58,14 @@
   #:use-module (gnu packages maths)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages swig)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages tex)
+  #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
 (define-public librecad
@@ -562,3 +570,84 @@ fundamental, primitive shapes are represented as code in the user-level
 language.")
       (license (list license:lgpl2.1+             ;library
                      license:gpl2+)))))           ;Guile bindings
+
+;; We use kicad from a git commit, because support for boost 1.61.0
+;; has been recently added.
+(define-public kicad
+  (let ((commit "4ee344e150bfaf3a6f3f7bf935fb96ae07c423fa")
+        (hash "0kf6r92nps0658i9n3p9vp5dzbssmc22lvjv5flyvnlf83l63s4n"))
+    (package
+      (name "kicad")
+      (version (string-append "4.0-" (string-take commit 7)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://git.launchpad.net/kicad.git")
+               (commit commit)))
+         (sha256
+          (base32 hash))
+         (file-name (string-append name "-" version "-checkout"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:out-of-source? #t
+         #:tests? #f ; no tests
+         #:configure-flags
+           (list "-DKICAD_STABLE_VERSION=ON"
+                 "-DKICAD_REPO_NAME=stable"
+                 "-DKICAD_BUILD_VERSION=4.0"
+                 "-DCMAKE_BUILD_TYPE=Release"
+                 "-DKICAD_SKIP_BOOST=ON"
+                 "-DKICAD_SCRIPTING=ON"
+                 "-DKICAD_SCRIPTING_MODULES=ON"
+                 "-DKICAD_SCRIPTING_WXPYTHON=ON"
+                 ;; Has to be set explicitely, as we don't have the wxPython
+                 ;; headers in the wxwidgets store item, but in wxPython.
+                 (string-append "-DCMAKE_CXX_FLAGS=-I"
+                                (assoc-ref %build-inputs "wxpython")
+                                "/include/wx-3.0")
+                 "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
+                 "-DBUILD_GITHUB_PLUGIN=OFF")
+           #:phases
+             (modify-phases %standard-phases
+               (add-after 'install 'wrap-program ;;Ensure correct python at runtime
+                          (lambda* (#:key inputs outputs #:allow-other-keys)
+                            (let* ((out (assoc-ref outputs "out"))
+                                   (python (assoc-ref inputs "python"))
+                                   (file (string-append out "/bin/kicad"))
+                                   (path (string-append
+                                          out
+                                          "/lib/python2.7/site-packages:"
+                                          (getenv "PYTHONPATH"))))
+                              (wrap-program file
+                                `("PYTHONPATH" ":" prefix (,path))
+                                `("PATH" ":" prefix
+                                  (,(string-append python "/bin:")))))
+                            #t)))))
+      (native-inputs
+       `(("boost" ,boost)
+         ("gettext" ,gnu-gettext)
+         ("pkg-config" ,pkg-config)
+         ("swig" ,swig)
+         ("zlib" ,zlib)))
+      (inputs
+       `(("cairo" ,cairo)
+         ("curl" ,curl)
+         ("desktop-file-utils" ,desktop-file-utils)
+         ("glew" ,glew)
+         ("glm" ,glm)
+         ("hicolor-icon-theme" ,hicolor-icon-theme)
+         ("libsm" ,libsm)
+         ("mesa" ,mesa)
+         ("openssl" ,openssl)
+         ("python" ,python-2)
+         ("wxwidgets" ,wxwidgets-gtk2)
+         ("wxpython" ,python2-wxpython)))
+      (home-page "http://http://kicad-pcb.org/")
+      (synopsis "Electronics Design Automation Suite")
+      (description
+       "Kicad is created for the formation of printed circuit boards and electrical circuits.
+ The software has a number of programs that perform specific functions, for example,
+ pcbnew (Editing PCB), eeschema (editing electrical diagrams), gerbview (viewing Gerber
+ files) and others. ")
+      (license license:gpl3+))))
-- 
2.10.1

  parent reply	other threads:[~2016-10-25 16:12 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 21:16 [PATCH 0/3] gnu: Add kicad Theodoros Foradis
2016-10-24 21:16 ` [PATCH 1/3] gnu: Add wxwidgets-gtk2 Theodoros Foradis
2016-10-24 21:16 ` [PATCH 2/3] gnu: Add python2-wxpython Theodoros Foradis
2016-10-25  8:32   ` Hartmut Goebel
2016-10-25  9:58     ` Theodoros Foradis
2016-10-25 16:20   ` Efraim Flashner
2016-10-24 21:16 ` [PATCH 3/3] gnu: Add kicad Theodoros Foradis
2016-10-25  0:36   ` Leo Famulari
2016-10-25  0:41     ` Leo Famulari
2016-10-25  8:11       ` Theodoros Foradis
2016-10-25 12:48   ` Leo Famulari
2016-10-25 16:09     ` [PATCH v2 0/3] " Theodoros Foradis
2016-10-25 16:09       ` [PATCH v2 1/3] gnu: Add python2-wxpython Theodoros Foradis
2016-10-25 16:32         ` Leo Famulari
2016-10-25 16:09       ` Theodoros Foradis [this message]
2016-10-25 16:09       ` [PATCH v2 3/3] " Theodoros Foradis
2016-10-25 16:35         ` Leo Famulari
2016-10-25 17:13           ` Theodoros Foradis
2016-10-30  0:13             ` Leo Famulari
2016-10-30 10:13               ` Hartmut Goebel
2016-10-31 10:42               ` Danny Milosavljevic
2016-10-31 15:38                 ` Danny Milosavljevic
2016-10-25 18:05           ` Theodoros Foradis
2016-10-25 18:28             ` Leo Famulari
2016-10-25 16:59       ` [PATCH v3 0/3] gnu: Add kicad Theodoros Foradis
2016-10-25 16:59         ` [PATCH v3 1/3] gnu: Add wxwidgets-gtk2 Theodoros Foradis
2016-11-02  8:15           ` Danny Milosavljevic
2016-10-25 17:00         ` [PATCH v3 2/2] gnu: Add python2-wxpython Theodoros Foradis
2016-11-02  7:57           ` Danny Milosavljevic
2016-11-02 13:53             ` Theodoros Foradis
2016-10-25 17:00         ` [PATCH v3 3/3] gnu: Add kicad Theodoros Foradis
2016-10-30  0:18           ` Leo Famulari
2016-11-02 15:42             ` Theodoros Foradis
2016-11-05 18:41               ` Leo Famulari
2016-11-07 18:16                 ` [PATCH v4 1/3] gnu: Add wxwidgets-gtk2 Theodoros Foradis
2016-11-07 18:16                   ` [PATCH v4 2/3] gnu: Add python2-wxpython Theodoros Foradis
2016-11-07 22:38                     ` Danny Milosavljevic
2016-11-07 18:16                   ` [PATCH v4 3/3] gnu: Add kicad Theodoros Foradis
2016-11-07 18:47                     ` Efraim Flashner
2016-11-15 20:53                       ` [PATCH v5 1/4] gnu: Add wxwidgets-gtk2 Theodoros Foradis
2016-11-15 20:53                         ` [PATCH v5 2/4] gnu: Add python2-wxpython Theodoros Foradis
2016-11-15 20:53                         ` [PATCH v5 3/4] gnu: Add kicad Theodoros Foradis
2016-11-15 20:53                         ` [PATCH v5 4/4] gnu: Add kicad-library Theodoros Foradis
2016-11-15 19:26                     ` [PATCH v4 3/3] gnu: Add kicad Leo Famulari
2016-11-22 19:46                       ` Theodoros Foradis
2016-11-25  5:40                         ` Leo Famulari
2016-11-07 21:04                 ` [PATCH v3 " Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161025160907.30181-3-theodoros.for@openmailbox.org \
    --to=theodoros.for@openmailbox.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).