From a9e2cf0af3b885a703d176761b06eb72ae8d5bad Mon Sep 17 00:00:00 2001 From: Susan Potter Date: Wed, 8 Jul 2015 00:33:00 -0500 Subject: [PATCH] jwhois: fix path to lynx in $lynx/etc/jwhois.conf Close #8696. Fixes issues found when jwhois attempts to launch terminal browser (lynx) for HTTP whois queries, for example: $ whois blah.io [Querying http://www.io.io/cgi-bin/whois] [HTTP: Unable to run web browser: /usr/bin/lynx: No such file or directory] Tested via: grep lynx \ /nix/store/bymgmn2vvw1n7nbb1isy87xg94s8f2ml-jwhois-4.0/etc/jwhois.conf \ | cut -f2 -d'"' \ | xargs stat -t --- pkgs/tools/networking/jwhois/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/jwhois/default.nix b/pkgs/tools/networking/jwhois/default.nix index 67b93a1fa901..2a2e444f5b24 100644 --- a/pkgs/tools/networking/jwhois/default.nix +++ b/pkgs/tools/networking/jwhois/default.nix @@ -1,14 +1,17 @@ -{stdenv, fetchurl}: +{stdenv, lynx, fetchurl}: stdenv.mkDerivation { name = "jwhois-4.0"; - + src = fetchurl { url = mirror://gnu/jwhois/jwhois-4.0.tar.gz; sha256 = "0knn7iaj5v0n6jpmldyv2yk4bcy9dn3kywmv63bwc5drh9kvi6zs"; }; - postInstall = "ln -s jwhois $out/bin/whois"; + postInstall = '' + ln -s jwhois $out/bin/whois + sed -i -e "s|/usr/bin/lynx|${lynx}/bin/lynx|g" $out/etc/jwhois.conf + ''; patches = [ ./connect.patch ];