mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2024-12-23 07:14:53 +01:00
nongnu: Add vscodium.
* nongnu/packages/editors.scm: New file. (vscodium): new variable. Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
This commit is contained in:
parent
beab5813f0
commit
6c1523fc88
1 changed files with 91 additions and 0 deletions
91
nongnu/packages/editors.scm
Normal file
91
nongnu/packages/editors.scm
Normal file
|
@ -0,0 +1,91 @@
|
|||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
|
||||
|
||||
(define-module (nongnu packages editors)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages gtk)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix packages)
|
||||
#:use-module ((guix licenses) :prefix license:)
|
||||
#:use-module (nonguix build-system chromium-binary))
|
||||
|
||||
(define-public vscodium
|
||||
(package
|
||||
(name "vscodium")
|
||||
(version "1.78.2.23132")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri
|
||||
(string-append
|
||||
"https://github.com/VSCodium/vscodium/releases/download/" version
|
||||
"/VSCodium-linux-x64-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 "0ymgy0xisfxqrrmwpy0ga2rhlzhxqq39ppjfawxaf0dfdnkhgkgr"))))
|
||||
(build-system chromium-binary-build-system)
|
||||
(arguments
|
||||
(list #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files
|
||||
#:substitutable? #f
|
||||
#:wrapper-plan
|
||||
#~'("opt/vscodium/codium")
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(replace 'unpack
|
||||
(lambda _
|
||||
(mkdir-p "opt/vscodium")
|
||||
(invoke "tar" "-xvf" #$source "-C" "opt/vscodium")))
|
||||
(add-before 'install-wrapper 'install-entrypoint
|
||||
(lambda _
|
||||
(let* ((bin (string-append #$output "/bin")))
|
||||
(delete-file (string-append #$output "/environment-variables"))
|
||||
(mkdir-p bin)
|
||||
(symlink (string-append #$output "/opt/vscodium/codium")
|
||||
(string-append bin "/codium")))))
|
||||
(add-after 'install-entrypoint 'install-resources
|
||||
(lambda _
|
||||
(let* ((icons
|
||||
(string-append #$output
|
||||
"/share/icons/hicolor/512x512/apps"))
|
||||
(icon.png
|
||||
(string-append #$output
|
||||
"/opt/vscodium/resources/app/"
|
||||
"resources/linux/code.png"))
|
||||
(apps (string-append #$output "/share/applications")))
|
||||
(mkdir-p icons)
|
||||
(symlink icon.png
|
||||
(string-append icons "/code.png"))
|
||||
(mkdir-p apps)
|
||||
(make-desktop-entry-file
|
||||
(string-append apps "/" #$name ".desktop")
|
||||
#:name "VSCodium"
|
||||
#:generic-name "Text Editor"
|
||||
#:exec (string-append #$output "/bin/codium")
|
||||
#:icon "code"
|
||||
#:type "Application"
|
||||
#:actions '("new-empty-window")
|
||||
#:keywords '("vscode")
|
||||
#:categories '("TextEditor" "Development"
|
||||
"IDE")
|
||||
#:startup-notify #t
|
||||
#:startup-w-m-class "Code"
|
||||
#:comment
|
||||
'(("en" "Code Editing. Redefined.")
|
||||
(#f "Code Editing. Redefined."))))))
|
||||
(add-after 'install-wrapper 'wrap-where-patchelf-does-not-work
|
||||
(lambda _
|
||||
(wrap-program (string-append #$output "/bin/codium")
|
||||
`("LD_LIBRARY_PATH" ":"
|
||||
prefix
|
||||
(,(string-join
|
||||
(list (string-append #$output "/opt/vscodium"))
|
||||
":")))))))))
|
||||
(native-inputs
|
||||
(list tar))
|
||||
(inputs
|
||||
(list gdk-pixbuf))
|
||||
(home-page "https://vscodium.com/")
|
||||
(synopsis "Community-driven, freely-licensed binary distribution of VSCode")
|
||||
(description "VSCodium is a community-driven, freely-licensed binary
|
||||
distribution of Microsoft’s editor VSCode.")
|
||||
(license license:expat)))
|
Loading…
Reference in a new issue