Conversation
|
|
||
| buildInputs = [ pytest pytest_xdist pytestcov setuptools_scm pytest-helpers-namespace pytestrunner glibcLocales ]; | ||
|
|
||
| doCheck = false; |
There was a problem hiding this comment.
Skipping tests might be fine but please add a comment why you are skipping them.
| meta = with stdenv.lib; { | ||
| homepage = https://gitlab.mister-muffin.de/josch/img2pdf; | ||
| description = "Losslessly convert raster images to PDF. "; | ||
| license = lib.licenses.lgpl3; |
There was a problem hiding this comment.
Since you are using with stdenv.lib; lib is already scoped and this could be shortened to license = licenses.lgpl3;.
| homepage = https://gitlab.mister-muffin.de/josch/img2pdf; | ||
| description = "Losslessly convert raster images to PDF. "; | ||
| license = lib.licenses.lgpl3; | ||
| maintainers = with lib.maintainers; [ hyper_ch ]; |
There was a problem hiding this comment.
Same here. Could be with maintainers.
pkgs/top-level/all-packages.nix
Outdated
|
|
||
| notion = callPackage ../applications/window-managers/notion { }; | ||
|
|
||
| ocrmypdf = callPackage ../applications/graphics/ocrmypdf { }; |
There was a problem hiding this comment.
It is better to use pythonPackages.callPackage, and list python dependencies in the arguments of the function that returns the derivation.
| @@ -0,0 +1,23 @@ | |||
| { stdenv, lib, buildPythonPackage, fetchPypi, isPyPy, python3, pytest }: | |||
|
|
|||
| with python3.pkgs; | |||
There was a problem hiding this comment.
Its better to list all dependencies in the function that returns the derivation.
| @@ -0,0 +1,23 @@ | |||
| { stdenv, lib, buildPythonPackage, fetchPypi, isPyPy, python3, pytest }: | |||
There was a problem hiding this comment.
Don't pass python versions explicitly when called from pythonPackages.
| @@ -0,0 +1,58 @@ | |||
| { stdenv, lib, buildPythonPackage, fetchFromGitHub, fetchPypi, isPyPy, python3, pytest, zlib }: | |||
There was a problem hiding this comment.
Don't pass python versions explicitly when called from pythonPackages.
| buildPythonPackage rec { | ||
| pname = "pdfrw"; | ||
| version = "0.4"; | ||
| name = "${pname}-${version}"; |
There was a problem hiding this comment.
Since a while back python packages default to name = pname + "-" + version; so this line is not necessary if pname and version are defined.
| meta = with stdenv.lib; { | ||
| homepage = https://github.com/pmaupin/pdfrw; | ||
| description = "Python library and utility that reads and writes PDF files."; | ||
| license = lib.licenses.mit; |
There was a problem hiding this comment.
Same here, could be simplified.
| sha256 = "0qah7rzf9p1l8sj0z19lfyb9dqdwv9a9b4sybv8r2g810bc2i1yp"; | ||
| }; | ||
|
|
||
| propagatedBuildInputs = [ ]; |
There was a problem hiding this comment.
You could just skip these empty attributes.
|
Please split this into one commit per new package following the nixpkgs commit message template |
| PYTHONPATH="$PYTHONPATH:tests" py.test tests | ||
| ''; | ||
|
|
||
| buildInputs = [ pytest ]; |
| sha256 = "1x1yp63lg3jxpg9igw8lh5rc51q353ifsa1bailb4qb51r54kh0d"; | ||
| }; | ||
|
|
||
| static_pdfs = fetchFromGitHub { |
There was a problem hiding this comment.
this should be in a let expression outside buildPythonPackage
|
|
||
| checkPhase = '' | ||
| # Copy over the test pdfs and stuff to the building directory | ||
| cp -r $static_pdfs/* "./tests/static_pdfs" |
| sha256 = "0ihajp4k8vhc4njq7qsh1b22sy09sdwx5ad53x42lr7xfl76m1jy"; | ||
| }; | ||
|
|
||
| buildInputs = [ pytest ]; |
|
@GrahamcOfBorg eval |
|
@sjau Eval is failing because you did not add yourself to the maintainers list in https://github.com/NixOS/nixpkgs/blob/master/lib/maintainers.nix |
Motivation for this change
Adding a cli-based ocr tool for scanned pfds.
Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)