Unverified Commit cdf12090 authored by Reno Dakota's avatar Reno Dakota
Browse files

ripmime: link to -liconv for darwin

parent 1889ebd9
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
{ 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";