]>
Commit | Line | Data |
---|---|---|
92b11a10 | 1 | { pkgs ? import <nixpkgs> { }, lint ? false }: |
1e512629 SW |
2 | pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, makeWrapper |
3 | , autopep8, mypy, pylint, beautifulsoup4, requests, requests-cache | |
4 | , types-beautifulsoup4, types-requests, xdg-base-dirs, pandoc-cli }: | |
92b11a10 SW |
5 | buildPythonPackage rec { |
6 | pname = "paperdoorknob"; | |
7 | version = "0.0.1"; | |
8 | src = lib.cleanSource ./.; | |
1e512629 | 9 | nativeBuildInputs = [ makeWrapper ]; |
136277e3 SW |
10 | propagatedBuildInputs = |
11 | [ beautifulsoup4 requests requests-cache xdg-base-dirs ]; | |
36ae1d5f | 12 | nativeCheckInputs = [ mypy pandoc-cli types-beautifulsoup4 types-requests ] |
b25a2f90 | 13 | ++ lib.optionals lint [ autopep8 pylint ]; |
92b11a10 SW |
14 | doCheck = true; |
15 | checkPhase = "./test.sh"; | |
1e512629 SW |
16 | postInstall = '' |
17 | wrapProgram "$out/bin/paperdoorknob" \ | |
18 | --add-flags "--pandoc=${pandoc-cli}/bin/pandoc" \ | |
19 | ||
20 | ''; | |
92b11a10 SW |
21 | meta = { |
22 | description = "A polite glowfic → printable book scraper."; | |
23 | homepage = "https://git.scottworley.com/paperdoorknob"; | |
24 | license = pkgs.lib.licenses.gpl3; | |
25 | maintainers = with pkgs.lib.maintainers; [ chkno ]; | |
26 | }; | |
1e512629 | 27 | }) { inherit (pkgs.haskellPackages) pandoc-cli; } |