maunium-stickerpicker-nix/python/signalstickers-client.nix
teutat3s f19ee88860
refactor: only download stickers with nix,
manually invoke sticker-pack from the devshell to upload stickers to
matrix, to avoid leaking the access token from config.json to the nix
store.

Nixify SigStickers https://github.com/FHPythonUtils/SigStickers and
dependency https://github.com/signalstickers/signalstickers-client to
download Signal stickers
2024-04-29 00:12:49 +02:00

43 lines
877 B
Nix

{
buildPythonPackage,
fetchPypi,
setuptools,
anyio,
cryptography,
httpx,
protobuf,
pytest
}:
buildPythonPackage rec {
pname = "signalstickers-client";
version = "3.3.0";
src = fetchPypi {
pname = "signalstickers-client";
inherit version;
sha256 = "sha256-5be/SdVhCH8lF2Vq2sJpt9R9htGO+wj+Q7Cp8S8NZXo=";
};
propagatedBuildInputs = [
anyio
cryptography
httpx
protobuf
setuptools
];
checkInputs = [
pytest
anyio
httpx
protobuf
];
postPatch = ''
substituteInPlace setup.py \
--replace 'protobuf>=3.13.0,<4.0.0' 'protobuf>=3.13'
substituteInPlace setup.py \
--replace 'cryptography>=3.1.1,<4.0.0' 'cryptography'
substituteInPlace setup.py \
--replace 'httpx>=0.16.1,<=0.24.1' 'httpx'
substituteInPlace setup.py \
--replace 'anyio>=3.0.0,<4.0.0' 'anyio'
'';
}