about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/wayback-machine-archiver/default.nix
blob: 71c0b63ad8e9e50051c3c07fb2b84142613d5723 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, python3, fetchFromGitHub }:

python3.pkgs.buildPythonApplication rec {
  pname = "wayback-machine-archiver";
  version = "1.9.1";

  src = fetchFromGitHub {
    owner = "agude";
    repo = "wayback-machine-archiver";
    rev = "v${version}";
    sha256 = "0dnnqx507gpj8wsx6f2ivfmha969ydayiqsvxh23p9qcixw9257x";
  };

  nativeBuildInputs = with python3.pkgs; [ pypandoc ];
  propagatedBuildInputs = with python3.pkgs; [ requests ];
  nativeCheckInputs = with python3.pkgs; [ pytestCheckHook requests-mock ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace \"pytest-runner\", ""
  '';

  pythonImportsCheck = [ "wayback_machine_archiver" ];

  meta = with lib; {
    description = "A Python script to submit web pages to the Wayback Machine for archiving";
    homepage = "https://github.com/agude/wayback-machine-archiver";
    license = licenses.mit;
    maintainers = with maintainers; [ dandellion ];
  };
}