79 lines
3.2 KiB
Scheme
79 lines
3.2 KiB
Scheme
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
|
;;; This is a patch from the nonguix repo:
|
|
;;; https://gitlab.com/nonguix/nonguix/-/merge_requests/279?commit_id=3ac4f3a0153aa6a6f196a3dfde2111faee06278f#98db49bbf79c0f0288aa1baf1d2d0038c694466e
|
|
;;; TODO Remove patch when merged into nonguix
|
|
|
|
(define-module (guix-punk packages version-control)
|
|
#:use-module (gnu packages base)
|
|
#:use-module (gnu packages golang)
|
|
#:use-module (gnu packages version-control)
|
|
#:use-module (guix build-system gnu)
|
|
#:use-module (guix download)
|
|
#:use-module (guix gexp)
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
#:use-module (guix packages)
|
|
#:use-module (ice-9 match)
|
|
#:use-module (nonguix build-system binary))
|
|
|
|
(define-public gitea
|
|
(package
|
|
(name "gitea")
|
|
(version "1.20.0")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://github.com/go-gitea/gitea/releases/download/v" version "/gitea-src-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"1bmnzc6wz9hak1mvnnklk4m5vzx5rdjhci80xyzvn7ls4xhrjk9h"))))
|
|
(build-system gnu-build-system)
|
|
(arguments
|
|
(list #:phases
|
|
#~(modify-phases %standard-phases
|
|
(delete 'configure)
|
|
(replace 'build (lambda _
|
|
(setenv "HOME" (getcwd))
|
|
(setenv "TAGS" "bindata sqlite sqlite_unlock_notify")
|
|
(setenv "LDFLAGS"
|
|
(let* ((format-flag (lambda (var val)
|
|
(string-append
|
|
"-X \"code.gitea.io/gitea/modules/setting." var "=" val "\"")))
|
|
(format-flags (lambda (lst) (string-join (map (lambda (x) (apply format-flag x))
|
|
lst)))))
|
|
(format-flags
|
|
'(("CustomPath" "/var/lib/gitea/custom")
|
|
("AppWorkPath" "/var/lib/gitea")))))
|
|
(invoke "make" "build")))
|
|
(delete 'check)
|
|
(replace 'install
|
|
(lambda _
|
|
(install-file "gitea" (string-append #$output "/bin/"))))
|
|
(add-after 'install 'wrap-programs
|
|
(lambda* _
|
|
(wrap-program (string-append #$output "/bin/gitea")
|
|
`("PATH" prefix (,(string-append #$(this-package-input "git") "/bin")))))))))
|
|
(native-inputs (list go-1.20))
|
|
(inputs (list git))
|
|
(home-page "https://gitea.io")
|
|
(synopsis "A painless self-hosted Git service")
|
|
(description "Gitea is a community managed lightweight code hosting
|
|
solution written in Go. It is published under the MIT license")
|
|
(license license:expat)))
|
|
|
|
(define-public forgejo
|
|
(package
|
|
(inherit gitea)
|
|
(name "forgejo")
|
|
(version "1.19.4-0")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://codeberg.org/forgejo/forgejo/releases/download/v" version "/forgejo-src-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"00qrvfylsjn9hrx3c88b47vlz8d3l0x3q062xg1fx19ixcjiw49z"))))))
|
|
|
|
forgejo
|