I’m trying to build a simple binary using an ancient Android library / development SDK from what used to be IVONA text-to-speech before it was bought out by Amazon and I’ve run into a couple of issues. For one, I loaded nixpkgs in nix repl
to see what platforms pkgsCross
supported and I saw that there was arm-android-prebuilt
but when I use this for crossSystem
I get an error that says:
error: Target specification with 3 components is ambiguous
So I switched to using armv7l-hf-multiplatform
and Im not sure why I cant use arm android.
Second, everytime I try to create a nix-shell for this environment it fails to build at gnupg due to missing npth. Luckily there exists a similar issue here why-does-nixos-rebuild-want-me-to-install-a-library and this user has created a PR that supposedly would fix this issue and it should be in nixos-unstable (which I am on) comment with links but I cannot get this to build regardless of that.
Is there any way that I can make use of this fix or just skip gnupg altogether? Here is my shell.nix file:
with import <nixpkgs>
{
localSystem.config = "x86_64-unknown-linux-gnu";
# crossSystem.config = "armv7l-unknown-linux-gnueabihf";
crossSystem = {
config = "armv7l-unknown-linux-gnueabihf";
# config = "armv7l-hf-multiplatform";
arch = "arm";
bigEndian = false;
libc = "glibc";
uclibc = {
extraConfig = ''
CONFIG_ARM_OABI n
CONFIG_ARM_EABI y
ARCH_BIG_ENDIAN n
ARCH_WANTS_LITTLE_ENDIAN y
ARCH_WANTS_BIG_ENDIAN n
LINUXTHREADS_OLD y
'';
};
};
pkgsCross.armv7l-unknown-linux-gnueabihf.gnupg.override.enableMinimal = true;
};
mkShell {
buildInputs = [
zlib
npth
liblogging
glibc
stdenv
clang-tools
gcc
];
inputsFrom = [gnutar npth gnupg glibc];
shellHook = ''
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib.outPath}/lib:$LD_LIBRARY_PATH"
'';
}
and nix info
~ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.8.2-zen2, NixOS, 24.05 (Uakari), 24.05.20240403.fd281bd`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.2`
- channels(root): `"nixos, nixos-unstable"`
- nixpkgs: `/nix/store/n2g5cqwv8qf5p6vjxny6pg3blbdij12k-source`