sourcehut.*: fix setuptools validation
This commit is contained in:
parent
2c16a2498c
commit
c4ce930c23
@ -55,7 +55,6 @@ buildPythonPackage rec {
|
|||||||
cp -r ${node_modules} srht/node_modules
|
cp -r ${node_modules} srht/node_modules
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# No actual? tests but seems like it needs this anyway
|
|
||||||
preCheck = let
|
preCheck = let
|
||||||
config = writeText "config.ini" ''
|
config = writeText "config.ini" ''
|
||||||
[webhooks]
|
[webhooks]
|
||||||
@ -65,10 +64,7 @@ buildPythonPackage rec {
|
|||||||
origin=http://meta.sr.ht.local
|
origin=http://meta.sr.ht.local
|
||||||
'';
|
'';
|
||||||
in ''
|
in ''
|
||||||
# Validation needs config option(s)
|
cp -f ${config} config.ini
|
||||||
# webhooks <- ( private-key )
|
|
||||||
# meta.sr.ht <- ( origin )
|
|
||||||
cp ${config} config.ini
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -40,7 +40,6 @@ in buildPythonPackage rec {
|
|||||||
export SRHT_PATH=${srht}/${python.sitePackages}/srht
|
export SRHT_PATH=${srht}/${python.sitePackages}/srht
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# TODO: Remove redundant mkdir?
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp ${buildDispatcher "${src}/gitsrht-dispatch"}/bin/gitsrht-dispatch $out/bin/gitsrht-dispatch
|
cp ${buildDispatcher "${src}/gitsrht-dispatch"}/bin/gitsrht-dispatch $out/bin/gitsrht-dispatch
|
||||||
|
@ -39,11 +39,7 @@ buildPythonPackage rec {
|
|||||||
origin=http://meta.sr.ht.local
|
origin=http://meta.sr.ht.local
|
||||||
'';
|
'';
|
||||||
in ''
|
in ''
|
||||||
# Validation needs config option(s)
|
cp -f ${config} config.ini
|
||||||
# webhooks <- ( private-key )
|
|
||||||
# meta.sr.ht <- ( origin )
|
|
||||||
# builds.sr.ht <- ( origin, oauth-client-id )
|
|
||||||
cp ${config} config.ini
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{ stdenv, fetchgit, buildPythonPackage
|
{ stdenv, fetchgit, buildPythonPackage
|
||||||
, python
|
, python
|
||||||
, srht, redis, alembic, pystache }:
|
, srht, redis, alembic, pystache
|
||||||
|
, pytest, factory_boy, writeText }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "todosrht";
|
pname = "todosrht";
|
||||||
@ -30,8 +31,33 @@ buildPythonPackage rec {
|
|||||||
export SRHT_PATH=${srht}/${python.sitePackages}/srht
|
export SRHT_PATH=${srht}/${python.sitePackages}/srht
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Tests require a network connection
|
checkInputs = [
|
||||||
doCheck = false;
|
pytest
|
||||||
|
factory_boy
|
||||||
|
];
|
||||||
|
|
||||||
|
installCheckPhase = let
|
||||||
|
config = writeText "config.ini" ''
|
||||||
|
[webhooks]
|
||||||
|
private-key=K6JupPpnr0HnBjelKTQUSm3Ro9SgzEA2T2Zv472OvzI=
|
||||||
|
|
||||||
|
[todo.sr.ht]
|
||||||
|
origin=http://todo.sr.ht.local
|
||||||
|
oauth-client-id=
|
||||||
|
oauth-client-secret=
|
||||||
|
|
||||||
|
[todo.sr.ht::mail]
|
||||||
|
posting-domain=
|
||||||
|
|
||||||
|
[meta.sr.ht]
|
||||||
|
origin=http://meta.sr.ht.local
|
||||||
|
'';
|
||||||
|
in ''
|
||||||
|
cp -f ${config} config.ini
|
||||||
|
|
||||||
|
# pytest tests fail
|
||||||
|
# pytest tests/
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://todo.sr.ht/~sircmpwn/todo.sr.ht;
|
homepage = https://todo.sr.ht/~sircmpwn/todo.sr.ht;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user