Skip to content

Instantly share code, notes, and snippets.

@thefloweringash
Created March 15, 2018 16:39
Show Gist options
  • Save thefloweringash/c5ea73d131d8292cf4815c445135801e to your computer and use it in GitHub Desktop.
Save thefloweringash/c5ea73d131d8292cf4815c445135801e to your computer and use it in GitHub Desktop.
diff --git a/pkgs/tools/networking/whois/default.nix b/pkgs/tools/networking/whois/default.nix
index 6f37e88f4f6..abd358339b1 100644
--- a/pkgs/tools/networking/whois/default.nix
+++ b/pkgs/tools/networking/whois/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
substituteInPlace $i --replace "prefix = /usr" "prefix = $out"
done
- substituteInPlace Makefile --replace "DEFS += HAVE_ICONV" "DEFS += HAVE_ICONV\nwhois_LDADD += -liconv"
+ substituteInPlace Makefile --replace "DEFS += -DHAVE_ICONV" "$(printf "%s\n%s" "DEFS += -DHAVE_ICONV" "whois_LDADD += -liconv")"
'';
makeFlags = [ "HAVE_ICONV=1" ];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment