sourcehut.metasrht: 0.51.2 -> 0.53.14

This commit is contained in:
Thomas Bereknyei 2021-04-17 23:11:24 -04:00 committed by tomberek
parent 9b3a109c3e
commit 14d65eaa3c

View file

@ -1,26 +1,42 @@
{ lib, fetchgit, buildPythonPackage
{ lib
, fetchFromSourcehut
, buildPythonPackage
, buildGoModule
, pgpy, srht, redis, bcrypt, qrcode, stripe, zxcvbn, alembic, pystache
, sshpubkeys, weasyprint }:
, pgpy
, srht
, redis
, bcrypt
, qrcode
, stripe
, zxcvbn
, alembic
, pystache
, dnspython
, sshpubkeys
, weasyprint
, prometheus_client
, python
}:
let
version = "0.51.2";
version = "0.53.14";
buildAPI = src: buildGoModule {
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "meta.sr.ht";
rev = version;
sha256 = "sha256-/+r/XLDkcSTW647xPMh5bcJmR2xZNNH74AJ5jemna2k=";
};
buildApi = src: buildGoModule {
inherit src version;
pname = "metasrht-api";
vendorSha256 = "0k7i7j604wqvzjavmcsw7g2x059jkkgrgz1qyvzlqc0y4ws59xkq";
vendorSha256 = "sha256-eZyDrr2VcNMxI++18qUy7LA1Q1YDlWCoRtl00L8lfR4=";
};
in buildPythonPackage rec {
in
buildPythonPackage rec {
pname = "metasrht";
inherit version;
src = fetchgit {
url = "https://git.sr.ht/~sircmpwn/meta.sr.ht";
rev = version;
sha256 = "0c9y1hzx3dj0awxrhkzrcsmy6q9fqm6v6dbp9y1ria3v47xa3nv7";
};
inherit version src;
nativeBuildInputs = srht.nativeBuildInputs;
@ -36,19 +52,20 @@ in buildPythonPackage rec {
pystache
sshpubkeys
weasyprint
prometheus_client
dnspython
];
preBuild = ''
export PKGVER=${version}
export SRHT_PATH=${srht}/${python.sitePackages}/srht
'';
postInstall = ''
mkdir -p $out/bin
cp ${buildAPI "${src}/api"}/bin/api $out/bin/metasrht-api
cp ${buildApi "${src}/api/"}/bin/api $out/bin/metasrht-api
'';
dontUseSetuptoolsCheck = true;
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/meta.sr.ht";
description = "Account management service for the sr.ht network";