Comments (6)
Oh god, I pulled it off! I've cross-compiled a proot that works!
Everybody with even a bit of Nix knowledge is welcome to my proot.nix to fix my sloppy cross-compiling (seriously, I've cut a lot of corners on that way, like, all of them).
Everybody with aarch64 devices is kindly asked to wipe+reinstall (or substitute proot) and go for another hunt for the dreaded bus error.
from nix-on-droid.
it may be useful: NixOS/nixpkgs@52566c3 (not yet merged)
from nix-on-droid.
Mindlessly tried building
pkgsCross.aarch64-multiplatform.pkgsStatic.proot
.overrideAttrs (oa: {
version = "2019-03-12";
src = pkgs.fetchFromGitHub {
repo = "proot";
owner = "termux";
rev = "09568e21ff9fee7a6907be34a2d0fde3bacca7eb";
sha256 = "1091si4i07349y7x7sx1r904gg3c9a3m39xkv24fakjlirpi3lpy";
};
makeFlags = [ "-Csrc CFLAGS=-D__ANDROID__" ];
}))
.override {
enablePython = false;
)
from that checkout, got a proot
that dies with a Bus Error on a very early mkdir
.
from nix-on-droid.
Hmm... it's possible that the proot fork only works with bionic? That gets trickier because we don't have a good way to cross execute android linker. Something like this should work:
let
pkgs = import <nixpkgs> {
crossSystem = (import <nixpkgs/lib>).systems.examples.aarch64-multiplatform-musl;
crossOverlays = [ (import <nixpkgs/pkgs/top-level/static.nix>) ];
};
proot = pkgs.proot.override { enablePython = false; };
in pkgs.runCommand "test" {} ''
${pkgs.stdenv.hostPlatform.emulator pkgs.buildPackages} ${proot}/bin/proot --version
''
but there's obviously some things specific to android that could be causing the bus error.
from nix-on-droid.
Interesting, maybe I do need bionic.
Did I understand your suggestion correctly: build proot
statically, but use aarch64-android-prebuilt
(and not aarch64-multiplatform-musl
like in your example) to get it statically linked against bionic?
from nix-on-droid.
Yeah, Musl should work with Android fine after all it is just linux. But it's definitely possible something is causing an issue.
from nix-on-droid.
Related Issues (20)
- x
- Android security killing nix process HOT 4
- "Environment.pathsToLink does not exist" error. HOT 4
- Re packed emacs that can be used with nix-on-droid HOT 1
- Docs generation uses 23.05 nixpkgs HOT 1
- Insecure packages HOT 2
- [App] Merging features from Termux-Monet HOT 1
- Replacing xdg-open with termux-open
- Changing hostname (for flakes) HOT 2
- How to run docker daemon? HOT 1
- Mosh DNS not working HOT 1
- Cannot run Shizuku generated rish HOT 3
- Option for Shizuku
- How can i install it in terminal of nix?I use the original apk in the site,which size is 7.2m not 7.4 HOT 1
- Are there x86_64 bootstrap tars availible? HOT 3
- Git support HOT 5
- Somehow I got git to work but everytime I use git push it asks for pat token and username someway to bypass HOT 12
- nix command HOT 2
- um, what is difference between nix-env and nix configuration file HOT 1
- can't set up font HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix-on-droid.