From 6cda5cf49b308e428e8048b51bc0c04ea2ab77f1 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 11 Oct 2023 09:58:44 +0000 Subject: [PATCH] moby: remove some build artifacts from the host/runtime closure --- nixpatches/list.nix | 44 +++++++++++++++++++++++--------------------- overlays/cross.nix | 33 +++++++++++++++++++++++---------- 2 files changed, 46 insertions(+), 31 deletions(-) diff --git a/nixpatches/list.nix b/nixpatches/list.nix index dfddc3fc1..87e07055f 100644 --- a/nixpatches/list.nix +++ b/nixpatches/list.nix @@ -279,26 +279,28 @@ in [ saneCommit = "8a171b49aca406f8220f016e56964b3fae53a3df"; hash = "sha256-R11IYatGhSXxZnJxJid519Oc9Kh56D9NT2/cxf2CLuM="; }) - (fetchpatch' { - title = "gcr_4: support cross compilation"; - saneCommit = "a8c3d69236fa67382a8c18cc1ef0f34610fd3275"; - hash = "sha256-UnLqkkpXxBKaqlsoD1jUIigZkxgLtNpjmMHOx10HpfE="; - }) - (fetchpatch' { - title = "networkmanager-openvpn: support cross compilation"; - saneCommit = "6f53c267fbeb2ff543f075032a7e73af2d4bcb9e"; - hash = "sha256-gq9AyKH7/k2ZVSZ3jpPJPt3uAM+CllXQnaiC1tE1r/8="; - }) - (fetchpatch' { - title = "WIP: networkmanager-sstp: support cross compilation"; - saneCommit = "6de63fe320406ec9a509db721c52b3894a93bda2"; - hash = "sha256-EY3bQuv/80JbpquUJhc89CcYAgN9A9KkpsSitw/684I="; - }) - (fetchpatch' { - title = "WIP: networkmanager-l2tp: support cross compilation"; - saneCommit = "7a4191c570b0e5a1ab257222c26a4a2ecb945037"; - hash = "sha256-FiPJhHGqZ8MFwLY+1t6HgbK6ndomFSYUKvApvrikRHE="; - }) + # (fetchpatch' { + # # not correct: build time dependencies end up in runtime closure + # title = "gcr_4: support cross compilation"; + # saneCommit = "a8c3d69236fa67382a8c18cc1ef0f34610fd3275"; + # hash = "sha256-UnLqkkpXxBKaqlsoD1jUIigZkxgLtNpjmMHOx10HpfE="; + # }) + # these probably work, but i don't use them + # (fetchpatch' { + # title = "networkmanager-openvpn: support cross compilation"; + # saneCommit = "6f53c267fbeb2ff543f075032a7e73af2d4bcb9e"; + # hash = "sha256-gq9AyKH7/k2ZVSZ3jpPJPt3uAM+CllXQnaiC1tE1r/8="; + # }) + # (fetchpatch' { + # title = "WIP: networkmanager-sstp: support cross compilation"; + # saneCommit = "6de63fe320406ec9a509db721c52b3894a93bda2"; + # hash = "sha256-EY3bQuv/80JbpquUJhc89CcYAgN9A9KkpsSitw/684I="; + # }) + # (fetchpatch' { + # title = "WIP: networkmanager-l2tp: support cross compilation"; + # saneCommit = "7a4191c570b0e5a1ab257222c26a4a2ecb945037"; + # hash = "sha256-FiPJhHGqZ8MFwLY+1t6HgbK6ndomFSYUKvApvrikRHE="; + # }) (fetchpatch' { title = "gtkspell2: support cross compilation"; saneCommit = "56348833b4411e9fe2016c24c7fc4af1e3c1d28a"; @@ -312,7 +314,7 @@ in [ hash = "sha256-cGhJSby0K+e1hKPdPZjLFRKvwjGaTbq/kb6Fxj2v8g8="; }) (fetchpatch' { - # TODO: send for review once thie libgnt patch above is merged + # TODO: send for review once the libgnt patch above is merged title = "pidgin: support cross compilation"; saneCommit = "caacbcc54e217f5ee9281422777a7f712765f71a"; hash = "sha256-PDCp4GOm6hWcRob4kz7qXZfxAF6YbYrESx9idoS3e/s="; diff --git a/overlays/cross.nix b/overlays/cross.nix index 90d5d9659..0d31676c4 100644 --- a/overlays/cross.nix +++ b/overlays/cross.nix @@ -1,9 +1,14 @@ +# outstanding issues: +# - 2023/10/10: build python3 is pulled in by many things +# - nix why-depends --all /nix/store/8g3kd2jxifq10726p6317kh8srkdalf5-nixos-system-moby-23.11.20231011.dirty /nix/store/pzf6dnxg8gf04xazzjdwarm7s03cbrgz-python3-3.10.12/bin/python3.10 +# - blueman +# - gstreamer-vaapi -> gstreamer-dev -> glib-dev +# - phog -> gnome-shell +# - portfolio -> {glib,cairo,pygobject}-dev +# - komikku -> python3.10-brotlicffi -> python3.10-cffi +# - many others. python3.10-cffi seems to be the offender which infects 70% of consumers though +# # upstreaming status: -# - playerctl is out for review -# - xdg-utils is out for review -# - xdg-utils is blocked on perl5.36.0-Module-Build -# - needed for File-BaseDir, used by File-MimeInfo -# - File-BaseDir can be updated to v0.09, which cross compiles with ease # # - blueman builds on servo branch # - libgudev builds on servo branch @@ -612,11 +617,19 @@ in { outputs = lib.remove "devdoc" upstream.outputs; }); - # 2023/07/31: upstreaming is unblocked,implemented on servo - # gcr_4 = ( - # # fixes (meson): "ERROR: Program 'gpg2 gpg' not found or not executable" - # mvToNativeInputs [ final.gnupg final.openssh ] prev.gcr_4 - # ); + # 2023/07/31: upstreaming is unblocked + # N.B.: should be able to remove gnupg/ssh from {native}buildInputs when upstreaming + gcr_4 = prev.gcr_4.overrideAttrs (upstream: { + # fixes (meson): "ERROR: Program 'gpg2 gpg' not found or not executable" + mesonFlags = (upstream.mesonFlags or []) ++ [ + "-Dgpg_path=${final.gnupg}/bin/gpg" + ]; + }); + gcr = prev.gcr.overrideAttrs (upstream: { + mesonFlags = (upstream.mesonFlags or []) ++ [ + "-Dgpg_path=${final.gnupg}/bin/gpg" + ]; + }); # gnustep = prev.gnustep.overrideScope' (self: super: { # # gnustep is going to need a *lot* of work/domain-specific knowledge to truly cross-compile, # # base = emulated.gnustep.base;