mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2024-11-28 19:24:11 +01:00
nongnu: Add anytype.
* nongnu/packages/productivity: New module. (anytype): new variable. Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
This commit is contained in:
parent
f78100ae57
commit
5e5167168e
1 changed files with 113 additions and 0 deletions
113
nongnu/packages/productivity.scm
Normal file
113
nongnu/packages/productivity.scm
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
|
||||||
|
|
||||||
|
(define-module (nongnu packages productivity)
|
||||||
|
#:use-module (gnu packages base)
|
||||||
|
#:use-module (gnu packages compression)
|
||||||
|
#:use-module (gnu packages freedesktop)
|
||||||
|
#:use-module (gnu packages gl)
|
||||||
|
#:use-module (gnu packages gtk)
|
||||||
|
#:use-module (gnu packages image)
|
||||||
|
#:use-module (gnu packages linux)
|
||||||
|
#:use-module (gnu packages pciutils)
|
||||||
|
#:use-module (gnu packages photo)
|
||||||
|
#:use-module (gnu packages xiph)
|
||||||
|
#:use-module (gnu packages xorg)
|
||||||
|
#:use-module (gnu packages video)
|
||||||
|
#:use-module (gnu packages wget)
|
||||||
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (nonguix build-system chromium-binary)
|
||||||
|
#:use-module ((nonguix licenses) #:prefix license:))
|
||||||
|
|
||||||
|
(define-public anytype
|
||||||
|
(package
|
||||||
|
(name "anytype")
|
||||||
|
(version "0.35.2")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri
|
||||||
|
(string-append "https://download.anytype.io?action=download"
|
||||||
|
"&key=desktop&id=127051615"))
|
||||||
|
(file-name (string-append "anytype-" version ".deb"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"12lfy5rygnaachax62j40b1ns9qsysa94f0hgqhsjaij50kw3dlc"))))
|
||||||
|
(build-system chromium-binary-build-system)
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
;; almost 300MB
|
||||||
|
#:substitutable? #f
|
||||||
|
#:validate-runpath? #f ; TODO: fails on wrapped binary and included other files
|
||||||
|
#:wrapper-plan
|
||||||
|
#~(map (lambda (file)
|
||||||
|
(string-append "opt/Anytype/" file))
|
||||||
|
'("anytype"
|
||||||
|
"chrome-sandbox"
|
||||||
|
"chrome_crashpad_handler"
|
||||||
|
"libEGL.so"
|
||||||
|
"libffmpeg.so"
|
||||||
|
"libGLESv2.so"
|
||||||
|
"libvk_swiftshader.so"
|
||||||
|
"libvulkan.so.1"
|
||||||
|
"resources/app.asar.unpacked/node_modules/keytar/build/Release/keytar.node"))
|
||||||
|
#:install-plan
|
||||||
|
#~'(("opt/" "/share")
|
||||||
|
("usr/share/" "/share"))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'unpack-deb
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(invoke "ar" "x" #$source)
|
||||||
|
(invoke "rm" "-v" "control.tar.gz"
|
||||||
|
"debian-binary"
|
||||||
|
(string-append "anytype-" #$version ".deb"))
|
||||||
|
(invoke "tar" "xvf" "data.tar.xz")
|
||||||
|
(invoke "rm" "-vrf" "data.tar.xz")))
|
||||||
|
(add-before 'install 'patch-assets
|
||||||
|
(lambda _
|
||||||
|
(let* ((bin (string-append #$output "/bin"))
|
||||||
|
(icon (string-append #$output "/share/icons/hicolor/0x0/apps/anytype.png"))
|
||||||
|
(usr/share "./usr/share")
|
||||||
|
(old-exe "/opt/Anytype/anytype")
|
||||||
|
(exe (string-append bin "/anytype")))
|
||||||
|
(substitute* (string-append usr/share "/applications/anytype.desktop")
|
||||||
|
(("^Icon=anytype") (string-append "Icon=" icon))
|
||||||
|
(((string-append "^Exec=" old-exe)) (string-append "Exec=" exe))))))
|
||||||
|
(add-before 'install-wrapper 'symlink-entrypoint
|
||||||
|
(lambda _
|
||||||
|
(let* ((bin (string-append #$output "/bin"))
|
||||||
|
(exe (string-append bin "/anytype"))
|
||||||
|
(share (string-append #$output "/share/Anytype"))
|
||||||
|
(target (string-append share "/anytype")))
|
||||||
|
(mkdir-p bin)
|
||||||
|
(symlink target exe)
|
||||||
|
(wrap-program exe
|
||||||
|
`("LD_LIBRARY_PATH" = (,share)))))))))
|
||||||
|
(native-inputs (list tar))
|
||||||
|
(inputs
|
||||||
|
(list bzip2
|
||||||
|
flac
|
||||||
|
gdk-pixbuf
|
||||||
|
harfbuzz
|
||||||
|
libexif
|
||||||
|
libglvnd
|
||||||
|
libpng
|
||||||
|
libva
|
||||||
|
libxscrnsaver
|
||||||
|
opus
|
||||||
|
pciutils
|
||||||
|
snappy
|
||||||
|
util-linux
|
||||||
|
xdg-utils
|
||||||
|
wget))
|
||||||
|
(synopsis "Productivity and note-taking app")
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(description "Anytype is an E2E encrypted, cross-platform, productivity and
|
||||||
|
note taking app. It stores all the data locally and allows for peer-to-peer
|
||||||
|
synchronization.")
|
||||||
|
(home-page "https://anytype.io")
|
||||||
|
(license (license:nonfree
|
||||||
|
"https://github.com/anyproto/anytype-ts/blob/main/LICENSE.md"))))
|
Loading…
Reference in a new issue