2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromSourcehut
|
|
|
|
, buildPythonPackage
|
2020-09-25 04:45:31 +00:00
|
|
|
, buildGoModule
|
2021-05-20 23:08:51 +00:00
|
|
|
, pgpy
|
|
|
|
, srht
|
|
|
|
, redis
|
|
|
|
, bcrypt
|
|
|
|
, qrcode
|
|
|
|
, stripe
|
|
|
|
, zxcvbn
|
|
|
|
, alembic
|
|
|
|
, pystache
|
|
|
|
, dnspython
|
|
|
|
, sshpubkeys
|
|
|
|
, weasyprint
|
2021-08-27 14:25:00 +00:00
|
|
|
, prometheus-client
|
2021-05-20 23:08:51 +00:00
|
|
|
, python
|
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
let
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "0.53.14";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~sircmpwn";
|
|
|
|
repo = "meta.sr.ht";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-/+r/XLDkcSTW647xPMh5bcJmR2xZNNH74AJ5jemna2k=";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildApi = src: buildGoModule {
|
2020-09-25 04:45:31 +00:00
|
|
|
inherit src version;
|
|
|
|
pname = "metasrht-api";
|
2021-05-20 23:08:51 +00:00
|
|
|
vendorSha256 = "sha256-eZyDrr2VcNMxI++18qUy7LA1Q1YDlWCoRtl00L8lfR4=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
in
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "metasrht";
|
|
|
|
inherit version src;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = srht.nativeBuildInputs;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pgpy
|
|
|
|
srht
|
|
|
|
redis
|
|
|
|
bcrypt
|
|
|
|
qrcode
|
|
|
|
stripe
|
|
|
|
zxcvbn
|
|
|
|
alembic
|
|
|
|
pystache
|
|
|
|
sshpubkeys
|
|
|
|
weasyprint
|
2021-08-27 14:25:00 +00:00
|
|
|
prometheus-client
|
2021-05-20 23:08:51 +00:00
|
|
|
dnspython
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export PKGVER=${version}
|
2021-05-20 23:08:51 +00:00
|
|
|
export SRHT_PATH=${srht}/${python.sitePackages}/srht
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
2021-05-20 23:08:51 +00:00
|
|
|
cp ${buildApi "${src}/api/"}/bin/api $out/bin/metasrht-api
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://git.sr.ht/~sircmpwn/meta.sr.ht";
|
|
|
|
description = "Account management service for the sr.ht network";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
maintainers = with maintainers; [ eadwu ];
|
|
|
|
};
|
|
|
|
}
|