Merge pull request #169428 from sikmir/mg

mg,oed,oksh: fix cross-compilation
This commit is contained in:
Rick van Schijndel 2022-04-23 14:18:15 +02:00 committed by GitHub
commit 02501af301
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 1 deletions

View file

@ -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" ];

View file

@ -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";

View file

@ -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";