Skip to content

Commit

Permalink
linkchecker: 9.3 -> 9.3.1
Browse files Browse the repository at this point in the history
This also uses an older requests version because
linkchecker breaks with requests > 2.14.2.
  • Loading branch information
tw-360vier committed Mar 5, 2018
1 parent 11d6ada commit 93752a8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 30 deletions.
59 changes: 43 additions & 16 deletions pkgs/tools/networking/linkchecker/default.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,50 @@
{ stdenv, lib, fetchurl, python2Packages, gettext }:

{ stdenv, lib, fetchFromGitHub, fetchpatch, python2, gettext }:
let
# pin requests version until next release.
# see: https://github.com/linkcheck/linkchecker/issues/76
python2Packages = (python2.override {
packageOverrides = self: super: {
requests = super.requests.overridePythonAttrs(oldAttrs: rec {
version = "2.14.2";
src = oldAttrs.src.override {
inherit version;
sha256 = "0lyi82a0ijs1m7k9w1mqwbmq1qjsac35fazx7xqyh8ws76xanx52";
};
});
};
}).pkgs;
in
python2Packages.buildPythonApplication rec {
name = "LinkChecker-${version}";
version = "9.3";
pname = "LinkChecker";
version = "9.3.1";

propagatedBuildInputs = (with python2Packages; [
requests
]) ++ [ gettext ];

buildInputs = with python2Packages ; [ pytest ];
propagatedBuildInputs = with python2Packages ; [ requests ] ++ [ gettext ];
checkInputs = with python2Packages; [ pytest ];

src = fetchurl {
url = "mirror://pypi/L/LinkChecker/${name}.tar.gz";
sha256 = "0v8pavf0bx33xnz1kwflv0r7lxxwj7vg3syxhy2wzza0wh6sc2pf";
# the original repository is abandoned, development is now happening here:
src = fetchFromGitHub {
owner = "linkcheck";
repo = "linkchecker";
rev = "v${version}";
sha256 = "080mv4iwvlsfnm7l9basd6i8p4q8990mdhkwick9s6javrbf1r1d";
};

# 1. upstream refuses to support ignoring robots.txt
# 2. work around requests version detection - can be dropped >v9.3
patches = [
./add-no-robots-flag.patch
./no-version-check.patch
];
# 2. fix build: https://github.com/linkcheck/linkchecker/issues/10
patches =
let
fix-setup-py = fetchpatch {
name = "fix-setup-py.patch";
url = https://github.com/linkcheck/linkchecker/commit/e62e630.patch;
sha256 = "046q1whg715w2yv33xx6rkj7fspvvz60cl978ax92lnf8j101czx";
};
in [
./add-no-robots-flag.patch
fix-setup-py
];

postInstall = ''
rm $out/bin/linkchecker-gui
Expand All @@ -35,8 +62,8 @@ python2Packages.buildPythonApplication rec {

meta = {
description = "Check websites for broken links";
homepage = https://wummel.github.io/linkchecker/;
homepage = https://linkcheck.github.io/linkchecker/;
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ peterhoeg ];
maintainers = with lib.maintainers; [ peterhoeg tweber ];
};
}
14 changes: 0 additions & 14 deletions pkgs/tools/networking/linkchecker/no-version-check.patch

This file was deleted.

0 comments on commit 93752a8

Please sign in to comment.