diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2022-08-18 11:12:44 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2022-08-18 11:12:44 +0100 |
commit | 69ce8a09493860112ed0447023418a82132977f0 (patch) | |
tree | 8696a979e17af0c9ec8a28609ba654b562efcd77 /pkgs/applications/file-managers/mc | |
parent | 55328741511aee080912eafd94c1db82332d6c8a (diff) |
mc, pkgsCross.ppc64.mc: fixx cross-build by adding PERL_FOR_BUILD
Without the change build system tries to execute perl for host (instead of build) and fails as: install: cannot stat './mc.hlp.es': No such file or directory The change pulls patch pending upstream inclusion where `PERL_FOR_BUILD` is introduced to complement `PERL` for such cases.
Diffstat (limited to 'pkgs/applications/file-managers/mc')
-rw-r--r-- | pkgs/applications/file-managers/mc/default.nix | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/applications/file-managers/mc/default.nix b/pkgs/applications/file-managers/mc/default.nix index 6f80c2c5e928d..0153b8fe93c6d 100644 --- a/pkgs/applications/file-managers/mc/default.nix +++ b/pkgs/applications/file-managers/mc/default.nix @@ -1,5 +1,6 @@ { lib, stdenv , fetchurl +, buildPackages , pkg-config , glib , gpm @@ -31,6 +32,15 @@ stdenv.mkDerivation rec { sha256 = "sha256-6ZTZvppxcumsSkrWIQeSH2qjEuZosFbf5bi867r1OAM="; }; + patches = [ + # Add support for PERL_FOR_BUILD to fix cross-compilation: + # https://midnight-commander.org/ticket/4399 + (fetchurl { + url = "https://midnight-commander.org/raw-attachment/ticket/4399/0001-configure.ac-introduce-PERL_FOR_BUILD.patch"; + hash = "sha256-i4cbg/pner+yPfgmP04DEIvpNDlM9YDca1TNBdhWhwI="; + }) + ]; + nativeBuildInputs = [ pkg-config autoreconfHook unzip ] # The preFixup hook rewrites the binary, which invaliates the code # signature. Add the fixup hook to sign the output. @@ -52,7 +62,12 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - configureFlags = [ "PERL=${perl}/bin/perl" ]; + configureFlags = [ + # used for vfs helpers at run time: + "PERL=${perl}/bin/perl" + # used for .hlp generation at build time: + "PERL_FOR_BUILD=${buildPackages.perl}/bin/perl" + ]; postPatch = '' substituteInPlace src/filemanager/ext.c \ |