{ inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; 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 { }; downloadStickers = pkgs.callPackage ./downloadStickers.nix { inherit maunium-stickerpicker fetchers; inherit (self.packages.${system}) stickerpicker-tools; }; in { inherit downloadStickers; 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 { default = self.packages.${system}.stickerpicker-tools; 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"; } ]; }; 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; }; }; }; }