summary refs log tree commit diff
path: root/pkgs/tools/networking/linkchecker/default.nix
diff options
context:
space:
mode:
authorPeter Hoeg <peter@speartail.com>2016-05-26 17:20:30 +0800
committerPeter Hoeg <peter@speartail.com>2016-05-27 15:07:05 +0800
commitc1ffbd8ee887f7dfb17c2a5d9249929e3672b935 (patch)
treec00b8acd7907780bc185eb10cb7536037bf05789 /pkgs/tools/networking/linkchecker/default.nix
parentc3bb94e7d13b11222ad741c643ea8ce459344ed2 (diff)
downloadnixpkgs-c1ffbd8ee887f7dfb17c2a5d9249929e3672b935.tar
nixpkgs-c1ffbd8ee887f7dfb17c2a5d9249929e3672b935.tar.gz
nixpkgs-c1ffbd8ee887f7dfb17c2a5d9249929e3672b935.tar.bz2
nixpkgs-c1ffbd8ee887f7dfb17c2a5d9249929e3672b935.tar.lz
nixpkgs-c1ffbd8ee887f7dfb17c2a5d9249929e3672b935.tar.xz
nixpkgs-c1ffbd8ee887f7dfb17c2a5d9249929e3672b935.tar.zst
nixpkgs-c1ffbd8ee887f7dfb17c2a5d9249929e3672b935.zip
linkchecker: init at 9.3
A few changes from upstream:

 1) the executable is patched to support a --no-robots flag to ignore
    robots.txto

 2) the GUI doesn't work (for now), so this is CLI only
Diffstat (limited to 'pkgs/tools/networking/linkchecker/default.nix')
-rw-r--r--pkgs/tools/networking/linkchecker/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/tools/networking/linkchecker/default.nix b/pkgs/tools/networking/linkchecker/default.nix
new file mode 100644
index 00000000000..79566f12901
--- /dev/null
+++ b/pkgs/tools/networking/linkchecker/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, fetchurl, python2Packages }:
+
+python2Packages.buildPythonApplication rec {
+  name = "LinkChecker-${version}";
+  version = "9.3";
+
+  # LinkChecker 9.3 only works with requests 2.9.x
+  propagatedBuildInputs = with python2Packages ; [ requests2 ]; 
+
+  src = fetchurl {
+    url = "mirror://pypi/L/LinkChecker/${name}.tar.gz";
+    sha256 = "0v8pavf0bx33xnz1kwflv0r7lxxwj7vg3syxhy2wzza0wh6sc2pf";
+  };
+
+  # upstream refuses to support ignoring robots.txt
+  patches = [
+    ./add-no-robots-flag.patch
+  ];
+
+  postInstall = ''
+    rm $out/bin/linkchecker-gui
+  '';
+
+  meta = {
+    description = "Check websites for broken links";
+    homepage = "https://wummel.github.io/linkchecker/";
+    license = lib.licenses.gpl2;
+    maintainers = with lib.maintainers; [ peterhoeg ];
+  };
+}