fix for cross-compile

This commit is contained in:
Kaz Wesley 2021-10-07 21:41:28 -07:00
parent fb85a3fe9e
commit c3737f28f2

View File

@ -40,25 +40,28 @@ let
stateDir = "/var/lib/dovecot"; stateDir = "/var/lib/dovecot";
pipeBin = pkgs.stdenv.mkDerivation { pipeBin_ = { makeWrapper, coreutils, bash, rspamd }:
name = "pipe_bin"; pkgs.stdenv.mkDerivation {
src = ./dovecot/pipe_bin; name = "pipe_bin";
buildInputs = with pkgs; [ makeWrapper coreutils bash rspamd ]; src = ./dovecot/pipe_bin;
buildCommand = '' nativeBuildInputs = [ makeWrapper ];
mkdir -p $out/pipe/bin buildInputs = [ coreutils bash rspamd ];
cp $src/* $out/pipe/bin/ buildCommand = ''
chmod a+x $out/pipe/bin/* mkdir -p $out/pipe/bin
patchShebangs $out/pipe/bin cp $src/* $out/pipe/bin/
chmod a+x $out/pipe/bin/*
patchShebangs $out/pipe/bin
for file in $out/pipe/bin/*; do for file in $out/pipe/bin/*; do
wrapProgram $file \ wrapProgram $file \
--set PATH "${pkgs.coreutils}/bin:${pkgs.rspamd}/bin" --set PATH "${coreutils}/bin:${rspamd}/bin"
done done
''; '';
}; };
pipeBin = pkgs.callPackage pipeBin_ { };
genPasswdScript = pkgs.writeScript "generate-password-file" '' genPasswdScript = pkgs.writeScript "generate-password-file" ''
#!${pkgs.stdenv.shell} #!${pkgs.runtimeShell}
set -euo pipefail set -euo pipefail