2022-05-17 23:14:52 +02:00
|
|
|
(define-module (guix)
|
2022-05-26 22:46:59 +02:00
|
|
|
#:use-module (guix git-download)
|
|
|
|
#:use-module (guix build-system python)
|
|
|
|
#:use-module (guix gexp) ;; for local-file
|
|
|
|
#:use-module (guix packages)
|
|
|
|
#:use-module (gnu packages python)
|
|
|
|
#:use-module (gnu packages python-xyz)
|
|
|
|
#:use-module (mobilizon-reshare package)
|
|
|
|
#:use-module (mobilizon-reshare dependencies)
|
|
|
|
#:use-module (ice-9 rdelim)
|
|
|
|
#:use-module (ice-9 popen))
|
|
|
|
|
|
|
|
(define %source-dir (getcwd))
|
|
|
|
|
|
|
|
(define-public mobilizon-reshare.git
|
|
|
|
(let ((source-version (with-input-from-file
|
|
|
|
(string-append %source-dir
|
|
|
|
"/mobilizon_reshare/VERSION")
|
|
|
|
read-line))
|
|
|
|
(revision "0")
|
|
|
|
(commit (read-line
|
|
|
|
(open-input-pipe "git show HEAD | head -1 | cut -d ' ' -f 2"))))
|
|
|
|
(package (inherit mobilizon-reshare)
|
|
|
|
(name "mobilizon-reshare.git")
|
|
|
|
(version (git-version source-version revision commit))
|
|
|
|
(source (local-file %source-dir
|
|
|
|
#:recursive? #t
|
|
|
|
#:select? (git-predicate %source-dir)))
|
|
|
|
(propagated-inputs
|
|
|
|
(modify-inputs (package-propagated-inputs mobilizon-reshare)
|
|
|
|
(replace "python-jinja2"
|
|
|
|
python-jinja2))))))
|
|
|
|
|
|
|
|
(define-public mobilizon-reshare-scheduler
|
|
|
|
(package (inherit mobilizon-reshare.git)
|
|
|
|
(name "mobilizon-reshare-scheduler")
|
|
|
|
(build-system python-build-system)
|
|
|
|
(arguments
|
|
|
|
`(#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(delete 'configure)
|
|
|
|
(delete 'build)
|
|
|
|
(delete 'check)
|
|
|
|
(replace 'install
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
(let ((bin (string-append (assoc-ref outputs "out")
|
|
|
|
"/bin")))
|
|
|
|
(mkdir-p bin)
|
|
|
|
(install-file "scripts/scheduler.py" bin)))))))
|
|
|
|
(propagated-inputs (list mobilizon-reshare.git
|
|
|
|
python-apscheduler))
|
|
|
|
(synopsis "Mobilizon Reshare's scheduler")
|
|
|
|
(description "This script is intended to start a scheduler
|
|
|
|
running @code{mobilizon-reshare}.")))
|
|
|
|
|
2021-10-31 01:55:25 +02:00
|
|
|
|
|
|
|
mobilizon-reshare.git
|