NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.39k stars 14.34k forks source link

Package request: easytether #327996

Open L1Z3 opened 4 months ago

L1Z3 commented 4 months ago

Project description Driver for the EasyTether Android app, which allows sharing an internet connection from Android to PC without additional tethering fees.

Metadata

I tried my hand at packaging it myself, but I am new to Nix and so could not get it working. Upon trying to run any of the binaries, it prints _easytether: unknown and fails to run. Below is my attempt to package it if anyone wants to build upon it.

First pass packaging attempt ```nix { stdenv, lib, fetchzip, autoPatchelfHook, openssl_1_1, bluez, }: stdenv.mkDerivation rec { pname = "easytether"; version = "0.8.9"; src = fetchzip { url = "http://www.mobile-stream.com/beta/arch/${pname}-${version}-1-x86_64.pkg.tar.xz"; sha256 = "sha256-3dL5tNxa1hou0SunXOcf0Wkh//hNfzbuI2Dnmk/ibns="; stripRoot = false; }; nativeBuildInputs = [ autoPatchelfHook ]; buildInputs = [ openssl_1_1 bluez ]; runtimeInputs = [openssl_1_1]; installPhase = '' runHook preInstall mkdir -p "$out/bin" mkdir -p "$out/lib" install -m755 -D usr/bin/${pname}-usb $out/bin/${pname}-usb install -m755 -D usr/bin/${pname}-bluetooth $out/bin/${pname}-bluetooth install -m755 -D usr/bin/${pname}-local $out/bin/${pname}-local cp -r usr/lib/* "$out/lib" runHook postInstall ''; extraInstallCommands = '' install -m 444 \ -D usr/lib/99-easytether-usb.rules \ -t $out/lib/udev/rules.d ''; meta = with lib; { description = "Program to share internet connection from Android to PC"; homepage = "http://www.mobile-stream.com/easytether"; # license = with licenses; [ ... ]; # platforms = platforms.linux; # maintainers = with maintainers; [ ... ]; }; } ```

Add a :+1: reaction to issues you find important.

V3ntus commented 3 months ago

Also interested in this. Did you test this on x86_64? Have you ran ltrace/strace to debug?

hackadelic commented 3 months ago

also highly interested in this too am only on x86_64 tho