projects/guix·blob python-team · refs

177 lines · 6.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2025 宋文武 <[email protected]>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages gambas)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix build-system gnu)
22 #:use-module (guix gexp)
23 #:use-module (guix git-download)
24 #:use-module (guix packages)
25 #:use-module (gnu packages )
26 #:use-module (gnu packages audio)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages crypto)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages curl)
32 #:use-module (gnu packages databases)
33 #:use-module (gnu packages gettext)
34 #:use-module (gnu packages gl)
35 #:use-module (gnu packages glib)
36 #:use-module (gnu packages gstreamer)
37 #:use-module (gnu packages gtk)
38 #:use-module (gnu packages image)
39 #:use-module (gnu packages libffi)
40 #:use-module (gnu packages mail)
41 #:use-module (gnu packages maths)
42 #:use-module (gnu packages multiprecision)
43 #:use-module (gnu packages ncurses)
44 #:use-module (gnu packages pcre)
45 #:use-module (gnu packages pdf)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages qt)
48 #:use-module (gnu packages sdl)
49 #:use-module (gnu packages sqlite)
50 #:use-module (gnu packages tls)
51 #:use-module (gnu packages webkit)
52 #:use-module (gnu packages xml)
53 #:use-module (gnu packages xorg))
54
55(define-public gambas
56 (package
57 (name "gambas")
58 (version "3.21.6")
59 (source
60 (origin
61 (method git-fetch)
62 (uri (git-reference
63 (url "https://gitlab.com/gambas/gambas")
64 (commit version)))
65 (file-name (git-file-name name version))
66 (sha256
67 (base32 "0490z2np79wqn10f422c3bmfh67492bhci44cfz80k766mbclc0w"))))
68 (build-system gnu-build-system)
69 (arguments
70 (list
71 #:bootstrap-scripts #~'("reconf-all")
72 ;; XXX: Gambas executables expect a '#! /usr/bin/env gbr3' shebang.
73 #:patch-shebangs? #f
74 #:configure-flags
75 #~(list
76 (string-append "--with-inotify-includes="
77 #$(this-package-input "glibc")
78 "/include")
79 (string-append "--with-crypt-libraries="
80 #$(this-package-input "libxcrypt")
81 "/lib")
82 (string-append "--with-gmp-includes="
83 #$(this-package-input "gmp")
84 "/include")
85 (string-append "--with-gmp-libraries="
86 #$(this-package-input "gmp")
87 "/lib")
88 (string-append "--with-mysql-includes="
89 #$(this-package-input "mysql")
90 "/include/mysql")
91 (string-append "--with-mysql-libraries="
92 #$(this-package-input "mysql")
93 "/lib")
94 (string-append "--with-postgresql-includes="
95 #$(this-package-input "postgresql")
96 "/include")
97 (string-append "--with-postgresql-libraries="
98 #$(this-package-input "postgresql")
99 "/lib")
100 (string-append "--with-bzlib2-includes="
101 #$(this-package-input "bzip2")
102 "/include")
103 (string-append "--with-bzlib2-libraries="
104 #$(this-package-input "bzip2")
105 "/lib"))
106 #:phases
107 #~(modify-phases %standard-phases
108 (add-after 'unpack 'qualify-paths
109 (lambda* (#:key inputs #:allow-other-keys)
110 (substitute* "main/gbc/gbc.c"
111 (("msgfmt -o")
112 (string-append (search-input-file inputs "bin/msgfmt")
113 " -o")))))
114 (add-after 'install 'install-desktop-file
115 (lambda* (#:key outputs #:allow-other-keys)
116 (let* ((out (assoc-ref outputs "out"))
117 (appdir (string-append out "/share/applications"))
118 (icondir (string-append out "/share/pixmaps")))
119 (install-file "app/desktop/gambas3.desktop" appdir)
120 (install-file "app/desktop/gambas3.png" icondir)))))))
121 (native-inputs
122 (list autoconf
123 automake
124 libtool
125 gettext-minimal
126 pkg-config))
127 (inputs
128 (list alure
129 bzip2
130 cairo
131 curl
132 dbus
133 gdk-pixbuf
134 gettext-minimal
135 glew
136 glibc
137 glu
138 gmime
139 gmp
140 gsl
141 gst-plugins-base
142 gstreamer
143 gtk+
144 imlib2
145 libffi
146 libice
147 libsm
148 libxcrypt
149 libxml2
150 libxslt
151 libxtst
152 (list zstd "lib")
153 mesa
154 mysql
155 ncurses
156 openal
157 openssl
158 pcre2
159 poppler
160 postgresql
161 qtbase
162 qtsvg
163 qtwebengine
164 sdl2
165 sdl2-image
166 sdl2-mixer
167 sdl2-ttf
168 sqlite
169 unixodbc
170 webkitgtk-for-gtk3
171 zlib))
172 (home-page "https://gambas.sourceforge.net/")
173 (synopsis "Object-oriented language and development platform")
174 (description
175 "GAMBAS is a graphical development environment and platform based on a
176BASIC interpreter. It is inspired by Visual Basic and Java.")
177 (license license:gpl2+)))