gnu: Add LeoCAD.

* gnu/packages/lego.scm (leocad): New variable.
master
Eric Bavier 2017-08-03 00:32:30 -05:00
parent 5d8312f1c6
commit 68a29ab8d0
No known key found for this signature in database
GPG Key ID: FD73CAC719D32566
1 changed files with 59 additions and 2 deletions

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016, 2017 Eric Bavier <bavier@member.fsf.org>
;;;
;;; 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+)))