mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
77 lines
1.5 KiB
Nix
77 lines
1.5 KiB
Nix
{ stdenv, fetchgit, fetchNodeModules, buildPythonPackage
|
|
, pgpy, flask, bleach, misaka, humanize, markdown, psycopg2, pygments, requests
|
|
, sqlalchemy, flask_login, beautifulsoup4, sqlalchemy-utils, celery, alembic
|
|
, sassc, nodejs
|
|
, writeText }:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "srht";
|
|
version = "0.54.4";
|
|
|
|
src = fetchgit {
|
|
url = "https://git.sr.ht/~sircmpwn/core.sr.ht";
|
|
rev = version;
|
|
sha256 = "0flxvn178hqd8ljz89ddis80zfnmzgimv4506w4dg2flbwzywy7z";
|
|
};
|
|
|
|
node_modules = fetchNodeModules {
|
|
src = "${src}/srht";
|
|
nodejs = nodejs;
|
|
sha256 = "0axl50swhcw8llq8z2icwr4nkr5qsw2riih0a040f9wx4xiw4p6p";
|
|
};
|
|
|
|
patches = [
|
|
./disable-npm-install.patch
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
sassc
|
|
nodejs
|
|
];
|
|
|
|
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 ''
|
|
cp -f ${config} config.ini
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = https://git.sr.ht/~sircmpwn/srht;
|
|
description = "Core modules for sr.ht";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ eadwu ];
|
|
};
|
|
}
|