770 Commits

Author SHA1 Message Date
R. Ryantm 16a6e26bf0 androidenv.test-suite: bf983fbce7b915ee -> 96adc7d16ae7f971 2026-07-22 13:29:02 +00:00
Emily fdb820602b treewide: drop simple x86_64-darwin mentions
To reproduce:

    $ nix run nixpkgs/3b32825de172d0bc85664f495edb096b10862524#ast-grep \
        -- scan --update-all --inline-rules '
          id: nix-x86_64-darwin
          language: nix
          rule:
            any:
              - pattern: "\"x86_64-darwin\""
                kind: list_expression > string_expression
              - pattern:
                  context: "{ \"x86_64-darwin\" = $EXPR; }"
                  selector: binding
              - pattern:
                  context: "{ x86_64-darwin = $EXPR; }"
                  selector: binding
          fix:
            template: ""
        ' pkgs
    $ nix run nixpkgs/3b32825de172d0bc85664f495edb096b10862524#ast-grep \
        -- scan --update-all --inline-rules '
          id: json-first-x86_64-darwin
          language: json
          rule:
            kind: object > pair:nth-child(1)
            has:
              pattern: "\"x86_64-darwin\""
              field: key
          fix:
            template: ""
            expandEnd: { regex: "," }
        ' pkgs
    $ nix run nixpkgs/3b32825de172d0bc85664f495edb096b10862524#ast-grep \
        -- scan --update-all --inline-rules '
          id: json-x86_64-darwin
          language: json
          rule:
            kind: object > pair
            has:
              pattern: "\"x86_64-darwin\""
              field: key
          fix:
            template: ""
            expandStart: { regex: "," }
        ' pkgs
    $ git restore pkgs/by-name/om/omnix/package.nix
    $ git diff --name-only -z \
        | nix shell nixpkgs/3b32825de172d0bc85664f495edb096b10862524#gnused \
            -c xargs -0 sed -i '/^$/N; /^\n\? \+$/d'
    $ treefmt
2026-07-15 03:58:16 +01:00
R. Ryantm e5f329a406 androidenv.test-suite: b32174c25099306e -> bf983fbce7b915ee 2026-07-13 13:45:30 +00:00
Masum Reza 7e6dcb6a0f androidenv.test-suite: b302c79dc7524f10 -> b32174c25099306e (#532674) 2026-06-21 12:41:04 +00:00
Michael Daniels 5fecd444e4 maintainers/scripts/update.nix: allow true for boolean args along w/ "true" (#529187) 2026-06-21 00:54:02 +00:00
R. Ryantm 78e9c72157 androidenv.test-suite: b302c79dc7524f10 -> b32174c25099306e 2026-06-17 13:23:11 +00:00
R. Ryantm b95c755fdc androidenv.test-suite: 2937e647936072ec -> b302c79dc7524f10 2026-06-08 03:48:54 +00:00
Michael Daniels 2bb3216d1c maintainers/scripts/update.nix: allow true for boolean args along w/ "true"
I intend to add a deprecation warning when a string is provided once I've
updated some downstream users.
2026-06-07 15:53:01 -04:00
Clément 5d26766cbf treewide: add missing meta.homepage with source git repository
Added homepage where missing, where the sources are pulled from:
- https://github.com
- https://git.sr.ht
- https://gitlab.com
- https://invent.kde.org
- https://codeberg.org
- https://gitlab.gnome.org
- https://gitlab.freedesktop.org
- https://git.FreeBSD.org
- https://salsa.debian.org
- https://git.tvdr.de
- https://git.suckless.org
2026-06-01 23:40:52 +02:00
R. Ryantm eb3f5099f5 androidenv.test-suite: db5315e3cae30188 -> 2937e647936072ec 2026-05-30 05:09:14 +00:00
R. Ryantm 7e42673728 androidenv.test-suite: 46e2779744ab55bb -> db5315e3cae30188 2026-05-21 11:10:42 +00:00
Eman Resu c4e70c2a59 various: remove nested lists in build inputs 2026-05-16 22:39:19 -04:00
Sigmanificient e0015b06ae webos.novacmd: fix build with gcc 15 2026-05-13 00:35:29 +02:00
Ben Siraphob 869d641281 treewide: replace stdenv.is* with stdenv.hostPlatform.is* 2026-05-10 10:06:35 -07:00
@mjones 795642ef47 androidenv.ndk-bundle: use ${package.path} instead of `ndk/${packag… (#518103) 2026-05-08 15:28:25 +00:00
Marie Ramlow 5d73e9312b androidenv: fix emulator graphics acceleration
Set a default value for VK_ADD_DRIVER_FILES so the SDK's vulkan-loader
can load NixOS vulkan drivers.

libGL needs to be in LD_LIBRARY_PATH to get loaded successfully.

Tested using:
```nix
androidenv.emulateApp {
  name = "app";
  platformVersion = "36";
  abiVersion = "x86_64";
  systemImageType = "google_apis_playstore";
  configOptions = {
    "hw.gpu.mode" = "host";
    "hw.gpu.enabled" = "yes";
    "hw.keyboard" = "yes";
  };
}
```
2026-05-07 10:22:58 +02:00
xeu 9c6c4891c7 androidenv.ndk-bundle: use ${package.path} instead of ndk/${package.revision}
For NDKs with `-rc*` like `30.0.14904198-rc1`, this avoids dangling
symlinks.
2026-05-05 20:01:26 +08:00
R. Ryantm de08959e42 androidenv.test-suite: 7fb1f87547f5d4c6 -> 46e2779744ab55bb 2026-04-26 00:57:31 +00:00
Morgan Jones 9c2f0302bf androidenv: ANDROID_SDK_ROOT -> ANDROID_HOME
Change the 'primary' env var to ANDROID_HOME.
Always export ANDROID_SDK_ROOT for compatibility.
2026-04-19 17:32:01 -07:00
R. Ryantm a3fab50f8e androidenv.test-suite: bf29939be4d269fd -> 7fb1f87547f5d4c6 2026-04-09 13:32:02 +00:00
jappeace-sloth b050c15a4a androidenv.ndk-bundle: use jdk_headless instead of jdk
ndk-build only needs java/javac, not GUI capabilities.
Switching to jdk_headless drops ~257 MB of unnecessary
desktop dependencies (GTK+3, icu4c, harfbuzz, cups, systemd)
from the closure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 14:02:44 +00:00
Morgan Jones a1241180d7 androidenv: fix new "37.0" packages with API version ranges
Google has seemed to require this suffix on their newer packages,
and also doesn't provide sources anymore. Fix both issues.
2026-04-05 18:37:23 -07:00
Morgan Jones 2c537a6ed0 androidenv: build-tools: 36.1.0 -> 37.0.0; cmdline-tools: 19.0 -> 20.0; emulator: 36.3.10 -> 36.5.10; platform-tools: 36.0.0 -> 37.0.0; platforms: 36.1 -> 37.0
Performed the following automatic androidenv updates:

- build-tools: 36.1.0 -> 37.0.0
- cmdline-tools: 19.0 -> 20.0
- emulator: 36.3.10 -> 36.5.10
- platform-tools: 36.0.0 -> 37.0.0
- platforms: 36.1 -> 37.0

Tests exited with status: 1

Last 100 lines of output:
```
warning: unknown experimental feature 'parallel-eval'
warning: unknown setting 'eval-cores'
error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:37:12:
           36|
           37|   strict = derivationStrict drvAttrs;
             |            ^
           38|

       … while evaluating derivation 'androidenv-test-suite-bf29939be4d269fd'
         whose name attribute is located at /tmp/nix-shell-3418431-3082936275/tmph4iklmqn/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:541:11

       … while evaluating attribute 'buildInputs' of derivation 'androidenv-test-suite-bf29939be4d269fd'
         at /tmp/nix-shell-3418431-3082936275/tmph4iklmqn/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:593:11:
          592|           depsHostHost = elemAt (elemAt dependencies 1) 0;
          593|           buildInputs = elemAt (elemAt dependencies 1) 1;
             |           ^
          594|           depsTargetTarget = elemAt (elemAt dependencies 2) 0;

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: The version 37 is missing in package platforms.
       The only available versions are 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 33x, 34, 34x, 35, 35x, 36, 36.1, 36x, 37.0, 4, 5, 6, 7, 8, 9, Baklava, CANARY, CinnamonBun, TiramisuPrivacySandbox, UpsideDownCake, UpsideDownCakePrivacySandbox, VanillaIceCream.
```
2026-04-06 00:17:36 +00:00
jopejoe1 2182f8e913 androidenv.test-suite: set pname instead of name 2026-02-03 22:26:21 +01:00
quantenzitrone 7d8132a92c treewide: remove references to the xorg namespace in pkgs (automated)
this creates some eval errors that will be fixed in the next commit

done with the following script:

```fish
\#!/usr/bin/env fish

set packagesjson (nix eval --impure --json --expr '
let
  lib = import ./lib;
in
import pkgs/servers/x11/xorg/default.nix (lib.mapAttrs (
  name: _:
  if name == "lib" then
    lib
  else if name == "config" then
    { allowAliases = false; }
  else
    name
) (__functionArgs (import pkgs/servers/x11/xorg/default.nix))) { }
' | jq)

set one (grep '^    [A-Za-z0-9_-]*$' pkgs/servers/x11/xorg/default.nix | string trim | string replace -r '$' Z | sort | string sub -e -1)
set two (grep '^  [A-Za-z0-9_-]* = [A-Za-z0-9_-]*;$' pkgs/servers/x11/xorg/default.nix | cut -d= -f1 | string trim | string replace -r '$' Z | sort | string sub -e -1)

for arg in $one $two
    set oname $arg
    set nname (echo $packagesjson | jq -r .$oname)

    if test $nname = null
        echo (set_color red)warn:(set_color normal) unknown package xorg.$oname >&2
        continue
    end

    echo $oname "->" $nname

    # replace basic xorg.$name references
    for file in (rg -F "xorg.$oname" --files-with-matches pkgs)
        # special cases
        sd -F "$oname = xorg.$oname;" "$nname = $nname;" $file

        # replace
        sd -F "xorg.$oname" "$nname" $file

        # fixup function arguments

        # prevent duplicate function args
        if grep -E " ($oname|$nname),\$" $file >/dev/null
            continue
        end

        if grep 'xorg\..' $file >/dev/null # case1: there is more so we can't just remove the function arg

            if grep ' xorg,$' $file >/dev/null
                sd ' xorg,$' " xorg,
                $nname," $file

            else if grep ' xorg ? .*,$' $file >/dev/null
                sd 'xorg( ? .*),$' "xorg\$1,
                $nname," $file

            else
                sd -F 'xorg,' "$nname,
                xorg," $file
            end

        else # case there is no more xorg..* so we can just replace the function arg
            sd 'xorg(| ? .*),.*$' "$nname," $file
        end
    end
end

nix fmt
```
2026-01-25 22:28:09 +01:00
quantenzitrone c7c77c1aee treewide: remove all uses of 'with xorg;' in pkgs
this shouldn't create any rebuilds

this was done manually by grepping for `with xorg` and `with pkgs.xorg`
2026-01-25 22:26:00 +01:00
Morgan Jones 03d6e4bc46 androidenv: support nonstandard SDK versions
Google have been releasing 'nonstandard' SDK versions for a while. Named
things like CANARY, UpsideDownCake, 36x, and so on, androidenv has been
generally unable to use them, instead preferring Google's officially
supported Android SDKs corresponding to the
[API levels](https://apilevels.com/) (e.g. "35" or "36").

Updates to those SDK versions have generally come in the form of
updates to Google's repositories that repo.json picks up.
These are mostly noneventful for end users, unless a user experienced a
bug in an API definition, then it tended to be picked up with an
androidenv repo update.

API 36.1 changes this. It's not just a number (so it doesn't correspond
to a unique API level). The previous attempt in #470569 simply preferred
the newer version to attempt to emulate the old behavior.

Unfortunately, this now requires a Gradle change (see #472561). So this
means we should just support all the strange SDK versions now and have a
test for it.

Note that only depending on "latest" (the default) will properly pick
these up as the latest, but using a min and max SDK version or
numLatestPlatformVersions > 1 will create a range of SDK versions as
before, which means you may miss (e.g.) 36.1 but will still have 36.
Considering that this requires `compileSdk "android-36.1"`
instead of a simple `compileSdk 36` in Gradle, it's recommended to
explicitly specify platformVersions if you depend on this change,
or use the defaults, where it will only install the latest.
2025-12-22 23:45:00 -08:00
Morgan Jones dcac273d94 androidenv: fix 'latest' where SDK level is not an int
Map 'latest' to the latest minor version of each SDK level, since Google
now has minor versions of SDK levels. The SDK levels are still integers,
so also map "36" to (e.g.) "36.1" by default, since the user likely
wants the latest revision of "36" we have.

Fix: #468525
2025-12-13 16:23:47 -08:00
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00
R. Ryantm 6ff5d4adb8 androidenv.test-suite: 519227a6afa2773e -> aeb6a1bcc1fd6600 2025-12-07 19:16:40 +00:00
R. Ryantm 2266615d9e androidenv.test-suite: 8eb220e182767bf0 -> 519227a6afa2773e 2025-11-18 10:40:02 +00:00
Alexandre Esteves 988d4becb0 androidenv.composeAndroidPackages: fix eval when minor versions are specified 2025-11-05 01:42:39 +00:00
Yueh-Shun Li e1f3d9e0ae androidenv: fix name overriding
Use `overrideAttrs` to specify the FOD name we want,
instead of specifying `pname` and `version`
and expect a broken overrideAttrs that won't update `name`.
2025-11-04 02:25:57 +08:00
Morgan Jones e23e405abd androidenv: cmake: 4.1.1 -> 4.1.2; emulator: 36.2.10 -> 36.2.12
Performed the following automatic androidenv updates:

- cmake: 4.1.1 -> 4.1.2
- emulator: 36.2.10 -> 36.2.12

Tests exited with status: 0

Last 100 lines of output:
```
/nix/store/0vb4227cmf3f6zq1skch0j9l221pzams-androidenv-test-suite
```
2025-10-27 21:25:39 -07:00
Morgan Jones 3df3b74864 androidenv: fingerprint latest versions
The update script needs the old version present in the version file, so
give it something to use.
2025-10-27 21:25:32 -07:00
h7x4 cfa888025e androidenv/tests: lib.mapAttrsToList -> lib.attrValues 2025-10-26 15:33:35 +09:00
Rafael Ieda 668354dfbe webos.cmake-modules, webos.novacom, webos.novacomd: fix build with cmake4 2025-10-20 19:04:47 -03:00
Alexandre Esteves f4e08271a6 Fix parse when the platform version contains a minor component 2025-10-13 21:35:39 +01:00
Alexandre Esteves 33dead5220 androidenv: platforms: 36 -> 36.1; sources: 36 -> 36.1; ndk: 28.2.13676358 -> 29.0.14206865; build-tools: 36.0.0 -> 36.1.0; skiaparser: 7 -> 8; cmake: 4.1.0 -> 4.1.1; emulator: 36.1.9 -> 36.2.10
Performed the following automatic androidenv updates:

- platforms: 36 -> 36.1
- sources: 36 -> 36.1
- ndk: 28.2.13676358 -> 29.0.14206865
- build-tools: 36.0.0 -> 36.1.0
- skiaparser: 7 -> 8
- cmake: 4.1.0 -> 4.1.1
- emulator: 36.1.9 -> 36.2.10

Tests exited with status: 1

Last 100 lines of output:
```
error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:37:12:
           36|
           37|   strict = derivationStrict drvAttrs;
             |            ^
           38|

       … while evaluating derivation 'androidenv-test-suite'
         whose name attribute is located at /tmp/nix-shell-1276140-0/tmp6w93a9w2/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:544:13

       … while evaluating attribute 'buildInputs' of derivation 'androidenv-test-suite'
         at /tmp/nix-shell-1276140-0/tmp6w93a9w2/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:596:13:
          595|             depsHostHost = elemAt (elemAt dependencies 1) 0;
          596|             buildInputs = elemAt (elemAt dependencies 1) 1;
             |             ^
          597|             depsTargetTarget = elemAt (elemAt dependencies 2) 0;

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: toIntBase10: Could not convert "36.1" to int.
```
2025-10-13 21:35:39 +01:00
Guy Chronister b26d919c4a various: migrate to by-name 2025-10-05 12:20:17 -05:00
NAHO c8d4dabc43 pkgs: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd \
      --type file \
      . \
      pkgs \
      --exec-batch sed --in-place --regexp-extended "
        s/\<builtins\.($(
          printf '%s\n' "${builtins[@]}" |
            paste --delimiter '|' --serial -
        ))\>/\1/g
      "

    nix fmt
2025-10-04 19:02:37 +02:00
Ben Siraphob 2f77d9aa7c pkgs: fix README typos 2025-08-27 11:46:28 -07:00
Emily 72f5bfc3b5 various: unpin or bump LLVM (#434642) 2025-08-18 19:05:22 +01:00
Emily 529489ffd3 androidenv.androidPkgs.emulator: drop unused LLVM library
None of the libraries reference this.
2025-08-18 15:56:40 +01:00
Morgan Jones 843384b7fe androidenv: apply meta to Android fetchurl calls
This sets an unfree license, which already applied to everything else in
androidenv, preventing accidental caching on Hydra.
2025-08-17 23:01:19 -07:00
Morgan Jones cd6beadee9 androidenv: ndk: 28.1.13356709 -> 28.2.13676358; cmake: 4.0.2 -> 4.1.0; platform-tools: 35.0.2 -> 36.0.0; emulator: 35.6.9 -> 36.1.9
Performed the following automatic androidenv updates:

- ndk: 28.1.13356709 -> 28.2.13676358
- cmake: 4.0.2 -> 4.1.0
- platform-tools: 35.0.2 -> 36.0.0
- emulator: 35.6.9 -> 36.1.9

Tests exited with status: 0

Last 100 lines of output:
```
/nix/store/wndplv7p1d5dc3hryf4qx3srmq3c087x-androidenv-test-suite
```
2025-08-17 22:55:58 -07:00
Morgan Jones 555c0ad6cc androidenv: make test suite version track repo.json hash
This should fix autoupdate not recognizing version changes.
2025-08-17 22:45:46 -07:00
Wolfgang Walther 5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Aaron Jheng 12a1a8c85c fdroidcl: 0.7.0 -> 0.8.1 2025-07-23 21:47:46 +08:00
Wolfgang Walther b2b3b4b768 androidsdk: move throw behind meta.license check
This allows evaluating the package's meta attribute without triggering
the throw, thus making it possible to list the package in the search
results. It also avoids CI falling over with this attribute.
2025-07-19 13:09:48 +02:00