aboutsummaryrefslogtreecommitdiff
path: root/gn/packages/gitea.scm
diff options
context:
space:
mode:
authorEfraim Flashner2019-10-29 04:40:00 -0500
committerEfraim Flashner2019-10-29 04:40:00 -0500
commit53d26a57fdee57e3112f59b828f60143041bf5ba (patch)
treef9d7c70b04773f2cccb73ece7ecb59474a716af3 /gn/packages/gitea.scm
parentcb302acb0e5108c4b5f0a80008725599570e25ec (diff)
downloadguix-bioinformatics-53d26a57fdee57e3112f59b828f60143041bf5ba.tar.gz
gn: Add gitea and service.
* gn/packages/gitea.scm (gita): New variable. * gn/services/gitea-container.scm: New container. * gn/services/gitea.service: Add systemd service.
Diffstat (limited to 'gn/packages/gitea.scm')
-rw-r--r--gn/packages/gitea.scm52
1 files changed, 52 insertions, 0 deletions
diff --git a/gn/packages/gitea.scm b/gn/packages/gitea.scm
new file mode 100644
index 0000000..0447bb9
--- /dev/null
+++ b/gn/packages/gitea.scm
@@ -0,0 +1,52 @@
+(define-module (gn packages gitea)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix build-system trivial)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages version-control))
+
+(define-public gitea
+ (package
+ (name "gitea")
+ (version "1.9.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/go-gitea/gitea/releases"
+ "/download/v" version
+ "/gitea-" version "-linux-amd64"))
+ (sha256
+ (base32
+ "017bf09ym3244wqvqbpdqxmpnb7gs23fqn7h5k1vfcrwamfwc82n"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let* ((out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin"))
+ (target (string-append bin "/gitea"))
+ (git (assoc-ref %build-inputs "git"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (path (getenv "PATH"))
+ (source (assoc-ref %build-inputs "source")))
+ (copy-file source "gitea")
+ (chmod "gitea" #o555)
+ (install-file "gitea" bin)
+ (setenv "PATH" (string-append bash "/bin"))
+ (wrap-program target
+ `("PATH" ":" prefix (,(string-append git "/bin")))))
+ #t)))
+ (native-inputs
+ `(("source" ,source)))
+ (inputs
+ `(("bash" ,bash-minimal)
+ ("git" ,git)))
+ (home-page "https://gitea.io/")
+ (synopsis "Self-hosted git service")
+ ;; TODO: Rewrite description
+ (description "Gitea is a painless self-hosted Git service. It is similar
+to GitHub, Bitbucket, and GitLab.")
+ (supported-systems '("x86_64-linux"))
+ (license license:expat)))