2019-01-22 03:01:52 +01:00
|
|
|
{ stdenv, fetchgit, fetchNodeModules, buildPythonPackage
|
2020-04-16 22:48:32 +02:00
|
|
|
, pgpy, flask, bleach, misaka, humanize, html5lib, markdown, psycopg2, pygments
|
|
|
|
, requests, sqlalchemy, cryptography, beautifulsoup4, sqlalchemy-utils, prometheus_client
|
2020-04-16 22:39:55 +02:00
|
|
|
, celery, alembic, importlib-metadata
|
2019-10-02 17:12:58 +02:00
|
|
|
, sassc, nodejs
|
2019-01-22 03:01:52 +01:00
|
|
|
, writeText }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "srht";
|
2020-06-23 01:50:01 +02:00
|
|
|
version = "0.64.0";
|
2019-01-22 03:01:52 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.sr.ht/~sircmpwn/core.sr.ht";
|
|
|
|
rev = version;
|
2020-06-23 01:50:01 +02:00
|
|
|
sha256 = "ubCbDh60zg88LXupWAo2EnqhE5jt0F0L9ikTBebusYQ=";
|
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
|
|
|
|
misaka
|
|
|
|
humanize
|
2020-04-16 22:48:32 +02:00
|
|
|
html5lib
|
2019-01-22 03:01:52 +01:00
|
|
|
markdown
|
|
|
|
psycopg2
|
|
|
|
pygments
|
|
|
|
requests
|
|
|
|
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
|
|
|
|
|
|
|
meta = with stdenv.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 ];
|
|
|
|
};
|
|
|
|
}
|