Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jwhois: fix path to lynx in $lynx/etc/jwhois.conf #8696

Closed
wants to merge 1 commit into from

Conversation

mbbx6spp
Copy link
Contributor

@mbbx6spp mbbx6spp commented Jul 8, 2015

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

Should return with exit code 0.

@mbbx6spp mbbx6spp changed the title jwhois: fix path to lynx in /etc/jwhois.conf jwhois: fix path to lynx in $lynx/etc/jwhois.conf Jul 8, 2015

stdenv.mkDerivation {
name = "jwhois-4.0";


lynx = pkgs.lynx;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you pass lynx as an argument instead of pkgs you do not need this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks fixed in latest.

@mbbx6spp mbbx6spp force-pushed the fix-whois branch 2 times, most recently from 9eefa4e to 20c9110 Compare July 11, 2015 13:53
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to nitpick, but you can use

sed -i -e "s|/usr/bin/lynx|${lynx}/bin/lynx|g" $out/etc/jwhois.conf

(not the curly braces). That way you do not need inherit lynx; and the specification of the build inputs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks I didn't know about that gem. Updated PR. Thanks.

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
@vcunat
Copy link
Member

vcunat commented Jul 30, 2015

Pushed. Such a simple fix lying here so long.

@vcunat vcunat closed this in a9e2cf0 Jul 30, 2015
vcunat pushed a commit that referenced this pull request Jul 30, 2015
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

(cherry picked from commit a9e2cf0)
adrianpk added a commit to adrianpk/nixpkgs that referenced this pull request May 31, 2024
Close NixOS#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

(cherry picked from commit a9e2cf0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants