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)
|
2022-07-26 22:23:47 +02:00
|
|
|
#:use-module (guix gexp)
|
2022-05-26 22:46:59 +02:00
|
|
|
#:use-module (guix packages)
|
2022-11-13 14:31:03 +01:00
|
|
|
#:use-module (guix utils)
|
2022-07-26 22:23:47 +02:00
|
|
|
#:use-module (gnu packages databases) ;; for python-tortoise-orm
|
2022-11-13 14:31:03 +01:00
|
|
|
#:use-module (gnu packages markup) ;; for python-markdownify
|
2022-05-26 22:46:59 +02:00
|
|
|
#:use-module (gnu packages python)
|
2022-11-13 14:31:03 +01:00
|
|
|
#:use-module (gnu packages python-web) ;; for python-uvicorn
|
2022-07-26 22:23:47 +02:00
|
|
|
#:use-module (gnu packages python-xyz) ;; for dynaconf
|
2022-05-26 22:46:59 +02:00
|
|
|
#:use-module (mobilizon-reshare package)
|
|
|
|
#:use-module (mobilizon-reshare dependencies)
|
|
|
|
#:use-module (ice-9 rdelim)
|
|
|
|
#:use-module (ice-9 popen))
|
|
|
|
|
|
|
|
(define %source-dir (getcwd))
|
|
|
|
|
2022-07-26 22:23:47 +02:00
|
|
|
(define mobilizon-reshare-git-origin
|
|
|
|
(local-file %source-dir
|
|
|
|
#:recursive? #t
|
|
|
|
#:select? (git-predicate %source-dir)))
|
|
|
|
|
2023-07-11 19:20:08 +02:00
|
|
|
(define mobilizon-reshare.git
|
2022-05-26 22:46:59 +02:00
|
|
|
(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))
|
2023-07-11 19:20:08 +02:00
|
|
|
(source mobilizon-reshare-git-origin))))
|
2022-05-26 22:46:59 +02:00
|
|
|
|
|
|
|
(define-public mobilizon-reshare-scheduler
|
|
|
|
(package (inherit mobilizon-reshare.git)
|
|
|
|
(name "mobilizon-reshare-scheduler")
|
|
|
|
(build-system python-build-system)
|
|
|
|
(arguments
|
2022-07-26 22:23:47 +02:00
|
|
|
(list
|
|
|
|
#:phases
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
(delete 'configure)
|
|
|
|
(delete 'build)
|
|
|
|
(delete 'check)
|
|
|
|
(replace 'install
|
|
|
|
(lambda _
|
|
|
|
(let ((bin (string-append #$output "/bin")))
|
|
|
|
(mkdir-p bin)
|
|
|
|
(install-file "scripts/scheduler.py" bin)))))))
|
2022-05-26 22:46:59 +02:00
|
|
|
(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}.")))
|
|
|
|
|
2023-05-22 12:53:32 +02:00
|
|
|
mobilizon-reshare.git
|