2018-06-10 03:57:12 +03:00
|
|
|
self: super:
|
|
|
|
|
|
|
|
let
|
2018-07-11 21:32:29 +03:00
|
|
|
fetchpatch = self.fetchpatch;
|
2018-06-10 03:57:12 +03:00
|
|
|
callPackage = self.callPackage;
|
2018-07-07 21:25:55 +03:00
|
|
|
# FIXME : upstream fix for .a in "lib" instead of this hack.
|
|
|
|
# This is used to "re-merge" the split gcc package.
|
|
|
|
# Static libraries (.a) aren't available in the "lib" package.
|
|
|
|
# libtool, reading the `.la` files in the "lib" package expects `.a`
|
|
|
|
# to be in the "lib" package; they are in out.
|
|
|
|
merged_gcc7 = super.wrapCC (self.symlinkJoin {
|
|
|
|
name = "gcc7-merged";
|
|
|
|
paths = with super.buildPackages.gcc7.cc; [ out lib ];
|
|
|
|
});
|
2018-06-10 03:57:12 +03:00
|
|
|
in
|
|
|
|
{
|
2018-06-13 05:06:24 +03:00
|
|
|
# Misc. tools.
|
|
|
|
# Keep sorted.
|
2018-07-08 03:00:04 +03:00
|
|
|
adbd = callPackage ./adbd { };
|
2018-07-07 05:43:03 +03:00
|
|
|
android-headers = callPackage ./android-headers { };
|
2018-06-13 05:06:24 +03:00
|
|
|
dtbTool = callPackage ./dtbtool { };
|
2018-07-07 21:25:55 +03:00
|
|
|
libhybris = callPackage ./libhybris {
|
|
|
|
# FIXME : verify how it acts on native aarch64 build.
|
|
|
|
stdenv = if self.buildPlatform != self.targetPlatform then
|
|
|
|
self.stdenv
|
|
|
|
else
|
|
|
|
with self; overrideCC stdenv (merged_gcc7)
|
|
|
|
;
|
|
|
|
};
|
2018-06-13 05:06:24 +03:00
|
|
|
mkbootimg = callPackage ./mkbootimg { };
|
|
|
|
msm-fb-refresher = callPackage ./msm-fb-refresher { };
|
|
|
|
ply-image = callPackage ./ply-image { };
|
2018-06-10 03:57:12 +03:00
|
|
|
|
2018-06-13 05:06:24 +03:00
|
|
|
# Extra "libs"
|
|
|
|
mkExtraUtils = import ./lib/extra-utils.nix {
|
|
|
|
inherit (self)
|
|
|
|
runCommandCC
|
|
|
|
glibc
|
2018-06-26 04:02:35 +03:00
|
|
|
buildPackages
|
2018-06-26 07:08:04 +03:00
|
|
|
writeShellScriptBin
|
2018-06-26 04:02:35 +03:00
|
|
|
;
|
|
|
|
inherit (self.buildPackages)
|
|
|
|
nukeReferences
|
2018-06-13 05:06:24 +03:00
|
|
|
;
|
|
|
|
};
|
2018-06-13 03:07:36 +03:00
|
|
|
|
2019-08-30 01:14:18 +03:00
|
|
|
#
|
|
|
|
# New software to upstream
|
|
|
|
# ------------------------
|
|
|
|
#
|
|
|
|
|
|
|
|
make_ext4fs = callPackage ./make_ext4fs {};
|
2020-01-10 08:46:02 +03:00
|
|
|
hardshutdown = callPackage ./hardshutdown {};
|
2020-01-21 04:16:48 +03:00
|
|
|
bootlogd = callPackage ./bootlogd {};
|
2019-08-30 01:14:18 +03:00
|
|
|
|
2019-10-02 07:19:34 +03:00
|
|
|
#
|
|
|
|
# Hacks
|
|
|
|
# -----
|
|
|
|
#
|
|
|
|
# Totally not upstreamable stuff.
|
|
|
|
#
|
|
|
|
|
|
|
|
xorg = super.xorg.overrideScope'(self: super: {
|
|
|
|
xf86videofbdev = super.xf86videofbdev.overrideAttrs({patches ? [], ...}: {
|
|
|
|
patches = patches ++ [
|
|
|
|
./xserver/0001-HACK-fbdev-don-t-bail-on-mode-initialization-fail.patch
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}) # See all-packages.nix for more about this messy composition :/
|
|
|
|
// { inherit (self) xlibsWrapper; };
|
|
|
|
|
2018-07-04 06:50:16 +03:00
|
|
|
#
|
2018-07-11 21:32:29 +03:00
|
|
|
# Fixes to upstream
|
|
|
|
# -----------------
|
2018-07-04 06:50:16 +03:00
|
|
|
#
|
2018-07-11 21:32:29 +03:00
|
|
|
# All that follows will have to be cleaned and then upstreamed.
|
|
|
|
#
|
|
|
|
|
2019-09-10 23:39:53 +03:00
|
|
|
vboot_reference = super.vboot_reference.overrideAttrs(attrs: {
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/69039
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "ar qc" '${self.stdenv.cc.bintools.targetPrefix}ar qc'
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
2019-04-14 07:48:10 +03:00
|
|
|
# Things specific to mobile-nixos.
|
|
|
|
# Not necessarily internals, but they probably won't go into <nixpkgs>.
|
|
|
|
mobile-nixos = {
|
|
|
|
kernel-builder = callPackage ./mobile-nixos/kernel/builder.nix {};
|
2019-09-27 01:46:39 +03:00
|
|
|
kernel-builder-gcc49 = callPackage ./mobile-nixos/kernel/builder.nix {
|
|
|
|
stdenv = with self; overrideCC stdenv buildPackages.gcc49;
|
|
|
|
};
|
2019-04-14 07:48:10 +03:00
|
|
|
kernel-builder-gcc6 = callPackage ./mobile-nixos/kernel/builder.nix {
|
|
|
|
stdenv = with self; overrideCC stdenv buildPackages.gcc6;
|
|
|
|
};
|
2020-06-26 03:54:50 +03:00
|
|
|
kernel-builder-clang_9 = callPackage ./mobile-nixos/kernel/builder.nix {
|
|
|
|
stdenv = with self; overrideCC stdenv buildPackages.clang_9;
|
|
|
|
};
|
2020-05-29 05:09:12 +03:00
|
|
|
|
|
|
|
stage-1 = {
|
|
|
|
script-loader = callPackage ../boot/script-loader {};
|
2020-05-29 06:10:01 +03:00
|
|
|
boot-gui = callPackage ../boot/gui {};
|
2020-05-29 05:09:12 +03:00
|
|
|
};
|
2020-05-29 06:10:01 +03:00
|
|
|
|
2020-10-03 05:50:25 +03:00
|
|
|
autoport = callPackage ./mobile-nixos/autoport {};
|
|
|
|
|
2020-05-29 06:10:01 +03:00
|
|
|
boot-gui-simulator = callPackage ../boot/gui/simulator.nix {};
|
2019-04-14 07:48:10 +03:00
|
|
|
};
|
2019-09-21 21:34:18 +03:00
|
|
|
|
|
|
|
imageBuilder = callPackage ../lib/image-builder {};
|
2018-06-10 03:57:12 +03:00
|
|
|
}
|