2021-10-31 01:55:25 +02:00
|
|
|
(define-module (docker mobilizon-reshare)
|
|
|
|
#:use-module (guix download)
|
|
|
|
#:use-module (guix gexp)
|
|
|
|
#:use-module (guix git-download)
|
|
|
|
#:use-module (guix packages)
|
2022-02-24 00:04:20 +01:00
|
|
|
#:use-module (guix transformations)
|
2021-10-31 01:55:25 +02:00
|
|
|
#:use-module (guix utils)
|
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
|
|
#:use-module (guix build-system python)
|
|
|
|
#:use-module (gnu packages check)
|
|
|
|
#:use-module (gnu packages databases)
|
2022-01-09 04:12:34 +01:00
|
|
|
#:use-module (gnu packages markup)
|
2022-01-03 20:14:31 +01:00
|
|
|
#:use-module (gnu packages openstack)
|
2021-10-31 01:55:25 +02:00
|
|
|
#:use-module (gnu packages python-build)
|
|
|
|
#:use-module (gnu packages python-check)
|
2022-01-18 01:39:00 +01:00
|
|
|
#:use-module (gnu packages python-crypto)
|
2021-10-31 01:55:25 +02:00
|
|
|
#:use-module (gnu packages python-web)
|
|
|
|
#:use-module (gnu packages python-xyz)
|
2022-01-18 01:39:00 +01:00
|
|
|
#:use-module (gnu packages qt)
|
2021-10-31 01:55:25 +02:00
|
|
|
#:use-module (gnu packages time)
|
|
|
|
#:use-module (ice-9 popen)
|
|
|
|
#:use-module (ice-9 rdelim)
|
|
|
|
#:use-module (srfi srfi-1))
|
|
|
|
|
|
|
|
(define %source-dir (getcwd))
|
|
|
|
|
|
|
|
(define coopyleft
|
|
|
|
(let ((license (@@ (guix licenses) license)))
|
|
|
|
(license "Coopyleft"
|
|
|
|
"https://wiki.coopcycle.org/en:license"
|
|
|
|
"Coopyleft License")))
|
|
|
|
|
2021-11-20 15:40:10 +01:00
|
|
|
(define-public python-facebook-sdk
|
|
|
|
(package
|
|
|
|
(name "python-facebook-sdk")
|
|
|
|
(version "3.1.0")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "facebook-sdk" version))
|
|
|
|
(sha256
|
|
|
|
(base32 "138grz0n6plzdqgi4h6hhszf58bsvx9v76cwj51g1nd3kvkd5g6a"))))
|
|
|
|
(build-system python-build-system)
|
|
|
|
(propagated-inputs `(("python-requests" ,python-requests)))
|
|
|
|
(home-page "https://facebook-sdk.readthedocs.io")
|
|
|
|
(synopsis
|
|
|
|
"Facebook Graph API client in Python")
|
|
|
|
(description
|
|
|
|
"This client library is designed to support the Facebook Graph API and
|
|
|
|
the official Facebook JavaScript SDK, which is the canonical way to implement
|
|
|
|
Facebook authentication.")
|
|
|
|
(license license:asl2.0)))
|
|
|
|
|
2022-01-03 20:14:31 +01:00
|
|
|
(define-public python-ddlparse
|
|
|
|
(package
|
|
|
|
(name "python-ddlparse")
|
|
|
|
(version "1.10.0")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "ddlparse" version))
|
|
|
|
(sha256
|
|
|
|
(base32 "1nh8m6rxslwk05daxshxmgk41qfp18yynydba49b13l4m8dnh634"))))
|
|
|
|
(build-system python-build-system)
|
|
|
|
(arguments
|
|
|
|
;; Tests depend on network access.
|
|
|
|
`(#:tests? #false))
|
|
|
|
(propagated-inputs (list python-pyparsing))
|
|
|
|
(home-page "http://github.com/shinichi-takii/ddlparse")
|
|
|
|
(synopsis "DDL parase and Convert to BigQuery JSON schema")
|
|
|
|
(description "DDL parase and Convert to BigQuery JSON schema")
|
|
|
|
(license #f)))
|
|
|
|
|
|
|
|
(define-public python-dictdiffer/fixed
|
|
|
|
(package (inherit python-dictdiffer)
|
|
|
|
(arguments
|
|
|
|
(substitute-keyword-arguments (package-arguments python-send2trash)
|
|
|
|
((#:phases phases)
|
|
|
|
`(modify-phases ,phases
|
|
|
|
(delete 'check)))))))
|
|
|
|
|
2022-02-05 18:46:02 +01:00
|
|
|
(define-public python-pypika-tortoise-0.1.3
|
|
|
|
(package (inherit python-pypika-tortoise)
|
|
|
|
(version "0.1.3")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "pypika-tortoise" version))
|
|
|
|
(sha256
|
|
|
|
(base32 "066jb88f3hk42sks69gv6w7k5irf6r0ssbly1n41a3pb19p2vpzc"))))))
|
|
|
|
|
|
|
|
(define-public python-tortoise-orm-0.18.1
|
|
|
|
(package (inherit python-tortoise-orm)
|
|
|
|
(version "0.18.1")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "tortoise-orm" version))
|
|
|
|
(sha256
|
|
|
|
(base32 "1c8xq3620z04i1yp8n6bfshi98qkjjydkbs3zld78a885p762wsk"))))
|
|
|
|
(arguments
|
|
|
|
`(#:tests? #f
|
|
|
|
#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(delete 'sanity-check))))
|
|
|
|
(propagated-inputs
|
|
|
|
(modify-inputs (package-propagated-inputs python-tortoise-orm)
|
|
|
|
(replace "python-pypika-tortoise" python-pypika-tortoise-0.1.3)))))
|
|
|
|
|
2022-01-03 20:14:31 +01:00
|
|
|
(define-public python-aerich
|
|
|
|
(package
|
|
|
|
(name "python-aerich")
|
2022-02-05 18:46:02 +01:00
|
|
|
(version "0.6.2")
|
2022-01-03 20:14:31 +01:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "aerich" version))
|
|
|
|
(sha256
|
2022-02-05 18:46:02 +01:00
|
|
|
(base32 "1r4xqw9x0fvdjbd36riz72n3ih1p7apv2p92lq1h6nwjfzwr2jvq"))))
|
2022-01-03 20:14:31 +01:00
|
|
|
(build-system python-build-system)
|
|
|
|
(propagated-inputs
|
|
|
|
(list python-asyncmy
|
|
|
|
python-asyncpg
|
|
|
|
python-click
|
|
|
|
python-ddlparse
|
|
|
|
python-dictdiffer/fixed
|
2022-02-05 18:46:02 +01:00
|
|
|
python-pytz
|
|
|
|
python-pypika-tortoise-0.1.3
|
2022-01-03 20:14:31 +01:00
|
|
|
python-tomlkit
|
2022-02-05 18:46:02 +01:00
|
|
|
python-tortoise-orm-0.18.1))
|
2022-01-03 20:14:31 +01:00
|
|
|
(home-page "https://github.com/tortoise/aerich")
|
|
|
|
(synopsis "A database migrations tool for Tortoise ORM.")
|
|
|
|
(description
|
|
|
|
"This package provides a database migrations tool for Tortoise ORM.")
|
|
|
|
(license #f)))
|
|
|
|
|
2022-01-18 01:39:00 +01:00
|
|
|
(define-public python-pytest-tornado5
|
|
|
|
(package
|
|
|
|
(name "python-pytest-tornado5")
|
|
|
|
(version "2.0.0")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "pytest-tornado5" version))
|
|
|
|
(sha256
|
|
|
|
(base32 "0qb62jw2w0xr6y942yp0qxiy755bismjfpnxaxjjm05gy2pymr8d"))))
|
|
|
|
(build-system python-build-system)
|
|
|
|
(propagated-inputs (list python-pytest python-tornado))
|
|
|
|
(home-page "https://github.com/vidartf/pytest-tornado")
|
|
|
|
(synopsis
|
|
|
|
"Fixtures and markers to simplify testing of Tornado applications")
|
|
|
|
(description
|
|
|
|
"This package provides a @code{py.test} plugin providing fixtures and markers to
|
|
|
|
simplify testing of asynchronous tornado applications.")
|
|
|
|
(license license:asl2.0)))
|
|
|
|
|
|
|
|
(define-public python-rethinkdb
|
|
|
|
(package
|
|
|
|
(name "python-rethinkdb")
|
|
|
|
(version "2.4.8")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "rethinkdb" version))
|
|
|
|
(sha256
|
|
|
|
(base32 "1vmap0la5j8xpigyp5bqph9cb6dskyw76y37n3vb16l9rlmsfxcz"))))
|
|
|
|
(build-system python-build-system)
|
|
|
|
(arguments
|
|
|
|
`(#:tests? #f))
|
|
|
|
(propagated-inputs (list python-six))
|
|
|
|
(home-page "https://github.com/RethinkDB/rethinkdb-python")
|
|
|
|
(synopsis "Python driver library for the RethinkDB database server.")
|
|
|
|
(description "Python driver library for the RethinkDB database server.")
|
|
|
|
(license #f)))
|
|
|
|
|
|
|
|
(define-public python-apscheduler
|
|
|
|
(package
|
|
|
|
(name "python-apscheduler")
|
|
|
|
(version "3.8.1")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "APScheduler" version))
|
|
|
|
(sha256
|
|
|
|
(base32 "0m93bz9qpw6iwhay68bwljjcfyzcbh2rq0lc2yp4iamxrzml9wsw"))))
|
|
|
|
(build-system python-build-system)
|
|
|
|
(arguments
|
|
|
|
`(#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(replace 'check
|
|
|
|
(lambda* (#:key tests? #:allow-other-keys)
|
|
|
|
(when tests?
|
|
|
|
;; FIXME: Currently python-kazoo fails to build.
|
|
|
|
(delete-file "tests/test_jobstores.py")
|
|
|
|
(invoke "pytest")))))))
|
|
|
|
(propagated-inputs
|
|
|
|
(list python-pytz
|
|
|
|
python-setuptools
|
|
|
|
python-six
|
|
|
|
python-tzlocal))
|
|
|
|
(native-inputs
|
|
|
|
(list python-mock
|
|
|
|
python-pyqt
|
|
|
|
python-twisted
|
|
|
|
python-gevent
|
|
|
|
python-setuptools-scm
|
|
|
|
python-sqlalchemy
|
|
|
|
python-redis
|
|
|
|
python-pymongo
|
|
|
|
python-rethinkdb
|
|
|
|
python-pytest
|
|
|
|
python-pytest-asyncio
|
|
|
|
python-pytest-cov
|
|
|
|
python-pytest-tornado5))
|
|
|
|
(home-page "https://github.com/agronholm/apscheduler")
|
|
|
|
(synopsis "In-process task scheduler with Cron-like capabilities")
|
|
|
|
(description "In-process task scheduler with Cron-like capabilities")
|
|
|
|
(license license:expat)))
|
|
|
|
|
2022-02-16 12:23:31 +01:00
|
|
|
(define-public python-click-8.0
|
|
|
|
(package (inherit python-click)
|
|
|
|
(version "8.0.3")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "click" version))
|
|
|
|
(sha256
|
|
|
|
(base32 "0nybbsgaff8ihfh74nhmng6qj74pfpg99njc7ivysphg0lmr63j1"))))))
|
|
|
|
|
2022-02-24 00:04:20 +01:00
|
|
|
(define click-8-instead-of-click-7
|
|
|
|
(package-input-rewriting/spec `(("python-click" . ,(const python-click-8.0)))))
|
|
|
|
|
2021-10-31 01:55:25 +02:00
|
|
|
(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
|
|
|
|
(name "mobilizon-reshare.git")
|
|
|
|
(version (git-version source-version revision commit))
|
|
|
|
(source (local-file %source-dir
|
|
|
|
#:recursive? #t
|
|
|
|
#:select? (git-predicate %source-dir)))
|
|
|
|
(build-system python-build-system)
|
|
|
|
(arguments
|
2022-04-11 08:36:10 +02:00
|
|
|
(list #:phases
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
(add-after 'unpack 'generate-setup.py
|
|
|
|
(lambda _
|
|
|
|
;; This is a hack needed to get poetry's
|
|
|
|
;; setup.py.
|
|
|
|
(setenv "POETRY_VIRTUALENVS_CREATE" "false")
|
|
|
|
(invoke "poetry" "build" "-f" "sdist")
|
|
|
|
(invoke "bash" "-c"
|
|
|
|
"tar --wildcards -xvf dist/*-`poetry version -s`.tar.gz -O '*/setup.py' > setup.py")))
|
|
|
|
(replace 'check
|
|
|
|
(lambda* (#:key tests? #:allow-other-keys)
|
|
|
|
(when tests?
|
|
|
|
(setenv "POETRY_VIRTUALENVS_CREATE" "false")
|
|
|
|
(invoke "./scripts/run_pipeline_tests.sh"))))
|
|
|
|
(add-after 'install 'install-completion-scripts
|
|
|
|
(lambda _
|
|
|
|
(copy-recursively "etc" (string-append #$output "/etc"))))
|
|
|
|
(add-before 'sanity-check 'set-dummy-config
|
|
|
|
(lambda _
|
|
|
|
;; This is needed to prevent the tool from
|
|
|
|
;; crashing at startup during the sanity check.
|
|
|
|
(setenv "SECRETS_FOR_DYNACONF"
|
|
|
|
(string-append (getcwd)
|
|
|
|
"/mobilizon_reshare/.secrets.toml")))))))
|
2021-10-31 01:55:25 +02:00
|
|
|
(native-inputs
|
2022-02-05 18:46:02 +01:00
|
|
|
(list python-iniconfig
|
|
|
|
poetry
|
2022-01-03 20:14:31 +01:00
|
|
|
python-pytest
|
|
|
|
python-pytest-cov
|
|
|
|
python-pytest-asyncio
|
|
|
|
python-pytest-lazy-fixture
|
|
|
|
python-responses))
|
2021-10-31 01:55:25 +02:00
|
|
|
(propagated-inputs
|
2022-02-24 00:04:20 +01:00
|
|
|
(list (click-8-instead-of-click-7 python-aerich)
|
2022-01-03 20:14:31 +01:00
|
|
|
python-aiosqlite
|
|
|
|
python-appdirs
|
2022-01-09 04:12:34 +01:00
|
|
|
python-arrow
|
2022-01-03 20:14:31 +01:00
|
|
|
python-beautifulsoup4
|
2022-02-16 12:23:31 +01:00
|
|
|
python-click-8.0
|
2022-02-24 00:04:20 +01:00
|
|
|
(click-8-instead-of-click-7 dynaconf)
|
2022-03-12 11:29:56 +01:00
|
|
|
python-facebook-sdk
|
2022-01-03 20:14:31 +01:00
|
|
|
python-jinja2
|
|
|
|
python-markdownify
|
2022-03-12 11:29:56 +01:00
|
|
|
python-requests
|
|
|
|
python-tweepy
|
2022-02-05 18:46:02 +01:00
|
|
|
python-tortoise-orm-0.18.1))
|
2021-10-31 01:55:25 +02:00
|
|
|
(home-page
|
|
|
|
"https://github.com/Tech-Workers-Coalition-Italia/mobilizon-reshare")
|
|
|
|
(synopsis
|
|
|
|
"Publish Mobilizon events to your social networks")
|
|
|
|
(description
|
2021-11-12 01:05:39 +01:00
|
|
|
"This package provides a CLI application to publish Mobilizon
|
2021-10-31 01:55:25 +02:00
|
|
|
events to your social media.")
|
|
|
|
(license coopyleft))))
|