2023-01-02 01:18:49 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-04-28 22:12:49 +00:00
|
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
2023-01-02 01:18:49 +00:00
|
|
|
|
|
|
|
maunium-stickerpicker = {
|
|
|
|
url = "github:maunium/stickerpicker";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, maunium-stickerpicker }: let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
fetchers = pkgs.callPackage ./fetchers.nix { };
|
2024-04-28 22:12:49 +00:00
|
|
|
downloadStickers = pkgs.callPackage ./downloadStickers.nix {
|
2023-01-02 01:18:49 +00:00
|
|
|
inherit maunium-stickerpicker fetchers;
|
|
|
|
inherit (self.packages.${system}) stickerpicker-tools;
|
|
|
|
};
|
|
|
|
in {
|
2024-04-28 22:12:49 +00:00
|
|
|
inherit downloadStickers;
|
2023-01-02 01:18:49 +00:00
|
|
|
|
2024-04-28 22:12:49 +00:00
|
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
|
|
name = "python-venv";
|
|
|
|
|
|
|
|
venvDir = "./.venv";
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pkgs.python3Packages.python
|
|
|
|
pkgs.python3Packages.venvShellHook
|
|
|
|
self.packages.${system}.stickerpicker-tools
|
|
|
|
self.packages.${system}.sigstickers
|
|
|
|
];
|
|
|
|
|
|
|
|
postVenvCreation = ''
|
|
|
|
unset SOURCE_DATE_EPOCH
|
|
|
|
pip install -r requirements.txt
|
|
|
|
'';
|
|
|
|
|
|
|
|
postShellHook = ''
|
|
|
|
# allow pip to install wheels
|
|
|
|
unset SOURCE_DATE_EPOCH
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
packages.${system} =
|
|
|
|
let
|
|
|
|
signalstickers-client = (pkgs.python3Packages.callPackage ./python/signalstickers-client.nix {});
|
|
|
|
in
|
|
|
|
{
|
2023-01-02 01:18:49 +00:00
|
|
|
default = self.packages.${system}.stickerpicker-tools;
|
2024-04-28 22:12:49 +00:00
|
|
|
sigstickers = (pkgs.python3Packages.callPackage ./python/sigstickers.nix { inherit signalstickers-client; });
|
|
|
|
|
|
|
|
pub-solar-stickers = downloadStickers {
|
|
|
|
homeserver = "https://matrix.pub.solar";
|
|
|
|
userId = "@hakkonaut:pub.solar";
|
|
|
|
sha256 = "sha256-e5KNPhtrETzgcJxbVZtlWwBXK3RlNKXCZPPZ5Zk46ok=";
|
|
|
|
packs = [
|
|
|
|
{
|
|
|
|
type = "chatsticker";
|
|
|
|
name = "donald-and-friends";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
type = "chatsticker";
|
|
|
|
name = "heartwarming-cat-world";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
type = "chatsticker";
|
|
|
|
name = "kawaii-potato-1";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-01-02 01:18:49 +00:00
|
|
|
stickerpicker-tools = pkgs.python3Packages.buildPythonPackage {
|
|
|
|
name = "stickerpicker-tools";
|
|
|
|
src = maunium-stickerpicker;
|
|
|
|
|
|
|
|
propagatedBuildInputs = with pkgs.python3Packages; [
|
|
|
|
aiohttp
|
|
|
|
yarl
|
|
|
|
pillow
|
|
|
|
telethon
|
|
|
|
cryptg
|
|
|
|
python-magic
|
|
|
|
pkgs.cacert
|
|
|
|
];
|
|
|
|
doCheck = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|