From 64a25ad41884cbf3e8cc256e8e2394cdfccc99f2 Mon Sep 17 00:00:00 2001 From: hashirama Date: Sat, 6 Apr 2024 14:20:19 -0400 Subject: [PATCH] add forgejo --- ajatt/packages/utils.scm | 70 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 ajatt/packages/utils.scm diff --git a/ajatt/packages/utils.scm b/ajatt/packages/utils.scm new file mode 100644 index 0000000..c3747fc --- /dev/null +++ b/ajatt/packages/utils.scm @@ -0,0 +1,70 @@ +(define-module (ajatt packages utils)) + +(use-modules (gnu) + (guix gexp) + (guix packages) + (guix download) + (guix build utils) + (guix build-system gnu) + (guix build-system copy) + (nonguix build-system binary) + ((guix licenses) #:prefix license:)) + +(use-package-modules version-control gcc bash certs admin linux) +(use-service-modules certbot shepherd configuration networking ssh web) + +(define forgejo + (let ((version "1.20.5-0")) + (package + (name "forgejo") + (version version) + (source + (origin + (method url-fetch) + (uri (string-append "https://codeberg.org/forgejo/forgejo/releases/download/v" version "/forgejo-" version "-linux-amd64")) + (file-name "forgejo") + (sha256 + (base32 "0jj13qwq67acbqsina3gqi5fr2lsm80jxjmm26i1ixxhf0r0w641")))) + (build-system binary-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'chmod-to-allow-patchelf + (lambda _ + (chmod "forgejo" #o755)))) + #:install-plan `(("forgejo" "bin/")))) + (propagated-inputs (list git git-lfs)) + (home-page "https://forgejo.org") + (synopsis "A self-hosted lightweight software forge.") + (description "Forgejo is a self-hosted lightweight software forge.") + (license license:expat)))) + + + +(define loophole + (let ((version "1.0.0-beta.15")) + (package + (name "loophole") + (version version) + (source + (origin + (method url-fetch) + (uri "https://github.com/loophole/cli/releases/download/1.0.0-beta.15/loophole-cli_1.0.0-beta.15_linux_64bit.tar.gz") + (file-name "loophole") + (sha256 + (base32 "1bk5dqvw6zkjablc6b29y7a59mkh4ivziss0s2z13zvjbll315jd")))) + (build-system binary-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + ;; fix: patchelf isn't working, but + ;; patchelf --set-interpreter "$(patchelf --print-interpreter "$(realpath "$(which sh)")")" + ;; works + (add-after 'unpack 'chmod-to-allow-patchelf + (lambda _ + (chmod "loophole" #o755)))) + #:install-plan `(("loophole" "bin/")))) + (home-page "https://loophole.cloud/") + (synopsis "Instant hosting, right from your local machine.") + (description "No more hassle with port-forwarding, bypassing firewalls, or setting up dynamic.") + (license license:expat)))) + +forgejo