Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
73 lines
1.6 KiB
Nix
73 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
pkg-config,
|
|
libusb1,
|
|
iproute2,
|
|
net-tools,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "go-ios";
|
|
version = "1.0.182";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "danielpaulus";
|
|
repo = "go-ios";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-GUCZiuW6IDVxVsFZN7QMRt5EFovxjUopC4jQD+/lZv8=";
|
|
};
|
|
|
|
proxyVendor = true;
|
|
vendorHash = "sha256-/aVaTC9lfoXQvhDVQm31HmXBnDYYOv6RH69Nm3I/K7s=";
|
|
|
|
excludedPackages = [
|
|
"restapi"
|
|
];
|
|
|
|
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
|
|
substituteInPlace ncm/linux_commands.go \
|
|
--replace-fail "ip " "${lib.getExe' iproute2 "ip"} "
|
|
|
|
substituteInPlace ios/tunnel/tunnel.go \
|
|
--replace-fail "ifconfig" "${lib.getExe' net-tools "ifconfig"}"
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
libusb1
|
|
];
|
|
|
|
postInstall = ''
|
|
# aligns the binary with what is expected from go-ios
|
|
mv $out/bin/go-ios $out/bin/ios
|
|
'';
|
|
|
|
# skips all the integration tests (requires iOS device) (`-tags=fast`)
|
|
# as well as tests that requires networking
|
|
checkFlags =
|
|
let
|
|
skippedTests = [
|
|
"TestWorksWithoutProxy"
|
|
"TestUsesProxy"
|
|
];
|
|
in
|
|
[ "-tags=fast" ] ++ [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = with lib; {
|
|
description = "Operating system independent implementation of iOS device features";
|
|
homepage = "https://github.com/danielpaulus/go-ios";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ eyjhb ];
|
|
mainProgram = "ios";
|
|
};
|
|
}
|