WIP: moby: partially working cross compilation for phosh w/o apps (webkitgtk build OOMs)

This commit is contained in:
Colin 2023-02-06 22:41:32 +00:00
parent 7491114915
commit 6cbeccf51f
2 changed files with 138 additions and 48 deletions

View File

@ -11,7 +11,7 @@
sane.services.wg-home.ip = config.sane.hosts.by-name."moby".wg-home.ip; sane.services.wg-home.ip = config.sane.hosts.by-name."moby".wg-home.ip;
# TODO: re-enable once base is cross-compiled # TODO: re-enable once base is cross-compiled
sane.programs.phoshApps.enableSuggested = false; sane.programs.guiApps.enableSuggested = false;
# cross-compiled documentation is *slow*. # cross-compiled documentation is *slow*.
# no obvious way to natively compile docs (2022/09/29). # no obvious way to natively compile docs (2022/09/29).
@ -46,7 +46,7 @@
sane.nixcache.enable = true; sane.nixcache.enable = true;
sane.persist.enable = true; sane.persist.enable = true;
# sane.gui.phosh.enable = true; sane.gui.phosh.enable = true;
boot.loader.efi.canTouchEfiVariables = false; boot.loader.efi.canTouchEfiVariables = false;
# /boot space is at a premium. default was 20. # /boot space is at a premium. default was 20.

View File

@ -1,4 +1,4 @@
{ config, ... }: { config, lib, pkgs, ... }:
let let
# these are the overlays which we *also* pass through to the cross and emulated package sets. # these are the overlays which we *also* pass through to the cross and emulated package sets.
@ -22,50 +22,140 @@ let
}; };
in in
{ {
# the configuration of which specific package set `pkgs.cross` refers to happens elsewhere; # options = {
# here we just define them all. # perlPackageOverrides = lib.mkOption {
nixpkgs.overlays = [ # };
(next: prev: rec { # };
# non-emulated packages build *from* local *for* target.
# for large packages like the linux kernel which are expensive to build under emulation,
# the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation.
crossFrom."x86_64-linux" = mkCrossFrom "x86_64-linux" prev;
crossFrom."aarch64-linux" = mkCrossFrom "aarch64-linux" prev;
emulated = mkEmulated prev; config = {
}) # the configuration of which specific package set `pkgs.cross` refers to happens elsewhere;
(next: prev: { # here we just define them all.
# packages which don't cross compile nixpkgs.overlays = [
inherit (prev.emulated) (next: prev: rec {
duplicity # python3.10-s3transfer # non-emulated packages build *from* local *for* target.
fuzzel # for large packages like the linux kernel which are expensive to build under emulation,
fwupd-efi # the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation.
fwupd crossFrom."x86_64-linux" = mkCrossFrom "x86_64-linux" prev;
# gnustep-base # (used by unar) crossFrom."aarch64-linux" = mkCrossFrom "aarch64-linux" prev;
gocryptfs # gocryptfs-2.3-go-modules
# grpc emulated = mkEmulated prev;
hdf5 })
http2 (next: prev:
kitty let
iio-sensor-proxy emulated = prev.emulated;
libHX in {
pam_mount # packages which don't cross compile
pipewire inherit (emulated)
ncftp # adwaita-qt # psqlodbc
rmlint apacheHttpd # TODO: not properly patched
sequoia appstream
# splatmoji blueman
twitter-color-emoji # python3.10-defcon brltty
unar # python3.10-psycopg2 cantarell-fonts # python3.10-skia-pathops
visidata # python3.10-psycopg2 colord
xdg-utils # perl5.36.0-File-BaseDir duplicity # python3.10-s3transfer
; evince
# pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ flakpak
# (py-next: py-prev: { fuzzel
# defcon = py-prev.defcon.override { inherit prev.emulated.stdenv; }; fwupd-efi
# # psycopg2 = py-prev.psycopg2.override { inherit prev.emulated.stdenv; }; fwupd
# }) gcr
# ]; gmime
}) # gnome-keyring
]; # gnome-remote-desktop
gnome-tour
# gnustep-base # (used by unar)
gocryptfs # gocryptfs-2.3-go-modules
# grpc
gst_all_1 # gst_all_1.gst-editing-services
gupnp
gupnp_1_6
gvfs
flatpak
hdf5
http2
ibus
kitty
iio-sensor-proxy
libHX
libgweather
librest
librest_1_0
libsForQt5 # qtbase
mod_dnssd
ncftp
obex_data_server
openfortivpn
ostree
pam_mount
perl # perl5.36.0-Test-utf8
pipewire
psqlodbc
pulseaudio # python3.10-defcon
# qgnomeplatform
# qtbase
qt6 # psqlodbc
rmlint
sequoia
# splatmoji
squeekboard
sysprof
tracker-miners # it just can't run tests
twitter-color-emoji # python3.10-defcon
unar # python3.10-psycopg2
visidata # python3.10-psycopg2
vpnc
webp-pixbuf-loader
xdg-utils # perl5.36.0-File-BaseDir
;
# pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
# (py-next: py-prev: {
# defcon = py-prev.defcon.override { inherit prev.emulated.stdenv; };
# # psycopg2 = py-prev.psycopg2.override { inherit prev.emulated.stdenv; };
# })
# ];
gnome = prev.gnome.overrideScope' (self: super: {
inherit (emulated.gnome)
gnome-color-manager
gnome-keyring
gnome-remote-desktop # TODO: figure out what's asking for this and remove it
gnome-user-share
mutter
;
});
# gst_all_1.gst-editing-services = emulated.gst_all_1.gst-editing-services;
# gst_all_1 = prev.gst_all_1.overrideScope' (self: super: {
# inherit (emulated.gst_all_1)
# gst-editing-services
# ;
# });
# libsForQt5 = prev.libsForQt5.overrideScope' (self: super: {
# inherit (emulated.libsForQt5)
# qtbase
# ;
# });
# apacheHttpdPackagesFor = apacheHttpd: self:
# let
# prevHttpdPkgs = lib.fix (emulated.apacheHttpdPackagesFor apacheHttpd);
# in
# (prev.apacheHttpdPackagesFor apacheHttpd self) // {
# # inherit (prevHttpdPkgs) mod_dnssd;
# mod_dnssd = prevHttpdPkgs.mod_dnssd.override {
# inherit (self) apacheHttpd;
# };
# };
})
];
# perlPackageOverrides = _perl: {
# inherit (pkgs.emulated.perl.pkgs)
# Testutf8
# ;
# };
};
} }