aboutsummaryrefslogtreecommitdiff
path: root/scripts/guix.in
blob: 0a3ab1f64dfc32b9b0597f8d42dfc2427572fa18 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!@GUILE@ \
--no-auto-compile -e main -s
!#
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

;; IMPORTANT: We must avoid loading any modules from Guix here,
;; because we need to adjust the guile load paths first.
;; It's okay to import modules from core Guile though.

(define-syntax-rule (push! elt v) (set! v (cons elt v)))

(define (augment-load-paths!)
  ;; Add installed modules to load-path.
  (push! "@guilemoduledir@" %load-path)
  (push! "@guileobjectdir@" %load-compiled-path))

(define* (main #:optional (args (command-line)))
  (unless (getenv "GUIX_UNINSTALLED")
    (augment-load-paths!))

  (let ((guix-main (module-ref (resolve-interface '(guix ui))
                               'guix-main)))
    (bindtextdomain "guix" "@localedir@")
    (bindtextdomain "guix-packages" "@localedir@")
    ;; XXX: It would be more convenient to change it to:
    ;;   (exit (apply guix-main (command-line)))
    ;; but since the 'guix' command is not updated by 'guix pull', we cannot
    ;; really do it now.
    (apply guix-main args)))

;;; Local Variables:
;;; mode: scheme
;;; End:
(build-system gnu-build-system) (native-inputs (list pkg-config autoconf automake libtool)) (propagated-inputs (list mesa)) ; according to glu.pc (home-page "http://www.opengl.org/archives/resources/faq/technical/glu.htm") (synopsis "Mesa OpenGL Utility library") (description "GLU, or OpenGL Utility Library provides some higher-level functionality not provided by just OpenGL itself. Some of GLU's Features include: Scaling of 2D images and creation of mipmap pyramids, Transformation of object coordinates into device coordinates and vice versa, Support for NURBS surfaces, Support for tessellation of concave or bow tie polygonal primitives, Specialty transformation matrices for creating perspective and orthographic projections, positioning a camera, and selection/picking, Rendering of disk, cylinder, and sphere primitives, Interpreting OpenGL error values as ASCII text.") (license (license:x11-style "http://directory.fsf.org/wiki/License:SGIFreeBv2")))) (define-public freeglut (package (name "freeglut") (version "3.4.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/FreeGLUTProject/freeglut/releases" "/download/v" version "/freeglut-" version ".tar.gz")) (sha256 (base32 "1v7ayg3a03mv8b6lsr1qm21lbr8xg8dh3gdfxnbhl64vbn8wn2rw")))) (build-system cmake-build-system) (arguments '(#:tests? #f ;no test target #:configure-flags '("-DFREEGLUT_BUILD_STATIC_LIBS=OFF"))) (inputs (list libx11 libxi libxrandr libxxf86vm)) (propagated-inputs ;; Headers from Mesa and GLU are needed. (list glu mesa)) (home-page "https://freeglut.sourceforge.net/") (synopsis "Alternative to the OpenGL Utility Toolkit (GLUT)") (description "Freeglut is a completely Free/OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to support the sample programs in the second edition OpenGL @code{RedBook}. Since then, GLUT has been used in a wide variety of practical applications because it is simple, widely available and highly portable. GLUT (and hence freeglut) allows the user to create and manage windows containing OpenGL contexts on a wide range of platforms and also read the mouse, keyboard and joystick functions. Freeglut is released under the X-Consortium license.") (license license:x11))) ;; Needed for "kiki". (define-public freeglut-2.8 (package (inherit freeglut) (name "freeglut") (version "2.8.1") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/freeglut/freeglut/" version "/freeglut-" version ".tar.gz")) (sha256 (base32 "16lrxxxd9ps9l69y3zsw6iy0drwjsp6m26d1937xj71alqk6dr6x")))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--disable-static"))))) (define-public ftgl (package (name "ftgl") (version "2.4.0") (home-page "https://github.com/frankheckenbach/ftgl") (source (origin (method git-fetch) (uri (git-reference (url home-page) (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0zjs1h9w30gajq9lndzvjsa26rsmr1081lb1fbpbj10yhcdcsc79")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--disable-static"))) ;; The pkg-config file lists "freetype2" as Requires.private. (propagated-inputs (list freetype)) (inputs (list libx11 mesa glu)) (native-inputs (list pkg-config autoconf automake libtool)) (synopsis "Font rendering library for OpenGL applications") (description "FTGL is a font rendering library for OpenGL applications. Supported rendering modes are: Bitmaps, Anti-aliased pixmaps, Texture maps, Outlines, Polygon meshes, and Extruded polygon meshes.") (license license:x11))) (define-public glad-0.1 (package (name "glad") (version "0.1.36") (source (origin ;; We fetch the sources from the repository since the PyPI archive ;; doesn't contain the CMakeLists.txt file which is useful for ;; integration with other software, such as the openboardview package. (method git-fetch) (uri (git-reference (url "https://github.com/Dav1dde/glad") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0m55ya1zrmg6n2cljkajy80ilmi5sblln8742fm0k1sw9k7hzn8n")))) (build-system python-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-after 'install 'install-cmakelists.txt (lambda _ (let ((share (string-append #$output "/share/" #$(package-name this-package)))) (install-file "CMakeLists.txt" share))))))) (home-page "https://github.com/Dav1dde/glad") (synopsis "Multi-language GL/GLES/EGL/GLX/WGL loader generator") (description "Glad uses the official Khronos XML specifications to generate a GL/GLES/EGL/GLX/WGL loader tailored for specific requirements.") (license license:expat))) (define-public glad (package (inherit glad-0.1) (name "glad") (version "2.0.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Dav1dde/glad") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1pam6imhcmcyqrqi6wzzxprb23y8x6zdbvsjavnz26k72i9dbbja")))) (build-system python-build-system) (arguments (substitute-keyword-arguments (package-arguments glad-0.1) ((#:phases phases '%standard-phases) #~(modify-phases #$phases (replace 'install-cmakelists.txt (lambda _ (let ((share (string-append #$output "/share/" #$(package-name this-package)))) (install-file "cmake/CMakeLists.txt" share)))))))) (propagated-inputs (list python-jinja2)))) (define-public s2tc (package (name "s2tc") (version "1.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/divVerent/s2tc") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1fg323fk7wlv2xh6lw66wswgcv6qi8aaadk7c28h2f2lj1s7njnf")))) (build-system gnu-build-system) (native-inputs (list autoconf automake libtool)) (inputs (list mesa-headers)) (home-page "https://github.com/divVerent/s2tc") (synopsis "S3 Texture Compressio