drop i686 support without simplifying code

This commit is contained in:
Alexander Sosedkin 2021-12-15 21:15:25 +01:00
parent c53afdbcbb
commit 7aeb529aab
8 changed files with 13 additions and 15 deletions

View file

@ -11,6 +11,7 @@
## Removed Options ## Removed Options
* The `system.workaround.make-posix-spawn.enable` has been removed. * The `system.workaround.make-posix-spawn.enable` has been removed.
* i686 support has been removed.
## Release 21.05 ## Release 21.05

View file

@ -26,17 +26,18 @@ This repository contains:
on the device. on the device.
It is only tested with aarch64 (64-bit ARM devices). It is only tested with aarch64 (64-bit ARM devices).
It may also support x86 devices, but the developers don't own one It also used to compile for i686 devices, but the developers don't own any
and nobody has reported whether it actually works or not. 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 Sorry, it would not work on 32-bit ARM devices
and it's not an easy feat to pull off. and it's not an easy feat to pull off.
## Try it out ## Try it out
Prebuilt stuff resides at https://nix-on-droid.unboiled.info [Install it from F-Droid](https://f-droid.org/packages/com.termux.nix),
Install the APK, launch the app, press OK. launch the app, press OK,
expect many hundreds megabytes of downloads to happen.
## `nix-on-droid` and the module system ## `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. If you really want to rebuild it, you can just use Android Studio for that.
The zipball generation is probably what you are after. 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 aarch64 bootstrapZip
nix build -f ./pkgs --argstr arch i686 bootstrapZip
``` ```
Put the zip file from `result` on some HTTP server Put the zip file from `result` on some HTTP server

View file

@ -68,8 +68,7 @@
set -e set -e
arches=${arches:-aarch64 i686} arches=${arches:-aarch64} # whitespace-separated list of architectures to build
# If you only care about aarch64, run as `arches=aarch64 ./build.sh`.
# Create/clear the output directory. # Create/clear the output directory.
mkdir -p out mkdir -p out

2
ci.nix
View file

@ -8,7 +8,7 @@ let
pkgs = import ./pkgs; pkgs = import ./pkgs;
attrs = genAttrs attrs = genAttrs
[ "aarch64" "i686" ] [ "aarch64" ]
(arch: (pkgs { inherit arch; }) // { recurseForDerivations = true; }); (arch: (pkgs { inherit arch; }) // { recurseForDerivations = true; });
isCacheable = p: !(p.preferLocalBuild or false); isCacheable = p: !(p.preferLocalBuild or false);

View file

@ -39,7 +39,7 @@
}; };
} }
// flake-utils.lib.eachSystem // flake-utils.lib.eachSystem
[ "aarch64-linux" "i686-linux" ] [ "aarch64-linux" ]
(system: { (system: {
apps.nix-on-droid = appPerSystem system; apps.nix-on-droid = appPerSystem system;
defaultApp = appPerSystem system; defaultApp = appPerSystem system;

View file

@ -12,8 +12,8 @@ with lib;
build = { build = {
arch = mkOption { arch = mkOption {
type = types.enum [ "aarch64" "i686" ]; type = types.enum [ "aarch64" ];
default = if pkgs.stdenv.isAarch64 then "aarch64" else "i686"; default = "aarch64";
internal = true; internal = true;
description = "Destination arch."; description = "Destination arch.";
}; };

View file

@ -86,7 +86,6 @@ in
let let
crossCompiledPaths = { crossCompiledPaths = {
aarch64 = "/nix/store/dapbgzbpl426jrhz4a2sdl096a8l98ad-proot-termux-aarch64-unknown-linux-android-unstable-2021-11-21"; 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 in
"${crossCompiledPaths.${config.build.arch}}"; "${crossCompiledPaths.${config.build.arch}}";

View file

@ -28,7 +28,6 @@ stdenv.mkDerivation {
let let
archShas = { archShas = {
aarch64 = "1hl6pd02nssscn32mrndif2fxfssxiarrpjvqyjicwnz6yn9mhpq"; aarch64 = "1hl6pd02nssscn32mrndif2fxfssxiarrpjvqyjicwnz6yn9mhpq";
i686 = "0249sbmgmi7cah099wywlqx3ygwpjgl6vcyivqix9rwpnpap417x";
}; };
in in
"${archShas.${config.build.arch}}"; "${archShas.${config.build.arch}}";