summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nongnu/packages/electron.scm82
1 files changed, 41 insertions, 41 deletions
diff --git a/nongnu/packages/electron.scm b/nongnu/packages/electron.scm
index 71ad382..d424cba 100644
--- a/nongnu/packages/electron.scm
+++ b/nongnu/packages/electron.scm
@@ -5,11 +5,13 @@
5;;; Copyright © 2024 Jonathan Brielmaier <jonathan.brielmaier@web.de> 5;;; Copyright © 2024 Jonathan Brielmaier <jonathan.brielmaier@web.de>
6;;; Copyright © 2025 Ricardo Wurmus <rekado@elephly.net> 6;;; Copyright © 2025 Ricardo Wurmus <rekado@elephly.net>
7;;; Copyright © 2025 Simen Endsjø <contact@simendsjo.me> 7;;; Copyright © 2025 Simen Endsjø <contact@simendsjo.me>
8;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr>
8 9
9(define-module (nongnu packages electron) 10(define-module (nongnu packages electron)
10 #:use-module (nonguix build-system chromium-binary) 11 #:use-module (nonguix build-system chromium-binary)
11 #:use-module ((nonguix licenses) :prefix license:) 12 #:use-module ((nonguix licenses) :prefix license:)
12 #:use-module (guix download) 13 #:use-module (guix download)
14 #:use-module (guix gexp)
13 #:use-module (guix packages) 15 #:use-module (guix packages)
14 #:use-module (guix utils) 16 #:use-module (guix utils)
15 #:use-module (ice-9 match) 17 #:use-module (ice-9 match)
@@ -42,47 +44,45 @@
42 "0qs5n6m0gj0rknjq5aqrbbpqwh2829a1cl51l6xj79p7aiggb9p3")) 44 "0qs5n6m0gj0rknjq5aqrbbpqwh2829a1cl51l6xj79p7aiggb9p3"))
43 (build-system chromium-binary-build-system) 45 (build-system chromium-binary-build-system)
44 (arguments 46 (arguments
45 `(#:wrapper-plan 47 (list
46 `("electron" 48 #:wrapper-plan
47 "libffmpeg.so" 49 #~'("electron"
48 "libGLESv2.so" 50 "libffmpeg.so"
49 "libEGL.so") 51 "libGLESv2.so"
50 #:install-plan 52 "libEGL.so")
51 `(("." "share/electron/" #:include 53 #:install-plan
52 ("electron" 54 #~'(("." "share/electron/" #:include
53 "chrome-sandbox" 55 ("electron"
54 "chrome_100_percent.pak" 56 "chrome-sandbox"
55 "chrome_200_percent.pak" 57 "chrome_100_percent.pak"
56 "chrome_crashpad_handler" 58 "chrome_200_percent.pak"
57 "icudtl.dat" 59 "chrome_crashpad_handler"
58 "resources.pak" 60 "icudtl.dat"
59 "v8_context_snapshot.bin" 61 "resources.pak"
60 "version" 62 "v8_context_snapshot.bin"
61 "libffmpeg.so" 63 "version"
62 ;; electron seems to force-load these from its directory. 64 "libffmpeg.so"
63 "libEGL.so" 65 ;; electron seems to force-load these from its directory.
64 "libGLESv2.so")) 66 "libEGL.so"
65 ("resources" "share/electron/") 67 "libGLESv2.so"))
66 ("locales" "share/electron/")) 68 ("resources" "share/electron/")
67 #:phases 69 ("locales" "share/electron/"))
68 (modify-phases %standard-phases 70 #:phases
69 (add-before 'install-wrapper 'wrap-where-patchelf-does-not-work 71 #~(modify-phases %standard-phases
70 (lambda* (#:key inputs outputs #:allow-other-keys) 72 (add-before 'install-wrapper 'wrap-where-patchelf-does-not-work
71 (let* ((out (assoc-ref outputs "out")) 73 (lambda* (#:key inputs #:allow-other-keys)
72 (bin (string-append out "/share/electron/electron")) 74 (let ((bin (string-append #$output "/share/electron/electron"))
73 (wrapper (string-append out "/bin/electron"))) 75 (wrapper (string-append #$output "/bin/electron")))
74 (mkdir-p (dirname wrapper)) 76 (mkdir-p (dirname wrapper))
75 (make-wrapper wrapper bin 77 (make-wrapper wrapper bin
76 `("LD_LIBRARY_PATH" ":" 78 `("LD_LIBRARY_PATH" ":"
77 prefix 79 prefix
78 (,(string-join 80 (,(string-join
79 (list 81 (list
80 (string-append out "/share/electron")) 82 (string-append out "/share/electron"))
81 ":"))))) 83 ":"))))))))))
82 #t))))) 84 (native-inputs (list unzip))
83 (native-inputs `(("unzip" ,unzip))) 85 (inputs (list ffmpeg gdk-pixbuf))
84 (inputs `(("gdk-pixbuf" ,gdk-pixbuf)
85 ("ffmpeg" ,ffmpeg)))
86 (home-page "https://www.electronjs.org/") 86 (home-page "https://www.electronjs.org/")
87 (synopsis "Cross platform desktop application shell") 87 (synopsis "Cross platform desktop application shell")
88 (description "The Electron framework lets you write cross-platform desktop 88 (description "The Electron framework lets you write cross-platform desktop