Skip to content

Commit

Permalink
Some more improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jaen committed May 24, 2024
1 parent 003ba3b commit 285d307
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 156 deletions.
19 changes: 18 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
androidPkgs.url = "github:tadfisher/android-nixpkgs/stable";
};

outputs = { self, nixpkgs, androidPkgs, ... }@inputs: let
outputs = { self, nixpkgs, nixpkgs-unstable, androidPkgs, ... }@inputs: let
pkgs = import ./pkgs/default.nix { inherit inputs; };
in {
# robotnixSystem evaluates a robotnix configuration
Expand Down
149 changes: 0 additions & 149 deletions flavors/lineageos/test_lineageos_updater.py

This file was deleted.

8 changes: 7 additions & 1 deletion modules/envpackages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ in
nettools # Needed for "hostname" in build/soong/ui/build/sandbox_linux.go
procps # Needed for "ps" in build/envsetup.sh
]
(mkIf (config.androidVersion >= 10) [
(mkIf (config.androidVersion >= 12) [
freetype # Needed by jdk9 prebuilt
fontconfig

python3 # glodfish doesn't need py2 anymore in Android 12+!
])
(mkIf ((config.androidVersion >= 10) && (config.androidVersion <= 11)) [
freetype # Needed by jdk9 prebuilt
fontconfig

Expand Down
4 changes: 3 additions & 1 deletion modules/release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ let
jre = if (config.androidVersion >= 11) then pkgs.jdk11_headless else pkgs.jre8_headless;
deps = with pkgs;
[ otaTools openssl jre zip unzip pkgs.getopt which toybox vboot_reference util-linux
python # ota_from_target_files invokes, brillo_update_payload which has "truncate_file" which invokes python
# ota_from_target_files invokes, brillo_update_payload which has "truncate_file" which invokes python
# c.f. https://android.googlesource.com/platform/system/update_engine/+/refs/heads/main/scripts/brillo_update_payload#338
python3
];
in ''
export PATH=${lib.makeBinPath deps}:$PATH
Expand Down
6 changes: 3 additions & 3 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

{ inputs ? (import (
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/12c64ca55c1014cdc1b16ed5a804aa8576601ff2.tar.gz";
sha256 = "0jm6nzb83wa6ai17ly9fzpqc40wg1viib8klq8lby54agpl213w5"; }
url = "https://github.com/nix-community/flake-compat/archive/8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c.tar.gz";
sha256 = "sha256:0b1vcbficjcrdyqzn4pbb63xwjch1056nmjyyhk4p7kdskhl3nlj"; }
) {
src = ../.;
}).defaultNix.inputs,
Expand All @@ -17,5 +17,5 @@ in nixpkgs.legacyPackages.x86_64-linux.appendOverlays [
androidPkgs.packages = androidPkgs.packages.x86_64-linux;
androidPkgs.sdk = androidPkgs.sdk.x86_64-linux;
})
(import ./overlay.nix)
(import ./overlay.nix { inherit inputs; })
]
8 changes: 8 additions & 0 deletions pkgs/overlay.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{ inputs }:
let
inherit (inputs) nixpkgs-unstable;

unstablePkgs = nixpkgs-unstable.legacyPackages.x86_64-linux;
in
self: super: {
android-emulator = super.callPackage ./android-emulator {};

Expand Down Expand Up @@ -33,6 +39,8 @@ self: super: {
});
nix-prefetch-git = super.callPackage ./fetchgit/nix-prefetch-git.nix {};

gitRepo = unstablePkgs.gitRepo;

###

# Robotnix helper derivations
Expand Down
1 change: 1 addition & 0 deletions scripts/mk_repo_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

REPO_FLAGS = [
"--quiet",
# Based on v2.45, matching the one overlayed in pkgs
"--repo-url=https://github.com/jaen/tools_repo",
"--repo-rev=dca531f6d6e9fdcf00aa9d18f0153bd66a2e32ea",
"--no-repo-verify",
Expand Down

0 comments on commit 285d307

Please sign in to comment.