1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/version-management/sourcehut/meta.nix

58 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchgit, buildPythonPackage
, python
2020-06-23 01:18:52 +01:00
, buildGoModule
, pgpy, srht, redis, bcrypt, qrcode, stripe, zxcvbn, alembic, pystache
, sshpubkeys, weasyprint }:
2020-06-23 01:18:52 +01:00
let
2020-06-23 00:50:40 +01:00
version = "0.50.2";
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;
src = fetchgit {
url = "https://git.sr.ht/~sircmpwn/meta.sr.ht";
rev = version;
2020-06-23 00:50:40 +01:00
sha256 = "utS/HMFtHPAP1QRYd4WAFApyBPRY5UD72ANmC/SU93c=";
};
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
'';
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 ];
};
}