Loading pkgs/development/python-modules/ghostscript/default.nix 0 → 100644 +63 −0 Original line number Diff line number Diff line { stdenv, lib, buildPythonPackage, fetchFromGitLab, pytestCheckHook, setuptools, ghostscript_headless, }: buildPythonPackage rec { pname = "ghostscript"; version = "0.7"; pyproject = true; src = fetchFromGitLab { owner = "pdftools"; repo = "python-ghostscript"; tag = "v${version}"; hash = "sha256-yBJuAnLK/4YDU9PBsSWPQay4pDws3bP+3rCplysq41w="; }; postPatch = let extLib = stdenv.hostPlatform.extensions.sharedLibrary; in '' substituteInPlace ghostscript/__init__.py \ --replace-fail '__version__ = gs.__version__' '__version__ = "${version}"' substituteInPlace ghostscript/_gsprint.py \ --replace-fail 'cdll.LoadLibrary("libgs.so")' 'cdll.LoadLibrary("${lib.getLib ghostscript_headless}/lib/libgs${extLib}")' ''; build-system = [ setuptools ]; nativeCheckInputs = [ pytestCheckHook ]; disabledTests = [ # Some tests don't (fully) match anymore. # Not sure if ghostscript ever promised to keep producing the same outputs, bit-by-bit… "test_simple" "test_unicode_arguments" "test_run_string" "test_stdin" ]; pythonImportsCheck = [ "ghostscript" ]; meta = { description = "Interface to the Ghostscript C-API using ctypes."; homepage = "https://gitlab.com/pdftools/python-ghostscript"; changelog = "https://gitlab.com/pdftools/python-ghostscript/-/blob/v${version}/CHANGES.txt"; license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ flokli ]; }; } pkgs/development/python-modules/img2pdf/default.nix +2 −2 Original line number Diff line number Diff line { lib, pkgs, buildPythonPackage, fetchFromGitea, fetchpatch, Loading @@ -10,7 +11,6 @@ pillow, stdenv, exiftool, ghostscript, imagemagick, mupdf-headless, netpbm, Loading Loading @@ -67,7 +67,7 @@ buildPythonPackage rec { nativeCheckInputs = [ exiftool ghostscript pkgs.ghostscript imagemagick mupdf-headless netpbm Loading pkgs/development/python-modules/pdfplumber/default.nix +2 −2 Original line number Diff line number Diff line { lib, pkgs, buildPythonPackage, fetchFromGitHub, ghostscript, jupyterlab, nbexec, pandas, Loading Loading @@ -42,7 +42,7 @@ buildPythonPackage rec { ''; nativeCheckInputs = [ ghostscript pkgs.ghostscript jupyterlab nbexec pandas Loading pkgs/development/python-modules/pydyf/default.nix +2 −2 Original line number Diff line number Diff line { pkgs, lib, buildPythonPackage, fetchPypi, flit-core, ghostscript, pillow, pytestCheckHook, pytest-cov-stub, Loading @@ -30,7 +30,7 @@ buildPythonPackage rec { nativeBuildInputs = [ flit-core ]; nativeCheckInputs = [ ghostscript pkgs.ghostscript pillow pytestCheckHook pytest-cov-stub Loading pkgs/development/python-modules/weasyprint/default.nix +4 −4 Original line number Diff line number Diff line { stdenv, lib, pkgs, buildPythonPackage, cffi, cssselect2, Loading @@ -6,10 +9,8 @@ flit-core, fontconfig, fonttools, ghostscript, glib, harfbuzz, lib, pango, pillow, pydyf, Loading @@ -18,7 +19,6 @@ pytestCheckHook, pythonOlder, replaceVars, stdenv, tinycss2, tinyhtml5, }: Loading Loading @@ -61,7 +61,7 @@ buildPythonPackage rec { ] ++ fonttools.optional-dependencies.woff; nativeCheckInputs = [ ghostscript pkgs.ghostscript pytest-cov-stub pytestCheckHook ]; Loading Loading
pkgs/development/python-modules/ghostscript/default.nix 0 → 100644 +63 −0 Original line number Diff line number Diff line { stdenv, lib, buildPythonPackage, fetchFromGitLab, pytestCheckHook, setuptools, ghostscript_headless, }: buildPythonPackage rec { pname = "ghostscript"; version = "0.7"; pyproject = true; src = fetchFromGitLab { owner = "pdftools"; repo = "python-ghostscript"; tag = "v${version}"; hash = "sha256-yBJuAnLK/4YDU9PBsSWPQay4pDws3bP+3rCplysq41w="; }; postPatch = let extLib = stdenv.hostPlatform.extensions.sharedLibrary; in '' substituteInPlace ghostscript/__init__.py \ --replace-fail '__version__ = gs.__version__' '__version__ = "${version}"' substituteInPlace ghostscript/_gsprint.py \ --replace-fail 'cdll.LoadLibrary("libgs.so")' 'cdll.LoadLibrary("${lib.getLib ghostscript_headless}/lib/libgs${extLib}")' ''; build-system = [ setuptools ]; nativeCheckInputs = [ pytestCheckHook ]; disabledTests = [ # Some tests don't (fully) match anymore. # Not sure if ghostscript ever promised to keep producing the same outputs, bit-by-bit… "test_simple" "test_unicode_arguments" "test_run_string" "test_stdin" ]; pythonImportsCheck = [ "ghostscript" ]; meta = { description = "Interface to the Ghostscript C-API using ctypes."; homepage = "https://gitlab.com/pdftools/python-ghostscript"; changelog = "https://gitlab.com/pdftools/python-ghostscript/-/blob/v${version}/CHANGES.txt"; license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ flokli ]; }; }
pkgs/development/python-modules/img2pdf/default.nix +2 −2 Original line number Diff line number Diff line { lib, pkgs, buildPythonPackage, fetchFromGitea, fetchpatch, Loading @@ -10,7 +11,6 @@ pillow, stdenv, exiftool, ghostscript, imagemagick, mupdf-headless, netpbm, Loading Loading @@ -67,7 +67,7 @@ buildPythonPackage rec { nativeCheckInputs = [ exiftool ghostscript pkgs.ghostscript imagemagick mupdf-headless netpbm Loading
pkgs/development/python-modules/pdfplumber/default.nix +2 −2 Original line number Diff line number Diff line { lib, pkgs, buildPythonPackage, fetchFromGitHub, ghostscript, jupyterlab, nbexec, pandas, Loading Loading @@ -42,7 +42,7 @@ buildPythonPackage rec { ''; nativeCheckInputs = [ ghostscript pkgs.ghostscript jupyterlab nbexec pandas Loading
pkgs/development/python-modules/pydyf/default.nix +2 −2 Original line number Diff line number Diff line { pkgs, lib, buildPythonPackage, fetchPypi, flit-core, ghostscript, pillow, pytestCheckHook, pytest-cov-stub, Loading @@ -30,7 +30,7 @@ buildPythonPackage rec { nativeBuildInputs = [ flit-core ]; nativeCheckInputs = [ ghostscript pkgs.ghostscript pillow pytestCheckHook pytest-cov-stub Loading
pkgs/development/python-modules/weasyprint/default.nix +4 −4 Original line number Diff line number Diff line { stdenv, lib, pkgs, buildPythonPackage, cffi, cssselect2, Loading @@ -6,10 +9,8 @@ flit-core, fontconfig, fonttools, ghostscript, glib, harfbuzz, lib, pango, pillow, pydyf, Loading @@ -18,7 +19,6 @@ pytestCheckHook, pythonOlder, replaceVars, stdenv, tinycss2, tinyhtml5, }: Loading Loading @@ -61,7 +61,7 @@ buildPythonPackage rec { ] ++ fonttools.optional-dependencies.woff; nativeCheckInputs = [ ghostscript pkgs.ghostscript pytest-cov-stub pytestCheckHook ]; Loading