guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Add LeoCAD.


From: Eric Bavier
Subject: 01/01: gnu: Add LeoCAD.
Date: Thu, 3 Aug 2017 01:33:20 -0400 (EDT)

bavier pushed a commit to branch master
in repository guix.

commit 68a29ab8d00be37f5e084d16a8971d7cf5fb2714
Author: Eric Bavier <address@hidden>
Date:   Thu Aug 3 00:32:30 2017 -0500

    gnu: Add LeoCAD.
    
    * gnu/packages/lego.scm (leocad): New variable.
---
 gnu/packages/lego.scm | 61 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 59 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/lego.scm b/gnu/packages/lego.scm
index d47be5d..d5e5de1 100644
--- a/gnu/packages/lego.scm
+++ b/gnu/packages/lego.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016 Eric Bavier <address@hidden>
+;;; Copyright © 2016, 2017 Eric Bavier <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,7 +23,10 @@
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
   #:use-module (gnu packages bison)
-  #:use-module (gnu packages flex))
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages gl)
+  #:use-module (gnu packages qt))
 
 (define-public nqc
   (package
@@ -65,3 +68,57 @@ MINDSTORMS products.  The preprocessor and control 
structures of NQC are very
 similar to C.  NQC is not a general purpose language -- there are many
 restrictions that stem from limitations of the standard RCX firmware.")
     (license license:mpl1.0)))
+
+(define-public leocad
+  (package
+    (name "leocad")
+    (version "17.07")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/leozide/leocad/";
+                                  "archive/v" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "02gm4950zlmsw4sxmdwypgkybn51b02qnmmk6rzjdr8si4k6gikq"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("qttools" ,qttools)))           ;for lrelease
+    (inputs
+     `(("mesa" ,mesa)
+       ("qtbase" ,qtbase)
+       ("zlib" ,zlib)))
+    (arguments
+     '(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (zero? (system* "qmake"
+                               (string-append "INSTALL_PREFIX=" out)
+                               ;; Otherwise looks for lrelease-qt4
+                               "QMAKE_LRELEASE=lrelease"
+                               ;; Don't pester users about updates
+                               "DISABLE_UPDATE_CHECK=1")))))
+         (add-after 'configure 'reset-resource-timestamps
+           (lambda _
+             ;; The contents of build/release/.qrc/qrc_leocad.cpp generated by
+             ;; qt's rcc tool depends on the timestamps in resources/*, in
+             ;; particular the leocad_*.qm files that are created by qmake
+             ;; above.  So reset those timestamps for a reproducible build.
+             (with-directory-excursion "resources"
+               (for-each (lambda (file)
+                           (let* ((base (basename file ".qm"))
+                                  (src (string-append base ".ts"))
+                                  (st (stat src)))
+                             (set-file-time file st)))
+                         (find-files "." "leocad_.*\\.qm"))))))))
+    (home-page "http://www.leocad.org";)
+    (synopsis "Create virtual Lego models")
+    (description
+     "LeoCAD is a program for creating virtual LEGO models.  It has an
+intuitive interface, designed to allow new users to start creating new models
+without having to spend too much time learning the application.  LeoCAD is
+fully compatible with the LDraw Standard and related tools.")
+    (license license:gpl2+)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]