summary refs log tree commit diff
path: root/pkgs/tools/networking/jwhois/default.nix
diff options
context:
space:
mode:
authorSusan Potter <me@susanpotter.net>2015-07-08 00:33:00 -0500
committerVladimír Čunát <vcunat@gmail.com>2015-07-30 15:52:28 +0200
commita9e2cf0af3b885a703d176761b06eb72ae8d5bad (patch)
tree93bafe10bc9e9b7fa503043cb262c69607103263 /pkgs/tools/networking/jwhois/default.nix
parent25334ab40a62cf559125b0f6e8bc9d3df306af0c (diff)
downloadnixpkgs-a9e2cf0af3b885a703d176761b06eb72ae8d5bad.tar
nixpkgs-a9e2cf0af3b885a703d176761b06eb72ae8d5bad.tar.gz
nixpkgs-a9e2cf0af3b885a703d176761b06eb72ae8d5bad.tar.bz2
nixpkgs-a9e2cf0af3b885a703d176761b06eb72ae8d5bad.tar.lz
nixpkgs-a9e2cf0af3b885a703d176761b06eb72ae8d5bad.tar.xz
nixpkgs-a9e2cf0af3b885a703d176761b06eb72ae8d5bad.tar.zst
nixpkgs-a9e2cf0af3b885a703d176761b06eb72ae8d5bad.zip
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
Diffstat (limited to 'pkgs/tools/networking/jwhois/default.nix')
-rw-r--r--pkgs/tools/networking/jwhois/default.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/tools/networking/jwhois/default.nix b/pkgs/tools/networking/jwhois/default.nix
index 67b93a1fa90..2a2e444f5b2 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 ];