1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 21:11:34 +03:00
mobile-nixos/overlay/overlay.nix

113 lines
3.4 KiB
Nix
Raw Normal View History

2018-06-10 03:57:12 +03:00
self: super:
let
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
{
# Misc. tools.
# Keep sorted.
adbd = callPackage ./adbd { };
2018-07-07 05:43:03 +03:00
android-headers = callPackage ./android-headers { };
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)
;
};
mkbootimg = callPackage ./mkbootimg { };
msm-fb-refresher = callPackage ./msm-fb-refresher { };
ply-image = callPackage ./ply-image { };
2018-06-10 03:57:12 +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
;
};
#
# 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 {};
#
# 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; };
#
# Fixes to upstream
# -----------------
#
# All that follows will have to be cleaned and then upstreamed.
#
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 {};
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;
};
kernel-builder-clang_9 = callPackage ./mobile-nixos/kernel/builder.nix {
stdenv = with self; overrideCC stdenv buildPackages.clang_9;
};
stage-1 = {
script-loader = callPackage ../boot/script-loader {};
boot-gui = callPackage ../boot/gui {};
};
2020-10-03 05:50:25 +03:00
autoport = callPackage ./mobile-nixos/autoport {};
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
}