8a2b3380ef
All checks were successful
Hydra packages.plover-plugin-yaml-dictionary.aarch64-linux Hydra build #17063 of nix-packages:flake:packages.plover-plugin-yaml-dictionary.aarch64-linux
Hydra packages.python-mautrix.aarch64-linux Hydra build #17066 of nix-packages:flake:packages.python-mautrix.aarch64-linux
Hydra packages.plover-dict-didoesdigital.x86_64-linux Hydra build #17071 of nix-packages:flake:packages.plover-dict-didoesdigital.x86_64-linux
Hydra packages.mautrix-signal.x86_64-linux Hydra build #17074 of nix-packages:flake:packages.mautrix-signal.x86_64-linux
Hydra packages.plover-dict-didoesdigital.aarch64-linux Hydra build #17075 of nix-packages:flake:packages.plover-dict-didoesdigital.aarch64-linux
Hydra packages.plover-plugin-yaml-dictionary.x86_64-linux Hydra build #17078 of nix-packages:flake:packages.plover-plugin-yaml-dictionary.x86_64-linux
Hydra packages.papermc.x86_64-linux Hydra build #17072 of nix-packages:flake:packages.papermc.x86_64-linux
Hydra packages.python-mautrix.x86_64-linux Hydra build #17080 of nix-packages:flake:packages.python-mautrix.x86_64-linux
Hydra packages.mautrix-telegram.x86_64-linux Hydra build #17082 of nix-packages:flake:packages.mautrix-telegram.x86_64-linux
Hydra packages.akkoma.x86_64-linux Hydra build #17081 of nix-packages:flake:packages.akkoma.x86_64-linux
Hydra packages.moa.x86_64-linux Hydra build #17065 of nix-packages:flake:packages.moa.x86_64-linux
Hydra packages.papermc.aarch64-linux Hydra build #17070 of nix-packages:flake:packages.papermc.aarch64-linux
Hydra packages.mautrix-signal.aarch64-linux Hydra build #17068 of nix-packages:flake:packages.mautrix-signal.aarch64-linux
Hydra packages.drone-runner-docker.x86_64-linux Hydra build #17079 of nix-packages:flake:packages.drone-runner-docker.x86_64-linux
Hydra packages.moa.aarch64-linux Hydra build #17083 of nix-packages:flake:packages.moa.aarch64-linux
Hydra packages.drone-runner-docker.aarch64-linux Hydra build #17064 of nix-packages:flake:packages.drone-runner-docker.aarch64-linux
Hydra packages.akkoma.aarch64-linux Hydra build #17073 of nix-packages:flake:packages.akkoma.aarch64-linux
Hydra packages.pleroma-fe.x86_64-linux Hydra build #17069 of nix-packages:flake:packages.pleroma-fe.x86_64-linux
Hydra packages.admin-fe.x86_64-linux Hydra build #17076 of nix-packages:flake:packages.admin-fe.x86_64-linux
Hydra packages.pleroma-fe.aarch64-linux Hydra build #17077 of nix-packages:flake:packages.pleroma-fe.aarch64-linux
Hydra packages.admin-fe.aarch64-linux Hydra build #17062 of nix-packages:flake:packages.admin-fe.aarch64-linux
Hydra packages.mautrix-telegram.aarch64-linux Hydra build #17067 of nix-packages:flake:packages.mautrix-telegram.aarch64-linux
Hydra devShells.default.aarch64-linux Hydra build #17022 of nix-packages:flake:devShells.default.aarch64-linux
89 lines
1.7 KiB
Nix
89 lines
1.7 KiB
Nix
{
|
|
fetchFromGitLab,
|
|
python3,
|
|
certifi,
|
|
flask,
|
|
flask_sqlalchemy,
|
|
flask_mail,
|
|
flask_migrate,
|
|
flask_wtf,
|
|
mastodon-py,
|
|
pandas,
|
|
psutil,
|
|
pygal,
|
|
python-twitter,
|
|
pymysql,
|
|
sentry-sdk,
|
|
authlib,
|
|
cairosvg,
|
|
werkzeug,
|
|
wheel,
|
|
callPackage,
|
|
stdenvNoCC,
|
|
lib,
|
|
setuptools,
|
|
psycopg2,
|
|
applyPatches,
|
|
}: let
|
|
source = builtins.fromJSON (builtins.readFile ./source.json);
|
|
src = applyPatches {
|
|
src = fetchFromGitLab {
|
|
owner = "fedstoa";
|
|
repo = "moa";
|
|
inherit (source) rev sha256;
|
|
};
|
|
patches = [./moa.patch];
|
|
};
|
|
moa-env = python3.withPackages (_: [
|
|
certifi
|
|
flask
|
|
flask_sqlalchemy
|
|
flask_mail
|
|
flask_migrate
|
|
flask_wtf
|
|
mastodon-py
|
|
pandas
|
|
psutil
|
|
pygal
|
|
python-twitter
|
|
pymysql
|
|
sentry-sdk
|
|
authlib
|
|
cairosvg
|
|
werkzeug
|
|
wheel
|
|
setuptools
|
|
(callPackage ../python/instagram.nix {})
|
|
psycopg2
|
|
]);
|
|
in
|
|
stdenvNoCC.mkDerivation {
|
|
pname = "moa";
|
|
version = source.date;
|
|
inherit src;
|
|
buildPhase = ''
|
|
echo "#!/bin/sh" > start.sh
|
|
echo "cd $out" >> start.sh
|
|
cp start.sh start-worker.sh
|
|
echo "${moa-env}/bin/python -m moa.models" >> start.sh
|
|
mv start.sh start-app.sh
|
|
echo "exec ${moa-env}/bin/python -m moa.worker" >> start-worker.sh
|
|
echo "exec ${moa-env}/bin/python app.py" >> start-app.sh
|
|
chmod +x start-*.sh
|
|
'';
|
|
|
|
installPhase = ''
|
|
cp -rv $src $out
|
|
chmod -R +w $out
|
|
cp start-*.sh $out
|
|
'';
|
|
meta = {
|
|
description = "Mastodon-Twitter crossposter";
|
|
license = lib.licenses.mit;
|
|
};
|
|
passthru.updateScript = [
|
|
../scripts/update-git.sh
|
|
"https://gitlab.com/fedstoa/moa"
|
|
"moa/source.json"
|
|
];
|
|
}
|