2019-01-22 02:01:52 +00:00
|
|
|
{ stdenv, fetchgit, fetchNodeModules, buildPythonPackage
|
|
|
|
, pgpy, flask, bleach, misaka, humanize, markdown, psycopg2, pygments, requests
|
|
|
|
, sqlalchemy, flask_login, beautifulsoup4, sqlalchemy-utils, celery, alembic
|
2019-10-02 15:12:58 +00:00
|
|
|
, sassc, nodejs
|
2019-01-22 02:01:52 +00:00
|
|
|
, writeText }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "srht";
|
2019-10-21 01:49:40 +00:00
|
|
|
version = "0.54.3";
|
2019-01-22 02:01:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.sr.ht/~sircmpwn/core.sr.ht";
|
|
|
|
rev = version;
|
2019-10-21 01:49:40 +00:00
|
|
|
sha256 = "1f4srhp5g6652anifs1vyijzi2v23l2rnfpf3x96j9r8rdap42rq";
|
2019-01-22 02:01:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
node_modules = fetchNodeModules {
|
|
|
|
src = "${src}/srht";
|
2019-10-02 15:12:58 +00:00
|
|
|
nodejs = nodejs;
|
2019-01-22 02:01:52 +00:00
|
|
|
sha256 = "0axl50swhcw8llq8z2icwr4nkr5qsw2riih0a040f9wx4xiw4p6p";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./disable-npm-install.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
sassc
|
2019-10-02 15:12:58 +00:00
|
|
|
nodejs
|
2019-01-22 02:01:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pgpy
|
|
|
|
flask
|
|
|
|
bleach
|
|
|
|
misaka
|
|
|
|
humanize
|
|
|
|
markdown
|
|
|
|
psycopg2
|
|
|
|
pygments
|
|
|
|
requests
|
|
|
|
sqlalchemy
|
|
|
|
flask_login
|
|
|
|
beautifulsoup4
|
|
|
|
sqlalchemy-utils
|
|
|
|
|
|
|
|
# Unofficial runtime dependencies?
|
|
|
|
celery
|
|
|
|
alembic
|
|
|
|
];
|
|
|
|
|
|
|
|
PKGVER = version;
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
cp -r ${node_modules} srht/node_modules
|
|
|
|
'';
|
|
|
|
|
|
|
|
preCheck = let
|
|
|
|
config = writeText "config.ini" ''
|
|
|
|
[webhooks]
|
|
|
|
private-key=K6JupPpnr0HnBjelKTQUSm3Ro9SgzEA2T2Zv472OvzI=
|
|
|
|
|
|
|
|
[meta.sr.ht]
|
|
|
|
origin=http://meta.sr.ht.local
|
|
|
|
'';
|
|
|
|
in ''
|
2019-10-05 15:00:49 +00:00
|
|
|
cp -f ${config} config.ini
|
2019-01-22 02:01:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://git.sr.ht/~sircmpwn/srht;
|
|
|
|
description = "Core modules for sr.ht";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ eadwu ];
|
|
|
|
};
|
|
|
|
}
|