2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
arrow,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
freetype,
|
|
|
|
glibcLocales,
|
|
|
|
libjpeg,
|
|
|
|
pillow,
|
|
|
|
pocket,
|
|
|
|
pyfiglet,
|
|
|
|
pysocks,
|
|
|
|
python,
|
|
|
|
python-dateutil,
|
|
|
|
requests,
|
|
|
|
twitter,
|
|
|
|
zlib,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rainbowstream";
|
2021-10-08 15:17:17 +00:00
|
|
|
version = "1.5.5";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "orakaro";
|
|
|
|
repo = pname;
|
|
|
|
# Request for tagging, https://github.com/orakaro/rainbowstream/issues/314
|
|
|
|
rev = "96141fac10675e0775d703f65a59c4477a48c57e";
|
|
|
|
sha256 = "0j0qcc428lk9b3l0cr2j418gd6wd5k4160ham2zn2mmdmxn5bldg";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
buildInputs = [
|
|
|
|
freetype
|
|
|
|
glibcLocales
|
|
|
|
libjpeg
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
arrow
|
|
|
|
pillow
|
|
|
|
pocket
|
|
|
|
pyfiglet
|
|
|
|
pysocks
|
|
|
|
python-dateutil
|
|
|
|
requests
|
|
|
|
twitter
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
patches = [ ./image.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
clib=$out/${python.sitePackages}/rainbowstream/image.so
|
|
|
|
substituteInPlace rainbowstream/c_image.py \
|
|
|
|
--replace @CLIB@ $clib
|
|
|
|
sed -i 's/requests.*"/requests"/' setup.py
|
|
|
|
'';
|
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
LC_ALL = "en_US.UTF-8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/lib
|
|
|
|
cc -fPIC -shared -o $clib rainbowstream/image.c
|
|
|
|
for prog in "$out/bin/"*; do
|
|
|
|
wrapProgram "$prog" \
|
|
|
|
--prefix PYTHONPATH : "$PYTHONPATH"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "rainbowstream" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Streaming command-line twitter client";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "rainbowstream";
|
2021-10-08 15:17:17 +00:00
|
|
|
homepage = "https://github.com/orakaro/rainbowstream";
|
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|