mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-13 03:37:26 +00:00
procmail: support cross compilation
This commit is contained in:
parent
38905fc7ee
commit
e70105cf83
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl, fetchpatch }:
|
||||
{ lib, stdenv, fetchurl, fetchpatch, buildPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "procmail";
|
||||
@ -30,8 +30,19 @@ stdenv.mkDerivation rec {
|
||||
sed -e "3i\
|
||||
.PHONY: install
|
||||
" -i Makefile
|
||||
'' + lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
substituteInPlace src/Makefile.0 \
|
||||
--replace-fail '@./_autotst' '@${stdenv.hostPlatform.emulator buildPackages} ./_autotst'
|
||||
sed -e '3i\
|
||||
_autotst() { ${stdenv.hostPlatform.emulator buildPackages} ./_autotst "$@"; } \
|
||||
_locktst() { ${stdenv.hostPlatform.emulator buildPackages} ./_locktst "$@"; } \
|
||||
' -i src/autoconf
|
||||
'';
|
||||
|
||||
# default target is binaries + manpages; manpages don't cross compile without more work.
|
||||
makeFlags = lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ "bins" ];
|
||||
installTargets = lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ "install.bin" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mail processing and filtering utility";
|
||||
homepage = "https://github.com/BuGlessRB/procmail/";
|
||||
|
Loading…
Reference in New Issue
Block a user