nixpkgs/pkgs/applications/version-management/sourcehut/core.nix

98 lines
1.5 KiB
Nix
Raw Normal View History

2021-04-18 03:16:11 +00:00
{ lib
, fetchgit
, fetchNodeModules
, buildPythonPackage
, pgpy
, flask
, bleach
, misaka
, humanize
, html5lib
, markdown
, psycopg2
, pygments
, requests
, sqlalchemy
, cryptography
, beautifulsoup4
, sqlalchemy-utils
, prometheus-client
2021-04-18 03:16:11 +00:00
, celery
, alembic
, importlib-metadata
, mistletoe
, minio
, sassc
, nodejs
, redis
, writeText
}:
buildPythonPackage rec {
pname = "srht";
2021-09-18 17:28:39 +00:00
version = "0.67.25";
src = fetchgit {
url = "https://git.sr.ht/~sircmpwn/core.sr.ht";
rev = version;
2021-09-18 17:28:39 +00:00
sha256 = "sha256-JZXIpNEY1/KUaYh0Vk5j/zVO9JQc2F1RmnZ/5TFN0PI=";
2021-04-18 03:16:11 +00:00
fetchSubmodules = true;
};
node_modules = fetchNodeModules {
src = "${src}/srht";
nodejs = nodejs;
2021-04-18 03:16:11 +00:00
sha256 = "sha256-IWKahdWv3qJ5DNyb1GB9JWYkZxghn6wzZe68clYXij8=";
};
patches = [
./disable-npm-install.patch
];
nativeBuildInputs = [
sassc
nodejs
];
propagatedBuildInputs = [
pgpy
flask
bleach
2021-04-18 03:16:11 +00:00
misaka
humanize
html5lib
markdown
psycopg2
pygments
requests
mistletoe
sqlalchemy
2019-12-30 01:03:28 +00:00
cryptography
beautifulsoup4
sqlalchemy-utils
prometheus-client
# Unofficial runtime dependencies?
celery
alembic
2019-11-04 02:19:05 +00:00
importlib-metadata
2021-04-18 03:16:11 +00:00
minio
redis
];
PKGVER = version;
preBuild = ''
cp -r ${node_modules} srht/node_modules
'';
2019-12-30 01:03:28 +00:00
dontUseSetuptoolsCheck = true;
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/srht";
description = "Core modules for sr.ht";
license = licenses.bsd3;
maintainers = with maintainers; [ eadwu ];
};
}