Skip to content

Commit 5a2f6fc

Browse files
committed
Some more improvements
1 parent 003ba3b commit 5a2f6fc

File tree

8 files changed

+44
-156
lines changed

8 files changed

+44
-156
lines changed

flake.lock

Lines changed: 18 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33

44
inputs = {
55
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
6+
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
67
androidPkgs.url = "github:tadfisher/android-nixpkgs/stable";
78
};
89

9-
outputs = { self, nixpkgs, androidPkgs, ... }@inputs: let
10+
outputs = { self, nixpkgs, nixpkgs-unstable, androidPkgs, ... }@inputs: let
1011
pkgs = import ./pkgs/default.nix { inherit inputs; };
1112
in {
1213
# robotnixSystem evaluates a robotnix configuration

flavors/lineageos/test_lineageos_updater.py

Lines changed: 0 additions & 149 deletions
This file was deleted.

modules/envpackages.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ in
2929
nettools # Needed for "hostname" in build/soong/ui/build/sandbox_linux.go
3030
procps # Needed for "ps" in build/envsetup.sh
3131
]
32-
(mkIf (config.androidVersion >= 10) [
32+
(mkIf (config.androidVersion >= 12) [
33+
freetype # Needed by jdk9 prebuilt
34+
fontconfig
35+
36+
# Goldfish doesn't need py2 anymore in Android 12+!
37+
# c.f. https://android.googlesource.com/device/generic/goldfish/+/605e6a14e44c99e87d48bf52507f8aa01633fb04
38+
python3
39+
])
40+
(mkIf ((config.androidVersion >= 10) && (config.androidVersion <= 11)) [
3341
freetype # Needed by jdk9 prebuilt
3442
fontconfig
3543

modules/release.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ let
1212
jre = if (config.androidVersion >= 11) then pkgs.jdk11_headless else pkgs.jre8_headless;
1313
deps = with pkgs;
1414
[ otaTools openssl jre zip unzip pkgs.getopt which toybox vboot_reference util-linux
15-
python # ota_from_target_files invokes, brillo_update_payload which has "truncate_file" which invokes python
15+
# ota_from_target_files invokes, brillo_update_payload which has "truncate_file" which invokes python
16+
# c.f. https://android.googlesource.com/platform/system/update_engine/+/refs/heads/main/scripts/brillo_update_payload#338
17+
python3
1618
];
1719
in ''
1820
export PATH=${lib.makeBinPath deps}:$PATH

pkgs/default.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
{ inputs ? (import (
55
fetchTarball {
6-
url = "https://github.com/edolstra/flake-compat/archive/12c64ca55c1014cdc1b16ed5a804aa8576601ff2.tar.gz";
7-
sha256 = "0jm6nzb83wa6ai17ly9fzpqc40wg1viib8klq8lby54agpl213w5"; }
6+
url = "https://github.com/nix-community/flake-compat/archive/8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c.tar.gz";
7+
sha256 = "sha256:0b1vcbficjcrdyqzn4pbb63xwjch1056nmjyyhk4p7kdskhl3nlj"; }
88
) {
99
src = ../.;
1010
}).defaultNix.inputs,
@@ -17,5 +17,5 @@ in nixpkgs.legacyPackages.x86_64-linux.appendOverlays [
1717
androidPkgs.packages = androidPkgs.packages.x86_64-linux;
1818
androidPkgs.sdk = androidPkgs.sdk.x86_64-linux;
1919
})
20-
(import ./overlay.nix)
20+
(import ./overlay.nix { inherit inputs; })
2121
]

pkgs/overlay.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
{ inputs }:
2+
let
3+
inherit (inputs) nixpkgs-unstable;
4+
5+
unstablePkgs = nixpkgs-unstable.legacyPackages.x86_64-linux;
6+
in
17
self: super: {
28
android-emulator = super.callPackage ./android-emulator {};
39

@@ -33,6 +39,8 @@ self: super: {
3339
});
3440
nix-prefetch-git = super.callPackage ./fetchgit/nix-prefetch-git.nix {};
3541

42+
gitRepo = unstablePkgs.gitRepo;
43+
3644
###
3745

3846
# Robotnix helper derivations

scripts/mk_repo_file.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
REPO_FLAGS = [
2323
"--quiet",
24+
# Based on v2.45, matching the one overlayed in pkgs
2425
"--repo-url=https://github.com/jaen/tools_repo",
2526
"--repo-rev=dca531f6d6e9fdcf00aa9d18f0153bd66a2e32ea",
2627
"--no-repo-verify",

0 commit comments

Comments
 (0)