projects/guix·blob python-team · refs

178 lines · 6.6 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017 José Miguel Sánchez García <[email protected]>
3;;; Copyright © 2018 Tobias Geerinckx-Rice <[email protected]>
4;;; Copyright © 2019 Alexandru-Sergiu Marton <[email protected]>
5;;; Copyright © 2019 Brett Gilio <[email protected]>
6;;; Copyright © 2022 Jai Vetrivelan <[email protected]>
7;;; Copyright © 2023, 2024 John Kehayias <[email protected]>
8;;; Copyright © 2025 Efraim Flashner <[email protected]>
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25(define-module (gnu packages compton)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix gexp)
29 #:use-module (guix git-download)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system meson)
32 #:use-module (gnu packages datastructures)
33 #:use-module (gnu packages docbook)
34 #:use-module (gnu packages documentation)
35 #:use-module (gnu packages freedesktop)
36 #:use-module (gnu packages gl)
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages libevent)
39 #:use-module (gnu packages pcre)
40 #:use-module (gnu packages pkg-config)
41 #:use-module (gnu packages python)
42 #:use-module (gnu packages textutils)
43 #:use-module (gnu packages xdisorg)
44 #:use-module (gnu packages xml)
45 #:use-module (gnu packages xorg)
46 #:use-module (gnu packages ruby-xyz))
47
48(define-public compton
49 (let ((upstream-version "0.1_beta2"))
50 (package
51 (name "compton")
52 (version (string-filter (char-set-complement (char-set #\_))
53 upstream-version))
54 (source
55 (origin
56 (method git-fetch)
57 (uri (git-reference
58 (url "https://github.com/chjj/compton")
59 (commit (string-append "v" upstream-version))))
60 (sha256
61 (base32
62 "0v65viilhnd2xgvmdpzc1srxszcg8kj1vhi5gy9292j48w0s2fx1"))
63 (file-name (git-file-name name version))))
64 (build-system gnu-build-system)
65 (inputs
66 (list dbus
67 libconfig
68 libx11
69 libxcomposite
70 libxdamage
71 libxext
72 libxfixes
73 libxinerama
74 libxrandr
75 libxrender
76 mesa
77 xprop
78 xwininfo))
79 (native-inputs
80 (list asciidoc libdrm pkg-config python xorgproto))
81 (arguments
82 `(#:make-flags (list
83 "CC=gcc"
84 "NO_REGEX_PCRE=1" ; pcre makes build fail
85 (string-append "PREFIX=" (assoc-ref %outputs "out")))
86 #:tests? #f ; no tests
87 #:phases
88 (modify-phases %standard-phases
89 (delete 'configure))))
90 (home-page "https://github.com/chjj/compton")
91 (synopsis "Compositor for X11")
92 (description
93 "Compton is a compositor for the Xorg display server and a for of
94xcompmgr-dana, which implements some changes like:
95
96@itemize
97@item OpenGL backend (@command{--backend glx}), in addition to the old X Render
98backend.
99@item Inactive window transparency (@command{-i}) and dimming
100(@command{--inactive-dim}).
101@item Menu transparency (@command{-m}, thanks to Dana).
102@item Shadows are now enabled for argb windows, e.g terminals with transparency
103@item Removed serverside shadows (and simple compositing) to clean the code,
104the only option that remains is clientside shadows.
105@item Configuration files (see the man page for more details).
106@item Colored shadows (@command{--shadow-[red/green/blue]}).
107@item A new fade system.
108@item VSync support (not always working).
109@item Blur of background of transparent windows, window color inversion (bad in
110performance).
111@item Some more options...
112@end itemize\n")
113 (license license:expat))))
114
115(define-public picom
116 (package
117 (name "picom")
118 (version "13")
119 (source
120 (origin
121 (method git-fetch)
122 (uri (git-reference
123 (url "https://github.com/yshui/picom")
124 (commit (string-append "v" version))))
125 (sha256
126 (base32
127 "0x81m06fhkgrl6vzm4a3cqxcldkq223q0jzlkkhd8kpjmrqaprw3"))
128 (file-name (git-file-name name version))))
129 (build-system meson-build-system)
130 (inputs
131 (list dbus
132 libconfig
133 libepoxy
134 libev
135 libx11
136 libxext
137 mesa
138 pcre2
139 pixman
140 uthash
141 xcb-util
142 xcb-util-renderutil
143 xcb-util-image
144 xprop))
145 (native-inputs
146 (append
147 (list pkg-config python-minimal-wrapper xorgproto)
148 (if (supported-package? ruby-asciidoctor/minimal)
149 (list ruby-asciidoctor/minimal)
150 '())))
151 (arguments
152 (list #:build-type "release"
153 #:configure-flags
154 (if (this-package-native-input "ruby-asciidoctor")
155 #~'("-Dwith_docs=true")
156 #~'("-Dwith_docs=false"))
157 #:phases
158 #~(modify-phases %standard-phases
159 ;; This file would be patched by 'patch-dot-desktop-files but
160 ;; only in share/applications and not etc/xdg/autostart, so
161 ;; manually patch it before it is installed in either location.
162 ;; The 'patch-dot-desktop-files phase is still needed for other
163 ;; .desktop files.
164 (add-after 'unpack 'patch-autostart-files
165 (lambda _
166 (substitute* "picom.desktop"
167 (("Exec=")
168 (string-append "Exec=" #$output "/bin/"))))))))
169 (home-page "https://picom.app/")
170 (synopsis "Compositor for X11, forked from Compton")
171 (description
172 "Picom is a standalone compositor for Xorg, suitable for use
173with window managers that do not provide compositing.
174
175Picom is a fork of compton, which is a fork of xcompmgr-dana,
176which in turn is a fork of xcompmgr.")
177 (license (list license:expat ; The original compton license.
178 license:mpl2.0)))) ; License used by new picom files.