File tree 6 files changed +97
-39
lines changed
6 files changed +97
-39
lines changed Original file line number Diff line number Diff line change 2
2
description = "Build Android (AOSP) using Nix" ;
3
3
4
4
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" ;
7
6
androidPkgs . url = "github:tadfisher/android-nixpkgs/stable" ;
8
7
} ;
9
8
38
37
wget
39
38
40
39
# For chromium updater script
41
- python2 cipd git
40
+ # python2
41
+ cipd git
42
42
43
43
cachix
44
44
] ;
Original file line number Diff line number Diff line change 299
299
inherit name ;
300
300
srcs = [ ] ;
301
301
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
+
302
306
# TODO: Clean this stuff up. unshare / robotnix-build could probably be combined into a single utility.
303
307
builder = pkgs . writeShellScript "builder.sh" ''
304
308
export SAVED_UID=$(${ pkgs . coreutils } /bin/id -u)
437
441
name = "ota-tools" ;
438
442
inherit src ;
439
443
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 ] ) ) ] ;
442
446
postPatch = lib . optionalString ( config . androidVersion == 11 ) ''
443
447
cp bin/debugfs_static bin/debugfs
444
448
'' + lib . optionalString ( config . androidVersion <= 10 ) ''
514
518
name = "robotnix-build" ;
515
519
targetPkgs = pkgs : config . envPackages ;
516
520
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
+ '' ;
517
533
} ;
518
534
} ;
519
535
} ] ;
Original file line number Diff line number Diff line change 18
18
lsof
19
19
m4
20
20
ncurses5
21
+ libxcrypt-legacy
21
22
openssl # Used in avbtool
22
23
psmisc # for "fuser", "pstree"
23
24
rsync
Original file line number Diff line number Diff line change 11
11
... } @args :
12
12
13
13
let
14
- inherit ( inputs ) nixpkgs nixpkgsUnstable androidPkgs ;
14
+ inherit ( inputs ) nixpkgs androidPkgs ;
15
15
in nixpkgs . legacyPackages . x86_64-linux . appendOverlays [
16
16
( self : super : {
17
17
androidPkgs . packages = androidPkgs . packages . x86_64-linux ;
18
18
androidPkgs . sdk = androidPkgs . sdk . x86_64-linux ;
19
-
20
- inherit ( nixpkgsUnstable . legacyPackages . x86_64-linux )
21
- diffoscope ;
22
19
} )
23
20
( import ./overlay.nix )
24
21
]
Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ self: super: {
27
27
28
28
fetchgerritpatchset = super . callPackage ./fetchgerritpatchset { } ;
29
29
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
+ } ) ;
31
34
nix-prefetch-git = super . callPackage ./fetchgit/nix-prefetch-git.nix { } ;
32
35
33
36
###
You can’t perform that action at this time.
0 commit comments