Skip to content

Commit 1784525

Browse files
authored
Merge pull request #231 from eyJhb/bump-nixpkgs-23.11
Bump nixpkgs to 23.11, android-nixpkgs to latest and remove nixpkgsUnstable
2 parents ee5091b + 5159898 commit 1784525

File tree

6 files changed

+97
-39
lines changed

6 files changed

+97
-39
lines changed

flake.lock

+70-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
description = "Build Android (AOSP) using Nix";
33

44
inputs = {
5-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
6-
nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable";
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
76
androidPkgs.url = "github:tadfisher/android-nixpkgs/stable";
87
};
98

@@ -38,7 +37,8 @@
3837
wget
3938

4039
# For chromium updater script
41-
python2 cipd git
40+
# python2
41+
cipd git
4242

4343
cachix
4444
];

modules/base.nix

+18-2
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ in
299299
inherit name;
300300
srcs = [];
301301

302+
# TODO: update in the future, might not be required.
303+
# gets permissed denied if not set, in some of our deps
304+
dontUpdateAutotoolsGnuConfigScripts = true;
305+
302306
# TODO: Clean this stuff up. unshare / robotnix-build could probably be combined into a single utility.
303307
builder = pkgs.writeShellScript "builder.sh" ''
304308
export SAVED_UID=$(${pkgs.coreutils}/bin/id -u)
@@ -437,8 +441,8 @@ in
437441
name = "ota-tools";
438442
inherit src;
439443
sourceRoot = ".";
440-
nativeBuildInputs = with pkgs; [ unzip pythonPackages.pytest ];
441-
buildInputs = [ (pkgs.python.withPackages (p: [ p.protobuf ])) ];
444+
nativeBuildInputs = with pkgs; [ unzip python3Packages.pytest ];
445+
buildInputs = [ (pkgs.python3.withPackages (p: [ p.protobuf ])) ];
442446
postPatch = lib.optionalString (config.androidVersion == 11) ''
443447
cp bin/debugfs_static bin/debugfs
444448
'' + lib.optionalString (config.androidVersion <= 10) ''
@@ -514,6 +518,18 @@ in
514518
name = "robotnix-build";
515519
targetPkgs = pkgs: config.envPackages;
516520
multiPkgs = pkgs: with pkgs; [ zlib ];
521+
522+
# TODO might not be needed in the future, required now because
523+
# Android works in mysterious ways. Wasn't needed in the past
524+
# because these paths were already a part of LD_LIBRARY_PATH
525+
# when using FHS.
526+
#
527+
# See here for issue when it was introduced https://github.com/NixOS/nixpkgs/issues/262775
528+
# Inspiration taken from here https://github.com/NixOS/nixpkgs/pull/278361
529+
# More information here as well https://github.com/NixOS/nixpkgs/issues/103648
530+
profile = ''
531+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/lib32
532+
'';
517533
};
518534
};
519535
}];

modules/envpackages.nix

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ in
1818
lsof
1919
m4
2020
ncurses5
21+
libxcrypt-legacy
2122
openssl # Used in avbtool
2223
psmisc # for "fuser", "pstree"
2324
rsync

pkgs/default.nix

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,11 @@
1111
... }@args:
1212

1313
let
14-
inherit (inputs) nixpkgs nixpkgsUnstable androidPkgs;
14+
inherit (inputs) nixpkgs androidPkgs;
1515
in nixpkgs.legacyPackages.x86_64-linux.appendOverlays [
1616
(self: super: {
1717
androidPkgs.packages = androidPkgs.packages.x86_64-linux;
1818
androidPkgs.sdk = androidPkgs.sdk.x86_64-linux;
19-
20-
inherit (nixpkgsUnstable.legacyPackages.x86_64-linux)
21-
diffoscope;
2219
})
2320
(import ./overlay.nix)
2421
]

pkgs/overlay.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ self: super: {
2727

2828
fetchgerritpatchset = super.callPackage ./fetchgerritpatchset {};
2929

30-
fetchgit = super.callPackage ./fetchgit {};
30+
# TODO cleanup once fetchgit is overridable upstream
31+
fetchgit = args: ((super.lib.makeOverridable super.fetchgit) args).overrideAttrs (old: {
32+
impureEnvVars = old.impureEnvVars or [ ] ++ [ "ROBOTNIX_GIT_MIRRORS" ];
33+
});
3134
nix-prefetch-git = super.callPackage ./fetchgit/nix-prefetch-git.nix {};
3235

3336
###

0 commit comments

Comments
 (0)