From 55e90f531b1d8970a1028b66d1dc73f04bc1712a Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 25 Jun 2023 18:04:19 +0000 Subject: [PATCH] mepo: enable cross compilation (via emulation) --- nixpatches/list.nix | 6 ++++++ overlays/cross.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/nixpatches/list.nix b/nixpatches/list.nix index 52f8a67d..30d16047 100644 --- a/nixpatches/list.nix +++ b/nixpatches/list.nix @@ -170,6 +170,12 @@ in [ hash = "sha256-m++Vv/FK7cxONCz6n0MLO3CiKNrRH0ttFmoC1Xmba+A="; }) + (fetchpatch' { + title = "mepo: 1.1 -> 1.1.2"; + saneCommit = "eee68d7146a6cd985481cdd8bca52ffb204de423"; + hash = "sha256-0lNSgq8ahSvQDEpuF0lyblA8cB9ulv1zGasHo6lUWAU="; + }) + # (fetchpatch' { # # N.B.: compiles, but runtime error on launch suggestive of some module not being shipped # title = "matrix-appservice-irc: 0.38.0 -> 1.0.0"; diff --git a/overlays/cross.nix b/overlays/cross.nix index e82581e0..4c660b13 100644 --- a/overlays/cross.nix +++ b/overlays/cross.nix @@ -83,6 +83,7 @@ in { jellyfin-web # in node-dependencies-jellyfin-web: "node: command not found" (nodePackages don't cross compile) # libgccjit # "../../gcc-9.5.0/gcc/jit/jit-result.c:52:3: error: 'dlclose' was not declared in this scope" (needed by emacs!) # libsForQt5 # if we emulate qt5, we're better off emulating libsForQt5 else qt complains about multiple versions of qtbase + mepo # /build/source/src/sdlshim.zig:1:20: error: C import failed perlInterpreters # perl5.36.0-Module-Build perl5.36.0-Test-utf8 (see tracking issues ^) # qgnomeplatform # qtbase @@ -521,6 +522,11 @@ in { # fixes -msse2, -mfpmath=ssh flags AND "Settings schema 'org.gtk.gtk4.Settings.FileChooser' is not installed" wrapGAppsHook4 = emulated.wrapGAppsHook4; }; + + zenity = super.zenity.override { + # fixes -msse2, -mfpmath=sse flags + wrapGAppsHook4 = final.wrapGAppsHook; + }; }); gnome2 = prev.gnome2.overrideScope' (self: super: { @@ -739,6 +745,33 @@ in { # callPackage = self.newScope { inherit (self) qtCompatVersion qtModule srcs; inherit (final) stdenv; }; # }); + # mepo = (prev.mepo.override { + # inherit (emulated) + # stdenv + # SDL2 + # SDL2_gfx + # SDL2_image + # SDL2_ttf + # zig + # ; + # }).overrideAttrs (_upstream: { + # doCheck = false; + # # dontConfigure = true; + # # dontBuild = true; + # # preInstall = '' + # # export HOME=$TMPDIR + # # ''; + # # installPhase = '' + # # runHook preInstall + + # # zig build -Drelease-safe=true -Dtarget=aarch64-linux-gnu -Dcpu=baseline --prefix $out + # # install -d $out/share/man/man1 + # # $out/bin/mepo -docman > $out/share/man/man1/mepo.1 + + # # runHook postInstall + # # ''; + # }); + # fixes: "ar: command not found" # `ar` is provided by bintools ncftp = addNativeInputs [ final.bintools ] prev.ncftp;