2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchgit, buildPythonPackage
|
2019-01-22 02:01:52 +00:00
|
|
|
, python
|
2020-06-23 01:18:52 +01:00
|
|
|
, buildGoModule
|
2019-01-22 02:01:52 +00:00
|
|
|
, pgpy, srht, redis, bcrypt, qrcode, stripe, zxcvbn, alembic, pystache
|
2020-04-16 21:39:55 +01:00
|
|
|
, sshpubkeys, weasyprint }:
|
2019-01-22 02:01:52 +00:00
|
|
|
|
2020-06-23 01:18:52 +01:00
|
|
|
let
|
2020-10-11 14:43:38 +01:00
|
|
|
version = "0.51.2";
|
2019-01-22 02:01:52 +00:00
|
|
|
|
2020-06-23 01:18:52 +01:00
|
|
|
buildAPI = src: buildGoModule {
|
|
|
|
inherit src version;
|
|
|
|
pname = "metasrht-api";
|
|
|
|
|
|
|
|
vendorSha256 = "0k7i7j604wqvzjavmcsw7g2x059jkkgrgz1qyvzlqc0y4ws59xkq";
|
|
|
|
};
|
|
|
|
in buildPythonPackage rec {
|
|
|
|
pname = "metasrht";
|
|
|
|
inherit version;
|
|
|
|
|
2019-01-22 02:01:52 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.sr.ht/~sircmpwn/meta.sr.ht";
|
|
|
|
rev = version;
|
2020-10-11 14:43:38 +01:00
|
|
|
sha256 = "0c9y1hzx3dj0awxrhkzrcsmy6q9fqm6v6dbp9y1ria3v47xa3nv7";
|
2019-01-22 02:01:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = srht.nativeBuildInputs;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pgpy
|
|
|
|
srht
|
|
|
|
redis
|
|
|
|
bcrypt
|
|
|
|
qrcode
|
|
|
|
stripe
|
|
|
|
zxcvbn
|
|
|
|
alembic
|
|
|
|
pystache
|
|
|
|
sshpubkeys
|
|
|
|
weasyprint
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export PKGVER=${version}
|
|
|
|
'';
|
|
|
|
|
2020-06-23 01:18:52 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ${buildAPI "${src}/api"}/bin/api $out/bin/metasrht-api
|
|
|
|
'';
|
|
|
|
|
2021-01-03 05:36:55 +00:00
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://git.sr.ht/~sircmpwn/meta.sr.ht";
|
2019-01-22 02:01:52 +00:00
|
|
|
description = "Account management service for the sr.ht network";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
maintainers = with maintainers; [ eadwu ];
|
|
|
|
};
|
|
|
|
}
|