Add backend package for GoToSocial.

At present, this does not include the frontend assets.
This commit is contained in:
TakeV 2023-04-18 18:10:05 -07:00
parent cc9a267ed4
commit ed17f9df1e
Signed by: TakeV
GPG Key ID: A64F41345C7400AF
2 changed files with 63 additions and 1 deletions

View File

@ -1,4 +1,4 @@
(authorizations (authorizations
(version 0) (version 0)
(("1086 326D E207 068C 1C02 5129 A64F 4134 5C74 00AF" (("1086 326D E207 068C 1C02 5129 A64F 4134 5C74 00AF"
(name "TakeV")))) (name "TakeV"))

View File

@ -0,0 +1,62 @@
(define-module (kulupu packages gotosocial)
#:use-module ((guix licenses)
#:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages golang)
#:use-module (gnu packages shells)
#:use-module (gnu packages python)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix gexp)
#:use-module (guix build-system go))
(define-public gotosocial
(let* ((import-path "github.com/superseriousbusiness/gotosocial")
(working-path (string-append "src/" import-path)))
(package
(name "gotosocial")
(version "0.8.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url
"https://github.com/superseriousbusiness/gotosocial")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1cxdk59r57hbg5pwpg5vhhdzwcgpa6jdwhhblhhyk7pq1ym386n1"))))
(build-system go-build-system)
(arguments
(list #:go go-1.20
#:import-path import-path
#:phases #~(modify-phases %standard-phases
(add-before 'build 'chdir
(lambda _
(setenv "ORIG_DIR"
(getcwd))
(chdir #$working-path)))
(replace 'build
(lambda _
(setenv "VERSION"
#$version)
(invoke "sh"
(string-append (getcwd)
"/scripts/build.sh"))))
(replace 'check
(lambda _
(invoke "sh" "test/envparsing.sh")))
(add-after 'install 'install-binary
(lambda _
(install-file "gotosocial"
(string-append #$output "/bin"))))
(add-before 'install-license-files 'chdir-back
(lambda _
(chdir (getenv "ORIG_DIR")))))))
(propagated-inputs (list python-minimal-wrapper zsh))
(home-page "https://github.com/superseriousbusiness/gotosocial")
(synopsis "GoToSocial")
(description
"GoToSocial is an @@url{https://activitypub.rocks/,ActivityPub} social network server, written in Golang.")
(license license:agpl3))))