1{ lib
2, fetchFromSourcehut
3, buildPythonPackage
4, srht
5, pyyaml
6, python
7}:
8
9buildPythonPackage rec {
10 pname = "pastesrht";
11 version = "0.12.1";
12
13 src = fetchFromSourcehut {
14 owner = "~sircmpwn";
15 repo = "paste.sr.ht";
16 rev = version;
17 sha256 = "sha256-QQhd2LeH9BLmlHilhsv+9fZ+RPNmEMSmOpFA3dsMBFc=";
18 };
19
20 nativeBuildInputs = srht.nativeBuildInputs;
21
22 propagatedBuildInputs = [
23 srht
24 pyyaml
25 ];
26
27 preBuild = ''
28 export PKGVER=${version}
29 export SRHT_PATH=${srht}/${python.sitePackages}/srht
30 '';
31
32 meta = with lib; {
33 homepage = "https://git.sr.ht/~sircmpwn/paste.sr.ht";
34 description = "Ad-hoc text file hosting service for the sr.ht network";
35 license = licenses.agpl3;
36 maintainers = with maintainers; [ eadwu ];
37 };
38}