Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / rainbowstream / default.nix
blob5f2f4c5904c5b4450171bd1ffdf07c44f2b6167e
1 { lib
2 , arrow
3 , buildPythonPackage
4 , fetchFromGitHub
5 , freetype
6 , glibcLocales
7 , libjpeg
8 , pillow
9 , pocket
10 , pyfiglet
11 , pysocks
12 , python
13 , python-dateutil
14 , requests
15 , twitter
16 , zlib
19 buildPythonPackage rec {
20   pname = "rainbowstream";
21   version = "1.5.5";
22   format = "setuptools";
24   src = fetchFromGitHub {
25     owner = "orakaro";
26     repo = pname;
27     # Request for tagging, https://github.com/orakaro/rainbowstream/issues/314
28     rev = "96141fac10675e0775d703f65a59c4477a48c57e";
29     sha256 = "0j0qcc428lk9b3l0cr2j418gd6wd5k4160ham2zn2mmdmxn5bldg";
30   };
32   buildInputs = [
33     freetype
34     glibcLocales
35     libjpeg
36     zlib
37   ];
39   propagatedBuildInputs = [
40     arrow
41     pillow
42     pocket
43     pyfiglet
44     pysocks
45     python-dateutil
46     requests
47     twitter
48   ];
50   patches = [ ./image.patch ];
52   postPatch = ''
53     clib=$out/${python.sitePackages}/rainbowstream/image.so
54     substituteInPlace rainbowstream/c_image.py \
55       --replace @CLIB@ $clib
56     sed -i 's/requests.*"/requests"/' setup.py
57   '';
59   LC_ALL = "en_US.UTF-8";
61   postInstall = ''
62     mkdir -p $out/lib
63     cc -fPIC -shared -o $clib rainbowstream/image.c
64     for prog in "$out/bin/"*; do
65       wrapProgram "$prog" \
66         --prefix PYTHONPATH : "$PYTHONPATH"
67     done
68   '';
70   # Project has no tests
71   doCheck = false;
73   pythonImportsCheck = [ "rainbowstream" ];
75   meta = with lib; {
76     description = "Streaming command-line twitter client";
77     mainProgram = "rainbowstream";
78     homepage = "https://github.com/orakaro/rainbowstream";
79     license = licenses.mit;
80     maintainers = with maintainers; [ thoughtpolice ];
81   };