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