summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiacomo Leidi <goodoldpaul@autistici.org>2023-06-12 00:39:14 +0200
committerJonathan Brielmaier <jonathan.brielmaier@web.de>2023-07-12 23:31:55 +0200
commitd798a74b254ec6ec712981367da58902c99533d7 (patch)
treeb778039aafd0dbba5fa9823d8615c943a5f53e08
parent325e4d8d1b4e66c334f7d7e363c98e3615cb6a64 (diff)
nongnu: electron: Use chromium-binary-build-system.
* nongnu/packages/electron.scm (define-module): Remove no longer required modules (electron)[build-system]: Use chromium-binary-build-system. [patchelf-plan]: Drop it since the build system figures it out from the wrapper plan; [wrapper-plan]: New argument; [phases]: Adjust to chromium-build-system; [inputs]: Drop the inputs provided by the build system. Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
-rw-r--r--nongnu/packages/electron.scm65
1 files changed, 11 insertions, 54 deletions
diff --git a/nongnu/packages/electron.scm b/nongnu/packages/electron.scm
index ffe71cd..c3e201e 100644
--- a/nongnu/packages/electron.scm
+++ b/nongnu/packages/electron.scm
@@ -1,24 +1,16 @@
1;;; SPDX-License-Identifier: GPL-3.0-or-later 1;;; SPDX-License-Identifier: GPL-3.0-or-later
2;;; Copyright © 2023 Pierre Neidhardt <mail@ambrevar.xyz> 2;;; Copyright © 2023 Pierre Neidhardt <mail@ambrevar.xyz>
3;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
3 4
4(define-module (nongnu packages electron) 5(define-module (nongnu packages electron)
5 #:use-module (nonguix build-system binary) 6 #:use-module (nonguix build-system chromium-binary)
6 #:use-module ((nonguix licenses) :prefix license:) 7 #:use-module ((nonguix licenses) :prefix license:)
7 #:use-module (guix download) 8 #:use-module (guix download)
8 #:use-module (guix packages) 9 #:use-module (guix packages)
9 #:use-module (guix utils) 10 #:use-module (guix utils)
10 #:use-module (ice-9 match) 11 #:use-module (ice-9 match)
11 #:use-module (gnu packages compression) 12 #:use-module (gnu packages compression)
12 #:use-module (gnu packages glib)
13 #:use-module (gnu packages nss)
14 #:use-module (gnu packages gtk) 13 #:use-module (gnu packages gtk)
15 #:use-module (gnu packages xorg)
16 #:use-module (gnu packages xml)
17 #:use-module (gnu packages xdisorg)
18 #:use-module (gnu packages gl)
19 #:use-module (gnu packages linux)
20 #:use-module (gnu packages cups)
21 #:use-module (gnu packages gcc)
22 #:use-module (gnu packages video)) 14 #:use-module (gnu packages video))
23 15
24(define-public electron 16(define-public electron
@@ -38,20 +30,13 @@
38 ("armhf-linux" "linux-armv7l")) 30 ("armhf-linux" "linux-armv7l"))
39 ".zip")) 31 ".zip"))
40 (sha256 (base32 "04vmqr5547059751yxr729ljqahal57lymyglaa5xzpw5bfq0xwd")))) 32 (sha256 (base32 "04vmqr5547059751yxr729ljqahal57lymyglaa5xzpw5bfq0xwd"))))
41 (build-system binary-build-system) 33 (build-system chromium-binary-build-system)
42 (arguments 34 (arguments
43 `(#:patchelf-plan 35 `(#:wrapper-plan
44 `(("electron" 36 `("electron"
45 ("glib" "atk" "libx11" "dbus" "gdk-pixbuf" "gtk+" "pango" 37 "libffmpeg.so"
46 "cairo" "libxcomposite" "libxdamage" "libxext" "libxfixes" 38 "libGLESv2.so"
47 "libxrandr" "expat" "libdrm" "libxkbcommon" "mesa" "alsa-lib" 39 "libEGL.so")
48 "cups" "at-spi2-core" "gcc:lib" "libxcb" "at-spi2-atk" "nspr"))
49 ("libffmpeg.so"
50 ("gcc:lib"))
51 ("libGLESv2.so"
52 ("gcc:lib" "libx11" "libxcb" "libxext"))
53 ("libEGL.so"
54 ("gcc:lib")))
55 #:install-plan 40 #:install-plan
56 `(("." "share/electron/" #:include 41 `(("." "share/electron/" #:include
57 ("electron" 42 ("electron"
@@ -71,7 +56,7 @@
71 ("locales" "share/electron/")) 56 ("locales" "share/electron/"))
72 #:phases 57 #:phases
73 (modify-phases %standard-phases 58 (modify-phases %standard-phases
74 (add-after 'install 'wrap-where-patchelf-does-not-work 59 (add-before 'install-wrapper 'wrap-where-patchelf-does-not-work
75 (lambda* (#:key inputs outputs #:allow-other-keys) 60 (lambda* (#:key inputs outputs #:allow-other-keys)
76 (let* ((out (assoc-ref outputs "out")) 61 (let* ((out (assoc-ref outputs "out"))
77 (bin (string-append out "/share/electron/electron")) 62 (bin (string-append out "/share/electron/electron"))
@@ -82,40 +67,12 @@
82 prefix 67 prefix
83 (,(string-join 68 (,(string-join
84 (list 69 (list
85 (string-append (assoc-ref inputs "nss") "/lib/nss")
86 (string-append (assoc-ref inputs "eudev") "/lib")
87 (string-append (assoc-ref inputs "mesa") "/lib")
88 (string-append out "/share/electron")) 70 (string-append out "/share/electron"))
89 ":"))))) 71 ":")))))
90 #t))))) 72 #t)))))
91 (native-inputs `(("unzip" ,unzip))) 73 (native-inputs `(("unzip" ,unzip)))
92 (inputs `(("glib" ,glib) 74 (inputs `(("gdk-pixbuf" ,gdk-pixbuf)
93 ("nss" ,nss) 75 ("ffmpeg" ,ffmpeg)))
94 ("nspr" ,nspr)
95 ("atk" ,atk)
96 ("libx11" ,libx11)
97 ("dbus" ,dbus)
98 ("gdk-pixbuf" ,gdk-pixbuf)
99 ("gtk+" ,gtk+)
100 ("pango" ,pango)
101 ("cairo" ,cairo)
102 ("ffmpeg" ,ffmpeg)
103 ("libxcomposite" ,libxcomposite)
104 ("libxdamage" ,libxdamage)
105 ("libxext" ,libxext)
106 ("libxfixes" ,libxfixes)
107 ("libxrandr" ,libxrandr)
108 ("expat" ,expat)
109 ("libdrm" ,libdrm)
110 ("libxkbcommon" ,libxkbcommon)
111 ("mesa" ,mesa)
112 ("alsa-lib" ,alsa-lib)
113 ("cups" ,cups)
114 ("at-spi2-core" ,at-spi2-core)
115 ("gcc:lib" ,gcc "lib")
116 ("libxcb" ,libxcb)
117 ("at-spi2-atk" ,at-spi2-atk)
118 ("eudev" ,eudev)))
119 (home-page "https://www.electronjs.org/") 76 (home-page "https://www.electronjs.org/")
120 (synopsis "Cross platform desktop application shell") 77 (synopsis "Cross platform desktop application shell")
121 (description "The Electron framework lets you write cross-platform desktop 78 (description "The Electron framework lets you write cross-platform desktop