diff options
author | Efraim Flashner | 2020-08-05 06:23:41 -0500 |
---|---|---|
committer | Efraim Flashner | 2020-08-05 06:24:06 -0500 |
commit | cca974c4dbe2ed502097fbac6ca0e7ae0c138dd5 (patch) | |
tree | 84a74f1963de9312f3bf0f4988582b5c088a62b8 /gn/packages | |
parent | f2fd606206d88936d0ebfc191e7bc4326077d0a4 (diff) | |
download | guix-bioinformatics-cca974c4dbe2ed502097fbac6ca0e7ae0c138dd5.tar.gz |
gn: Update gitea to 1.12.3.
Diffstat (limited to 'gn/packages')
-rw-r--r-- | gn/packages/gitea.scm | 67 |
1 files changed, 39 insertions, 28 deletions
diff --git a/gn/packages/gitea.scm b/gn/packages/gitea.scm index 0ea3950..3bacbbb 100644 --- a/gn/packages/gitea.scm +++ b/gn/packages/gitea.scm @@ -2,51 +2,62 @@ #: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 (guix build-system go) + #:use-module (gnu packages node) #:use-module (gnu packages version-control)) (define-public gitea (package (name "gitea") - (version "1.9.6") + (version "1.12.3") (source (origin (method url-fetch) (uri (string-append "https://github.com/go-gitea/gitea/releases" "/download/v" version - "/gitea-" version "-linux-amd64")) + "/gitea-src-" version ".tar.gz")) (sha256 (base32 - "0d9p7h8vl37vsz43s12w45bvnsjz30kzkvavk4j7xpdikx3cd040")))) - (build-system trivial-build-system) + "05z1pp2lnbr82pw97wy0j0qk2vv1qv9c46df13d03xdfsc3gsm50")))) + (build-system go-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))) + `(#:install-source? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'prepare-build + (lambda _ + (chdir "src") + (setenv "TAGS" "bindata sqlite sqlite_unlock_notify") + #t)) + (replace 'build + (lambda _ + (invoke "make" "build"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (begin + (invoke "make" "test") + ;; Gitea requires git with lfs support to run tests. + ;(invoke "make" "test-sqlite") + (invoke "make" "test-sqlite-migration")) + #t))) + (replace 'install + (lambda _ + (invoke "make" "install"))) + (add-after 'install 'wrap-program + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin/gitea")) + (git (assoc-ref inputs "git"))) + (wrap-program bin + `("PATH" ":" prefix (,(string-append git "/bin"))))) + #t))))) (native-inputs - `(("source" ,source))) + `(("node" ,node))) (inputs - `(("bash" ,bash-minimal) - ("git" ,git))) + `(("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))) |