Skip to content

Commit

Permalink
ripmime: link to -liconv for darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
paparodeo committed Oct 26, 2024
1 parent 1889ebd commit cdf1209
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkgs/tools/networking/ripmime/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, libiconv }:
{ lib, stdenv, fetchurl }:

stdenv.mkDerivation rec {
pname = "ripmime";
Expand All @@ -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";
Expand Down

0 comments on commit cdf1209

Please sign in to comment.