2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchgit, fetchNodeModules, buildPythonPackage
|
2020-09-06 00:27:47 +01:00
|
|
|
, pgpy, flask, bleach, humanize, html5lib, markdown, psycopg2, pygments
|
2020-04-16 21:48:32 +01:00
|
|
|
, requests, sqlalchemy, cryptography, beautifulsoup4, sqlalchemy-utils, prometheus_client
|
2020-09-06 00:27:47 +01:00
|
|
|
, celery, alembic, importlib-metadata, mistletoe
|
2019-10-02 16:12:58 +01:00
|
|
|
, sassc, nodejs
|
2019-01-22 02:01:52 +00:00
|
|
|
, writeText }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "srht";
|
2020-10-11 14:42:58 +01:00
|
|
|
version = "0.65.2";
|
2019-01-22 02:01:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.sr.ht/~sircmpwn/core.sr.ht";
|
|
|
|
rev = version;
|
2020-10-11 14:42:58 +01:00
|
|
|
sha256 = "1jfp1vc8mink3c7ccacgnqx8hpkck82ipxiql38q1y9l8xcsah03";
|
2019-01-22 02:01:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
node_modules = fetchNodeModules {
|
|
|
|
src = "${src}/srht";
|
2019-10-02 16:12:58 +01:00
|
|
|
nodejs = nodejs;
|
2019-12-30 15:19:56 +00:00
|
|
|
sha256 = "0gwa2xb75g7fclrsr7r131kj8ri5gmhd96yw1iws5pmgsn2rlqi1";
|
2019-01-22 02:01:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./disable-npm-install.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
sassc
|
2019-10-02 16:12:58 +01:00
|
|
|
nodejs
|
2019-01-22 02:01:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pgpy
|
|
|
|
flask
|
|
|
|
bleach
|
|
|
|
humanize
|
2020-04-16 21:48:32 +01:00
|
|
|
html5lib
|
2019-01-22 02:01:52 +00:00
|
|
|
markdown
|
|
|
|
psycopg2
|
|
|
|
pygments
|
|
|
|
requests
|
2020-09-06 00:27:47 +01:00
|
|
|
mistletoe
|
2019-01-22 02:01:52 +00:00
|
|
|
sqlalchemy
|
2019-12-30 01:03:28 +00:00
|
|
|
cryptography
|
2019-01-22 02:01:52 +00:00
|
|
|
beautifulsoup4
|
|
|
|
sqlalchemy-utils
|
2020-04-16 21:39:55 +01:00
|
|
|
prometheus_client
|
2019-01-22 02:01:52 +00:00
|
|
|
|
|
|
|
# Unofficial runtime dependencies?
|
|
|
|
celery
|
|
|
|
alembic
|
2019-11-04 02:19:05 +00:00
|
|
|
importlib-metadata
|
2019-01-22 02:01:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
PKGVER = version;
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
cp -r ${node_modules} srht/node_modules
|
|
|
|
'';
|
|
|
|
|
2019-12-30 01:03:28 +00:00
|
|
|
dontUseSetuptoolsCheck = true;
|
2019-01-22 02:01:52 +00:00
|
|
|
|
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/srht";
|
2019-01-22 02:01:52 +00:00
|
|
|
description = "Core modules for sr.ht";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ eadwu ];
|
|
|
|
};
|
|
|
|
}
|