mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2024-11-22 16:38:09 +01:00
d798a74b25
* 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>
83 lines
3.3 KiB
Scheme
83 lines
3.3 KiB
Scheme
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
|
;;; Copyright © 2023 Pierre Neidhardt <mail@ambrevar.xyz>
|
|
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
|
|
|
|
(define-module (nongnu packages electron)
|
|
#:use-module (nonguix build-system chromium-binary)
|
|
#:use-module ((nonguix licenses) :prefix license:)
|
|
#:use-module (guix download)
|
|
#:use-module (guix packages)
|
|
#:use-module (guix utils)
|
|
#:use-module (ice-9 match)
|
|
#:use-module (gnu packages compression)
|
|
#:use-module (gnu packages gtk)
|
|
#:use-module (gnu packages video))
|
|
|
|
(define-public electron
|
|
(package
|
|
(name "electron")
|
|
(version "24.2.0")
|
|
(source (origin
|
|
(method url-fetch/zipbomb)
|
|
(uri
|
|
(string-append
|
|
"https://github.com/electron/electron/releases/download/v"
|
|
version "/electron-v" version "-"
|
|
(match (or (%current-system) (%current-target-system))
|
|
("x86_64-linux" "linux-x64")
|
|
("i686-linux" "linux-ia32")
|
|
("aarch64-linux" "linux-arm64")
|
|
("armhf-linux" "linux-armv7l"))
|
|
".zip"))
|
|
(sha256 (base32 "04vmqr5547059751yxr729ljqahal57lymyglaa5xzpw5bfq0xwd"))))
|
|
(build-system chromium-binary-build-system)
|
|
(arguments
|
|
`(#:wrapper-plan
|
|
`("electron"
|
|
"libffmpeg.so"
|
|
"libGLESv2.so"
|
|
"libEGL.so")
|
|
#:install-plan
|
|
`(("." "share/electron/" #:include
|
|
("electron"
|
|
"chrome-sandbox"
|
|
"chrome_100_percent.pak"
|
|
"chrome_200_percent.pak"
|
|
"chrome_crashpad_handler"
|
|
"icudtl.dat"
|
|
"resources.pak"
|
|
"v8_context_snapshot.bin"
|
|
"version"
|
|
"libffmpeg.so"
|
|
;; electron seems to force-load these from its directory.
|
|
"libEGL.so"
|
|
"libGLESv2.so"))
|
|
("resources" "share/electron/")
|
|
("locales" "share/electron/"))
|
|
#:phases
|
|
(modify-phases %standard-phases
|
|
(add-before 'install-wrapper 'wrap-where-patchelf-does-not-work
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
(bin (string-append out "/share/electron/electron"))
|
|
(wrapper (string-append out "/bin/electron")))
|
|
(mkdir-p (dirname wrapper))
|
|
(make-wrapper wrapper bin
|
|
`("LD_LIBRARY_PATH" ":"
|
|
prefix
|
|
(,(string-join
|
|
(list
|
|
(string-append out "/share/electron"))
|
|
":")))))
|
|
#t)))))
|
|
(native-inputs `(("unzip" ,unzip)))
|
|
(inputs `(("gdk-pixbuf" ,gdk-pixbuf)
|
|
("ffmpeg" ,ffmpeg)))
|
|
(home-page "https://www.electronjs.org/")
|
|
(synopsis "Cross platform desktop application shell")
|
|
(description "The Electron framework lets you write cross-platform desktop
|
|
applications using JavaScript, HTML and CSS. It is based on Node.js and
|
|
Chromium and is used by the Atom editor and many other apps.")
|
|
(license (license:nonfree
|
|
(string-append "https://github.com/electron/electron/blob/v"
|
|
version "/LICENSE")))))
|