From 393ccdb4dd751f21573f2028d399626b42a29c4e Mon Sep 17 00:00:00 2001 From: reidlab Date: Sat, 30 May 2026 17:21:22 -0700 Subject: [PATCH] iLoader instead of Althea --- modules/hardware/ios.nix | 4 +- packages/althea/default.nix | 114 ----------------------------------- packages/iloader/default.nix | 57 ++++++++++++++++++ 3 files changed, 59 insertions(+), 116 deletions(-) delete mode 100644 packages/althea/default.nix create mode 100644 packages/iloader/default.nix diff --git a/modules/hardware/ios.nix b/modules/hardware/ios.nix index b23c1e4..273d9e3 100644 --- a/modules/hardware/ios.nix +++ b/modules/hardware/ios.nix @@ -6,7 +6,7 @@ let in { options.modules.hardware.ios = { enable = mkEnableOption "Enable tethering with iOS devices"; - sideload = mkEnableOption "Additionally, enable sideloading through Althea"; + sideload = mkEnableOption "Additionally, enable sideloading through iLoader"; }; config = mkIf cfg.enable { @@ -18,6 +18,6 @@ in { ifuse ]; - hm.home.packages = optional cfg.sideload pkgs.my.althea; + hm.home.packages = optional cfg.sideload pkgs.my.iloader; }; } diff --git a/packages/althea/default.nix b/packages/althea/default.nix deleted file mode 100644 index c7a7a2a..0000000 --- a/packages/althea/default.nix +++ /dev/null @@ -1,114 +0,0 @@ -# thank GOD someone packaged this -# shoutout!!! -# https://github.com/Nailington/dots/blob/f7f55aced39c6496fe01dc2867a51316e09eb59c/pkgs/althea/default.nix - -{ lib -, stdenvNoCC -, fetchFromGitHub -, python3 -, gtk3 -, libhandy -, libappindicator-gtk3 -, libnotify -, usbmuxd -, libimobiledevice -, avahi -, wrapGAppsHook3 -, gobject-introspection -, gdk-pixbuf -, makeDesktopItem -, copyDesktopItems -, steam-run -}: - -let - pythonEnv = python3.withPackages (ps: with ps; [ - requests - keyring - pygobject3 - packaging - ]); - - desktopItem = makeDesktopItem { - name = "althea"; - exec = "althea"; - icon = "althea"; - desktopName = "althea"; - comment = "Sideload applications to iOS/iPadOS via AltStore"; - categories = [ "Utility" ]; - }; -in - -stdenvNoCC.mkDerivation rec { - pname = "althea"; - version = "0.5.0-unstable-2026-02-07"; - - src = fetchFromGitHub { - owner = "vyvir"; - repo = "althea"; - rev = "506a8a757221bca771bab67c7f5b3eec74ec4486"; - hash = "sha256-4N5z9t/Z1KmAB4TDkuOWwLSvENrrcw0nFU+19o54sqY="; - }; - - nativeBuildInputs = [ - wrapGAppsHook3 - gobject-introspection - copyDesktopItems - ]; - - buildInputs = [ - pythonEnv - gtk3 - libhandy - libappindicator-gtk3 - libnotify - gdk-pixbuf - usbmuxd - libimobiledevice - avahi - ]; - - dontBuild = true; - dontConfigure = true; - - desktopItems = [ desktopItem ]; - - installPhase = '' - runHook preInstall - - # Install app files - mkdir -p $out/lib/althea/resources - cp main.py $out/lib/althea/ - cp -r resources/* $out/lib/althea/resources/ - - # Install icon - mkdir -p $out/share/icons/hicolor/256x256/apps - cp resources/3.png $out/share/icons/hicolor/256x256/apps/althea.png - - # Patch main.py: replace direct anisette-server invocation with steam-run wrapper - # The downloaded binary is a generic Linux ELF that needs an FHS environment on NixOS - substituteInPlace $out/lib/althea/main.py \ - --replace-warn \ - 'subprocess.run(f"{(altheapath)}/anisette-server -n 127.0.0.1 -p 6969 &", shell=True)' \ - 'subprocess.run(f"${steam-run}/bin/steam-run {(altheapath)}/anisette-server -n 127.0.0.1 -p 6969 &", shell=True)' - - # Create launcher - mkdir -p $out/bin - cat > $out/bin/althea << EOF -#!/bin/sh -cd $out/lib/althea -exec ${pythonEnv}/bin/python3 $out/lib/althea/main.py "\$@" -EOF - chmod +x $out/bin/althea - - runHook postInstall - ''; - - meta = with lib; { - description = "GUI for AltServer-Linux to sideload apps onto iOS/iPadOS"; - homepage = "https://github.com/vyvir/althea"; - license = licenses.agpl3Only; - platforms = [ "x86_64-linux" "aarch64-linux" ]; - mainProgram = "althea"; - }; -} diff --git a/packages/iloader/default.nix b/packages/iloader/default.nix new file mode 100644 index 0000000..d1f0fdc --- /dev/null +++ b/packages/iloader/default.nix @@ -0,0 +1,57 @@ +# adapted from an old version of someone elses package +# https://github.com/ern775/custom-nixpkgs/blob/master/pkgs/iloader/package.nix +# ty + +{ + lib, + stdenv, + fetchurl, + dpkg, + autoPatchelfHook, + glib, + gtk3, + wrapGAppsHook3, + webkitgtk_4_1, + gdk-pixbuf, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "iloader"; + version = "2.2.6"; + + src = fetchurl { + url = "https://github.com/nab138/iloader/releases/download/v${finalAttrs.version}/iloader-linux-amd64.deb"; + hash = "sha256-YWoeQjjoqLkaA1oNx2Eg7PwXaenWYKk73CdAKHISlWI="; + }; + + unpackCmd = "dpkg -x $curSrc source"; + + nativeBuildInputs = [ + dpkg + autoPatchelfHook + wrapGAppsHook3 + ]; + + buildInputs = [ + glib + gtk3 + webkitgtk_4_1 + gdk-pixbuf + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + mv usr/share usr/bin $out + + runHook postInstall + ''; + + meta = { + description = "User friendly sideloader"; + homepage = "https://github.com/nab138/iloader"; + license = lib.licenses.mit; + platforms = [ "x86_64-linux" ]; + mainProgram = "iloader"; + }; +})