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-06-17 20:50:32 +03:00
|
|
|
hard-reboot = callPackage ./misc/hard-reboot.nix { };
|
2019-06-09 20:14:49 +03:00
|
|
|
hard-shutdown = callPackage ./misc/hard-shutdown.nix { };
|
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 { };
|
2018-07-07 02:53:57 +03:00
|
|
|
msm-fb-handle = callPackage ./msm-fb-handle { };
|
2018-06-13 05:06:24 +03:00
|
|
|
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
|
|
|
|
2018-06-13 05:06:24 +03:00
|
|
|
# Default set of kernel patches.
|
|
|
|
defaultKernelPatches = with self.kernelPatches; [
|
|
|
|
bridge_stp_helper
|
|
|
|
p9_fixes
|
|
|
|
];
|
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.
|
|
|
|
#
|
|
|
|
|
|
|
|
fbterm = super.fbterm.overrideDerivation(oldAttrs: with self; {
|
|
|
|
# Adds missing nativeBuildInputs (they're only buildInputs in nixpkgs).
|
|
|
|
nativeBuildInputs = [ pkgconfig ncurses binutils ];
|
|
|
|
# Futhermore, this patch is needed for compilation.
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0001-fbio.cpp-improxy.cpp-fbterm.cpp-fix-musl-compile.patch";
|
|
|
|
url = "https://raw.githubusercontent.com/buildroot/buildroot/master/package/fbterm/0001-fbio.cpp-improxy.cpp-fbterm.cpp-fix-musl-compile.patch";
|
|
|
|
sha256 = "10dgpsym0nhsxzjbi0dbp1y5h2a1b7srsf9l09j9g10ia31ljbs3";
|
|
|
|
})
|
|
|
|
]
|
|
|
|
++ oldAttrs.patches
|
|
|
|
;
|
|
|
|
});
|
|
|
|
|
|
|
|
freetype = super.freetype.overrideDerivation(oldAttrs: with self;{
|
|
|
|
# ./configure doesn't detect the native compiler properly.
|
|
|
|
CC_BUILD = "${buildPackages.stdenv.cc}/bin/cc";
|
|
|
|
});
|
2018-07-04 06:50:16 +03:00
|
|
|
|
|
|
|
libdrm = super.libdrm.overrideAttrs(oldAttrs: {
|
2018-07-11 21:32:29 +03:00
|
|
|
# valgrind won't build cross.
|
2018-07-04 06:50:16 +03:00
|
|
|
buildInputs = builtins.filter (
|
|
|
|
input: input != self.valgrind-light
|
|
|
|
) oldAttrs.buildInputs;
|
|
|
|
});
|
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 {};
|
|
|
|
kernel-builder-gcc6 = callPackage ./mobile-nixos/kernel/builder.nix {
|
|
|
|
stdenv = with self; overrideCC stdenv buildPackages.gcc6;
|
|
|
|
};
|
|
|
|
};
|
2018-06-10 03:57:12 +03:00
|
|
|
}
|