2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchgit, buildPythonPackage
|
|
|
|
, python
|
2020-09-25 04:45:31 +00:00
|
|
|
, buildGoModule
|
2020-04-24 23:36:52 +00:00
|
|
|
, pgpy, srht, redis, bcrypt, qrcode, stripe, zxcvbn, alembic, pystache
|
|
|
|
, sshpubkeys, weasyprint }:
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
let
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "0.51.2";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
buildAPI = src: buildGoModule {
|
|
|
|
inherit src version;
|
|
|
|
pname = "metasrht-api";
|
|
|
|
|
|
|
|
vendorSha256 = "0k7i7j604wqvzjavmcsw7g2x059jkkgrgz1qyvzlqc0y4ws59xkq";
|
|
|
|
};
|
|
|
|
in buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "metasrht";
|
2020-09-25 04:45:31 +00:00
|
|
|
inherit version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.sr.ht/~sircmpwn/meta.sr.ht";
|
|
|
|
rev = version;
|
2020-10-16 20:44:37 +00:00
|
|
|
sha256 = "0c9y1hzx3dj0awxrhkzrcsmy6q9fqm6v6dbp9y1ria3v47xa3nv7";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = srht.nativeBuildInputs;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pgpy
|
|
|
|
srht
|
|
|
|
redis
|
|
|
|
bcrypt
|
|
|
|
qrcode
|
|
|
|
stripe
|
|
|
|
zxcvbn
|
|
|
|
alembic
|
|
|
|
pystache
|
|
|
|
sshpubkeys
|
|
|
|
weasyprint
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export PKGVER=${version}
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ${buildAPI "${src}/api"}/bin/api $out/bin/metasrht-api
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|