From da727b72c93b358edc9b80d66971af7fef6ab3d4 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Wed, 20 Apr 2022 14:21:08 +0300 Subject: [PATCH 1/3] mg: fix cross-compilation --- pkgs/applications/editors/mg/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/editors/mg/default.nix b/pkgs/applications/editors/mg/default.nix index c6f014238ea7..8545be13e3b9 100644 --- a/pkgs/applications/editors/mg/default.nix +++ b/pkgs/applications/editors/mg/default.nix @@ -11,6 +11,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-qnb0yB/NNJV257dsLmP84brajoRG03U+Ja1ACYbBvbE="; }; + postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + substituteInPlace configure --replace "./conftest" "echo" + ''; + enableParallelBuilding = true; makeFlags = [ "PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config" ]; From 15427feaeb182675adaada5e8af21a24ef80d292 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Thu, 21 Apr 2022 18:58:31 +0300 Subject: [PATCH 2/3] oksh: fix cross-compilation --- pkgs/shells/oksh/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/shells/oksh/default.nix b/pkgs/shells/oksh/default.nix index 9ea851adbbf6..418a453d9e9a 100644 --- a/pkgs/shells/oksh/default.nix +++ b/pkgs/shells/oksh/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub }: +{ stdenv, lib, fetchFromGitHub, buildPackages }: stdenv.mkDerivation rec { pname = "oksh"; @@ -11,6 +11,12 @@ stdenv.mkDerivation rec { sha256 = "sha256-076nD0aPps6n5qkR3LQJ6Kn2g3mkov+/M0qSvxNLZ6o="; }; + postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + substituteInPlace configure --replace "./conftest" "echo" + ''; + + configureFlags = [ "--no-strip" ]; + meta = with lib; { description = "Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh)"; homepage = "https://github.com/ibara/oksh"; From 4a72aad35692b4a14981cfe9dacbfe9921a53f31 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Thu, 21 Apr 2022 18:59:58 +0300 Subject: [PATCH 3/3] oed: fix cross-compilation --- pkgs/applications/editors/oed/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/applications/editors/oed/default.nix b/pkgs/applications/editors/oed/default.nix index 2281ca8c08b3..f4012220c50d 100644 --- a/pkgs/applications/editors/oed/default.nix +++ b/pkgs/applications/editors/oed/default.nix @@ -14,6 +14,15 @@ stdenv.mkDerivation rec { hash = "sha256-Z8B1RIFve3UPj+9G/WJX0BNc2ynG/qtoGfoesarYGz8="; }; + postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + substituteInPlace configure --replace "./conftest" "echo" + ''; + + installPhase = '' + install -m755 -Dt $out/bin ed + install -m644 -Dt $out/share/man/man1 ed.1 + ''; + meta = with lib; { homepage = "https://github.com/ibara/oed"; description = "Portable ed editor from OpenBSD";