diff options
author | Eric Bavier <bavier@member.fsf.org> | 2017-08-03 00:32:30 -0500 |
---|---|---|
committer | Eric Bavier <bavier@member.fsf.org> | 2017-08-03 00:33:02 -0500 |
commit | 68a29ab8d00be37f5e084d16a8971d7cf5fb2714 (patch) | |
tree | af03c8dba64b40d077387d4526f8311e69130d8b /gnu | |
parent | 5d8312f1c649afbf727eaa17ce1879989908508b (diff) | |
download | guix-68a29ab8d00be37f5e084d16a8971d7cf5fb2714.tar guix-68a29ab8d00be37f5e084d16a8971d7cf5fb2714.tar.gz |
gnu: Add LeoCAD.
* gnu/packages/lego.scm (leocad): New variable.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/lego.scm | 61 |
1 files changed, 59 insertions, 2 deletions
diff --git a/gnu/packages/lego.scm b/gnu/packages/lego.scm index d47be5dfb4..d5e5de1c1f 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 <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+))) |