From 7aeb529aab336627ad1d6d29e258cd3d323d66af Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Wed, 15 Dec 2021 21:15:25 +0100 Subject: [PATCH] drop i686 support without simplifying code --- CHANGELOG.md | 1 + README.md | 14 +++++++------- build.sh | 3 +-- ci.nix | 2 +- flake.nix | 2 +- modules/build/config.nix | 4 ++-- modules/environment/login/default.nix | 1 - pkgs/nix-directory.nix | 1 - 8 files changed, 13 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4c3f5f..7f0a049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ## Removed Options * The `system.workaround.make-posix-spawn.enable` has been removed. +* i686 support has been removed. ## Release 21.05 diff --git a/README.md b/README.md index ba85490..2ad28d1 100644 --- a/README.md +++ b/README.md @@ -26,17 +26,18 @@ This repository contains: on the device. It is only tested with aarch64 (64-bit ARM devices). -It may also support x86 devices, but the developers don't own one -and nobody has reported whether it actually works or not. - +It also used to compile for i686 devices, but the developers don't own any +and nobody has reported whether it actually worked or not, +so it's no longer built unless a user shows up. Sorry, it would not work on 32-bit ARM devices and it's not an easy feat to pull off. ## Try it out -Prebuilt stuff resides at https://nix-on-droid.unboiled.info -Install the APK, launch the app, press OK. +[Install it from F-Droid](https://f-droid.org/packages/com.termux.nix), +launch the app, press OK, +expect many hundreds megabytes of downloads to happen. ## `nix-on-droid` and the module system @@ -123,10 +124,9 @@ is probably not interesting for you, just download and use a prebuilt one. If you really want to rebuild it, you can just use Android Studio for that. The zipball generation is probably what you are after. -Get an x86_64 computer with Nix. Run one of the following: +Get an x86_64 computer with Nix. Run ``` nix build -f ./pkgs --argstr arch aarch64 bootstrapZip -nix build -f ./pkgs --argstr arch i686 bootstrapZip ``` Put the zip file from `result` on some HTTP server diff --git a/build.sh b/build.sh index edab9ea..8359774 100755 --- a/build.sh +++ b/build.sh @@ -68,8 +68,7 @@ set -e -arches=${arches:-aarch64 i686} -# If you only care about aarch64, run as `arches=aarch64 ./build.sh`. +arches=${arches:-aarch64} # whitespace-separated list of architectures to build # Create/clear the output directory. mkdir -p out diff --git a/ci.nix b/ci.nix index 6274003..faae099 100644 --- a/ci.nix +++ b/ci.nix @@ -8,7 +8,7 @@ let pkgs = import ./pkgs; attrs = genAttrs - [ "aarch64" "i686" ] + [ "aarch64" ] (arch: (pkgs { inherit arch; }) // { recurseForDerivations = true; }); isCacheable = p: !(p.preferLocalBuild or false); diff --git a/flake.nix b/flake.nix index 3c5fe71..2a1f91c 100644 --- a/flake.nix +++ b/flake.nix @@ -39,7 +39,7 @@ }; } // flake-utils.lib.eachSystem - [ "aarch64-linux" "i686-linux" ] + [ "aarch64-linux" ] (system: { apps.nix-on-droid = appPerSystem system; defaultApp = appPerSystem system; diff --git a/modules/build/config.nix b/modules/build/config.nix index 092c221..e0a1e8e 100644 --- a/modules/build/config.nix +++ b/modules/build/config.nix @@ -12,8 +12,8 @@ with lib; build = { arch = mkOption { - type = types.enum [ "aarch64" "i686" ]; - default = if pkgs.stdenv.isAarch64 then "aarch64" else "i686"; + type = types.enum [ "aarch64" ]; + default = "aarch64"; internal = true; description = "Destination arch."; }; diff --git a/modules/environment/login/default.nix b/modules/environment/login/default.nix index c6ad849..daaabb9 100644 --- a/modules/environment/login/default.nix +++ b/modules/environment/login/default.nix @@ -86,7 +86,6 @@ in let crossCompiledPaths = { aarch64 = "/nix/store/dapbgzbpl426jrhz4a2sdl096a8l98ad-proot-termux-aarch64-unknown-linux-android-unstable-2021-11-21"; - i686 = "/nix/store/6nnjhrh8pgyxjnya72irahxpkbnxai1w-proot-termux-i686-unknown-linux-android-unstable-2021-11-21"; }; in "${crossCompiledPaths.${config.build.arch}}"; diff --git a/pkgs/nix-directory.nix b/pkgs/nix-directory.nix index c9261f5..8b53781 100644 --- a/pkgs/nix-directory.nix +++ b/pkgs/nix-directory.nix @@ -28,7 +28,6 @@ stdenv.mkDerivation { let archShas = { aarch64 = "1hl6pd02nssscn32mrndif2fxfssxiarrpjvqyjicwnz6yn9mhpq"; - i686 = "0249sbmgmi7cah099wywlqx3ygwpjgl6vcyivqix9rwpnpap417x"; }; in "${archShas.${config.build.arch}}";