ripmime: link to -liconv for darwin

This commit is contained in:
Reno Dakota 2024-10-26 12:35:31 +00:00
parent 1889ebd947
commit cdf12090ba
No known key found for this signature in database

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, libiconv }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "ripmime";
@ -8,13 +8,16 @@ stdenv.mkDerivation rec {
sha256 = "0sj06ibmlzy34n8v0mnlq2gwidy7n2aqcwgjh0xssz3vi941aqc9";
};
buildInputs = [ libiconv ];
preInstall = ''
sed -i Makefile -e "s@LOCATION=.*@LOCATION=$out@" -e "s@man/man1@share/&@"
mkdir -p "$out/bin" "$out/share/man/man1"
'';
env.NIX_CFLAGS_COMPILE = " -Wno-error ";
env = {
NIX_CFLAGS_COMPILE = " -Wno-error ";
} // lib.optionalAttrs stdenv.hostPlatform.isDarwin {
NIX_LDFLAGS = "-liconv";
};
meta = with lib; {
description = "Attachment extractor for MIME messages";