Skip to content

Avoid overriding bionic when using prebuilt android #2255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jonringer
Copy link
Contributor

On master:

nix-repl> pkgs-unstable.pkgsCross.aarch64-android-prebuilt.bionic
error:
       … while evaluating the attribute 'pkgsCross.aarch64-android-prebuilt.bionic'

         at /home/jringer/projects/haskell.nix/overlays/android.nix:27:3:

           26| }) // prev.lib.optionalAttrs prev.stdenv.targetPlatform.isAndroid ({
           27|   bionic = prev.bionic.override { enableStatic = true; };
             |   ^
           28| })

       … while evaluating the attribute 'bionic.override'

         at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/pkgs/top-level/all-packages.nix:19995:3:

        19994|   # TODO(@Ericson2314): Build bionic libc from source
        19995|   bionic = if stdenv.hostPlatform.useAndroidPrebuilt
             |   ^
        19996|     then pkgs."androidndkPkgs_${stdenv.hostPlatform.ndkVer}".libraries

       error: attribute 'override' missing

       at /home/jringer/projects/haskell.nix/overlays/android.nix:27:12:

           26| }) // prev.lib.optionalAttrs prev.stdenv.targetPlatform.isAndroid ({
           27|   bionic = prev.bionic.override { enableStatic = true; };
             |            ^
           28| })

nix-repl> 

My branch:

nix-repl> pkgs-unstable.pkgsCross.aarch64-android-prebuilt.bionic
«derivation /nix/store/rva8m97misqknplrhsnf8rdpwkblgrhd-bionic-prebuilt.drv»

@jonringer
Copy link
Contributor Author

For more context, this is because of https://github.com/NixOS/nixpkgs/blob/27cf93c040c0f7502ab8556b681764abafba02a1/pkgs/top-level/all-packages.nix#L19187-L19190 , in which the prebuilt android platform will just use the android ndk's libraries as the bionic package, instead of trying to build it separately

@jonringer
Copy link
Contributor Author

@hamishmack hamishmack merged commit b6b1909 into input-output-hk:master Sep 29, 2024
29 of 31 checks passed
@jonringer jonringer deleted the jringer/android-prebuilt branch September 29, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants