about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/ar/arxiv-latex-cleaner/package.nix
blob: bae622f00fd2b93d4cb596d000d9af6549f40ca2 (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
32
33
34
35
36
37
{ lib
, python3
, python3Packages
, fetchFromGitHub
}:
python3Packages.buildPythonApplication rec {
  pname = "arxiv-latex-cleaner";
  version = "1.0.5";

  src = fetchFromGitHub {
    owner = "google-research";
    repo = "arxiv-latex-cleaner";
    rev = "refs/tags/v${version}";
    hash = "sha256-Yxp8XtlISVZfEjCEJ/EXsIGMCHDPOwPcjkJxECeXvYk=";
  };

  propagatedBuildInputs = with python3Packages; [
    pillow
    pyyaml
    regex
    absl-py
  ];

  checkPhase = ''
    runHook preCheck
    ${python3.interpreter} -m unittest arxiv_latex_cleaner.tests.arxiv_latex_cleaner_test
    runHook postCheck
  '';

  meta = with lib; {
    homepage = "https://github.com/google-research/arxiv-latex-cleaner";
    description = "Easily clean the LaTeX code of your paper to submit to arXiv";
    mainProgram = "arxiv_latex_cleaner";
    license = licenses.asl20;
    maintainers = with maintainers; [ arkivm ];
  };
}