2021-01-15 09:19:50 +00:00
|
|
|
|
{ lib, stdenv, fetchFromGitHub, python, pythonPackages, libxslt, libxml2, makeWrapper }:
|
2013-07-23 21:40:36 +01:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-11-06 18:59:17 +00:00
|
|
|
|
pname = "venus";
|
|
|
|
|
version = "unstable-2011-02-18";
|
2013-07-23 21:40:36 +01:00
|
|
|
|
|
2019-11-06 18:59:17 +00:00
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "rubys";
|
|
|
|
|
repo = "venus";
|
|
|
|
|
rev = "9de21094a8cf565bdfcf75688e121a5ad1f5397b";
|
|
|
|
|
sha256 = "10yyx4jaxxbwhica12aiw119aywghcr7b24gs9lrmafpa6xd3an2";
|
2013-07-23 21:40:36 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
|
substituteInPlace tests/test_spider.py \
|
|
|
|
|
--replace "urllib.urlopen('http://127.0.0.1:%d/' % _PORT).read()" "" \
|
|
|
|
|
--replace "[200,200,200,200,404]" "[200,200,200,404]"
|
|
|
|
|
substituteInPlace planet.py \
|
|
|
|
|
--replace "#!/usr/bin/env python" "#!${python}/bin/python"
|
|
|
|
|
substituteInPlace tests/test_apply.py \
|
2016-04-10 20:51:11 +01:00
|
|
|
|
--replace "'xsltproc" "'${libxslt.bin}/bin/xsltproc"
|
2013-07-23 21:40:36 +01:00
|
|
|
|
substituteInPlace planet/shell/xslt.py \
|
2016-04-10 20:51:11 +01:00
|
|
|
|
--replace "'xsltproc" "'${libxslt.bin}/bin/xsltproc"
|
2013-07-23 21:40:36 +01:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
checkPhase = "python runtests.py";
|
|
|
|
|
|
2016-10-06 19:34:35 +01:00
|
|
|
|
buildInputs = [ python libxslt
|
2013-07-23 21:40:36 +01:00
|
|
|
|
libxml2 pythonPackages.genshi pythonPackages.lxml makeWrapper ];
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
cp -R ./* $out/
|
|
|
|
|
ln -s $out/planet.py $out/bin/venus-planet
|
|
|
|
|
wrapProgram $out/planet.py \
|
|
|
|
|
--prefix PYTHONPATH : $PYTHONPATH:${pythonPackages.lxml}/lib/${python.libPrefix}/site-packages:${pythonPackages.genshi}/lib/${python.libPrefix}/site-packages
|
|
|
|
|
python runtests.py
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = {
|
2013-10-06 10:49:53 +01:00
|
|
|
|
description = "News feed reader";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
Planet Venus is an awesome ‘river of news’ feed reader. It downloads news
|
|
|
|
|
feeds published by web sites and aggregates their content together into a
|
|
|
|
|
single combined feed, latest news first.
|
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
|
homepage = "http://intertwingly.net/code/venus/docs/index.html";
|
2021-01-15 09:19:50 +00:00
|
|
|
|
license = lib.licenses.psfl;
|
|
|
|
|
platforms = lib.platforms.all;
|
2019-07-03 10:27:39 +01:00
|
|
|
|
maintainers = [];
|
2013-07-23 21:40:36 +01:00
|
|
|
|
};
|
|
|
|
|
}
|