]> git.scottworley.com Git - paperdoorknob/blobdiff - default.nix
Force line breaks between icon, character, screen name, and author
[paperdoorknob] / default.nix
index 69a71496916a7533de4260f0c2beaa9ec1915db2..c27c9e63ad0e21154daadcc17997e2a6a428d93e 100644 (file)
@@ -1,19 +1,29 @@
 { pkgs ? import <nixpkgs> { }, lint ? false }:
 { pkgs ? import <nixpkgs> { }, lint ? false }:
-pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, autopep8, mypy
-  , pylint, requests, requests-cache, types-requests, xdg-base-dirs }:
+pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, makeWrapper
+  , autopep8, mypy, pylint, beautifulsoup4, requests, requests-cache
+  , texliveFull, types-beautifulsoup4, types-requests, xdg-base-dirs
+  , pandoc-cli }:
   buildPythonPackage rec {
     pname = "paperdoorknob";
     version = "0.0.1";
     src = lib.cleanSource ./.;
   buildPythonPackage rec {
     pname = "paperdoorknob";
     version = "0.0.1";
     src = lib.cleanSource ./.;
-    propagatedBuildInputs = [ requests requests-cache xdg-base-dirs ];
-    nativeCheckInputs = [ mypy types-requests ]
+    nativeBuildInputs = [ makeWrapper ];
+    propagatedBuildInputs =
+      [ beautifulsoup4 requests requests-cache xdg-base-dirs ];
+    nativeCheckInputs =
+      [ mypy pandoc-cli texliveFull types-beautifulsoup4 types-requests ]
       ++ lib.optionals lint [ autopep8 pylint ];
     doCheck = true;
     checkPhase = "./test.sh";
       ++ lib.optionals lint [ autopep8 pylint ];
     doCheck = true;
     checkPhase = "./test.sh";
+    postInstall = ''
+      wrapProgram "$out/bin/paperdoorknob" \
+        --add-flags "--pandoc=${pandoc-cli}/bin/pandoc" \
+
+    '';
     meta = {
       description = "A polite glowfic → printable book scraper.";
       homepage = "https://git.scottworley.com/paperdoorknob";
       license = pkgs.lib.licenses.gpl3;
       maintainers = with pkgs.lib.maintainers; [ chkno ];
     };
     meta = {
       description = "A polite glowfic → printable book scraper.";
       homepage = "https://git.scottworley.com/paperdoorknob";
       license = pkgs.lib.licenses.gpl3;
       maintainers = with pkgs.lib.maintainers; [ chkno ];
     };
-  }) { }
+  }) { inherit (pkgs.haskellPackages) pandoc-cli; }