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