diff --git a/pkgs/development/python-modules/poppler-qt5/default.nix b/pkgs/development/python-modules/poppler-qt5/default.nix new file mode 100644 index 00000000000..0ae689034a3 --- /dev/null +++ b/pkgs/development/python-modules/poppler-qt5/default.nix @@ -0,0 +1,42 @@ +{ buildPythonPackage, fetchPypi, stdenv, sip, qtbase, pyqt5, poppler, pkgconfig, fetchpatch +, python, substituteAll +}: + +buildPythonPackage rec { + pname = "python-poppler-qt5"; + version = "0.24.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "0l69llw1fzwz8y90q0qp9q5pifbrqjjbwii7di54dwghw5fc6w1r"; + }; + + patches = [ + (substituteAll { + src = ./poppler-include-dir.patch; + poppler_include_dir = "${poppler.dev}/include/poppler"; + }) + (fetchpatch { + url = "https://github.com/wbsoft/python-poppler-qt5/commit/faf4d1308f89560b0d849671226e3080dfc72e79.patch"; + sha256 = "18krhh6wzsnpxzlzv02nginb1vralla8ai24zqk10nc4mj6fkj86"; + }) + ]; + + setupPyBuildFlags = [ + "--pyqt-sip-dir ${pyqt5}/share/sip/PyQt5" + "--qt-include-dir ${qtbase.dev}/include" + ]; + + buildInputs = [ qtbase.dev poppler ]; + nativeBuildInputs = [ pkgconfig ]; + propagatedBuildInputs = [ sip pyqt5.dev ]; + + # no tests, just bindings for `poppler_qt5` + doCheck = false; + + meta = with stdenv.lib; { + homepage = https://github.com/wbsoft/python-poppler-qt5; + license = licenses.gpl2; + maintainers = with maintainers; [ ma27 ]; + }; +} diff --git a/pkgs/development/python-modules/poppler-qt5/poppler-include-dir.patch b/pkgs/development/python-modules/poppler-qt5/poppler-include-dir.patch new file mode 100644 index 00000000000..7106c1d6352 --- /dev/null +++ b/pkgs/development/python-modules/poppler-qt5/poppler-include-dir.patch @@ -0,0 +1,12 @@ +diff --git a/setup.py b/setup.py +index 59a75b0..0a73268 100644 +--- a/setup.py ++++ b/setup.py +@@ -169,6 +169,7 @@ class build_ext(build_ext_base): + 'Please specify via --pyqt-sip-flags=') + + self.include_dirs += (self.qt_include_dir, ++ '@poppler_include_dir@', + os.path.join(self.qt_include_dir, 'QtCore'), + os.path.join(self.qt_include_dir, 'QtGui'), + os.path.join(self.qt_include_dir, 'QtXml')) diff --git a/pkgs/development/python-modules/python-ly/default.nix b/pkgs/development/python-modules/python-ly/default.nix new file mode 100644 index 00000000000..4c1bd05f4a0 --- /dev/null +++ b/pkgs/development/python-modules/python-ly/default.nix @@ -0,0 +1,21 @@ +{ buildPythonPackage, fetchPypi, stdenv }: + +buildPythonPackage rec { + pname = "python-ly"; + version = "0.9.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"; + }; + + # tests not shipped on `pypi` and + # seem to be broken ATM: https://github.com/wbsoft/python-ly/issues/70 + doCheck = false; + + meta = with stdenv.lib; { + description = "Tool and library for manipulating LilyPond files"; + license = licenses.gpl2; + maintainers = with maintainers; [ ma27 ]; + }; +} diff --git a/pkgs/misc/frescobaldi/default.nix b/pkgs/misc/frescobaldi/default.nix index 84272992f2b..af4c54d9d0d 100644 --- a/pkgs/misc/frescobaldi/default.nix +++ b/pkgs/misc/frescobaldi/default.nix @@ -1,21 +1,22 @@ -{ stdenv, fetchurl, pythonPackages, lilypond}: +{ lib, fetchFromGitHub, python3Packages, lilypond }: -pythonPackages.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { name = "frescobaldi-${version}"; - version = "2.0.16"; + version = "3.0.0"; - src = fetchurl { - url = "https://github.com/wbsoft/frescobaldi/releases/download/" - + "v2.0.16/${name}.tar.gz"; - sha256 = "12pabvq5b2lq84q3kx8lh02zh6ali6v4wnin2k2ycnm45mk9ms6q"; + src = fetchFromGitHub { + owner = "wbsoft"; + repo = "frescobaldi"; + rev = "v${version}"; + sha256 = "1yn18pwsjxpxz5j3yfysmaif8k0vqahj5c7ays9cxsylpg9hl7jd"; }; - propagatedBuildInputs = with pythonPackages; [ lilypond - pyqt4 poppler-qt4 pygame ]; + propagatedBuildInputs = with python3Packages; [ lilypond pygame python-ly poppler-qt5 ]; - patches = [ ./setup.cfg.patch ./python-path.patch ]; + # no tests in shipped with upstream + doCheck = false; - meta = with stdenv.lib; { + meta = with lib; { homepage = http://frescobaldi.org/; description = ''Frescobaldi is a LilyPond sheet music text editor''; longDescription = '' @@ -31,7 +32,7 @@ pythonPackages.buildPythonApplication rec { fonts and keyboard shortcuts ''; license = licenses.gpl2Plus; - maintainers = [ maintainers.sepi ]; + maintainers = with maintainers; [ sepi ma27 ]; platforms = platforms.all; }; } diff --git a/pkgs/misc/frescobaldi/python-path.patch b/pkgs/misc/frescobaldi/python-path.patch deleted file mode 100644 index 6c54d9f208e..00000000000 --- a/pkgs/misc/frescobaldi/python-path.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -u frescobaldi-2.0.16.old/frescobaldi frescobaldi-2.0.16/frescobaldi ---- frescobaldi-2.0.16/frescobaldi 2014-10-24 11:29:28.705687224 +0200 -+++ frescobaldi-2.0.16.new/frescobaldi 2014-10-24 11:31:08.086444793 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/env python - import sys - import frescobaldi_app.main - import app -Common subdirectories: frescobaldi-2.0.16/frescobaldi_app and frescobaldi-2.0.16.new/frescobaldi_app -Common subdirectories: frescobaldi-2.0.16/macosx and frescobaldi-2.0.16.new/macosx diff --git a/pkgs/misc/frescobaldi/setup.cfg.patch b/pkgs/misc/frescobaldi/setup.cfg.patch deleted file mode 100644 index 502cdd61966..00000000000 --- a/pkgs/misc/frescobaldi/setup.cfg.patch +++ /dev/null @@ -1,13 +0,0 @@ -Common subdirectories: frescobaldi-2.0.16.old/build and frescobaldi-2.0.16/build -Common subdirectories: frescobaldi-2.0.16.old/frescobaldi_app and frescobaldi-2.0.16/frescobaldi_app -Common subdirectories: frescobaldi-2.0.16.old/macosx and frescobaldi-2.0.16/macosx -diff -u frescobaldi-2.0.16.old/setup.cfg frescobaldi-2.0.16/setup.cfg ---- frescobaldi-2.0.16.old/setup.cfg 2012-02-05 07:08:24.000000000 +0100 -+++ frescobaldi-2.0.16/setup.cfg 2014-10-24 15:08:48.141335620 +0200 -@@ -1,6 +1,2 @@ --[bdist_wininst] --bitmap=frescobaldi-wininst.bmp --install-script=frescobaldi-wininst.py -- - [sdist] - force-manifest=1 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ace6a5ad2c2..b58728ba168 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2918,6 +2918,8 @@ in { python-jose = callPackage ../development/python-modules/python-jose {}; + python-ly = callPackage ../development/python-modules/python-ly {}; + pyhepmc = buildPythonPackage rec { name = "pyhepmc-${version}"; version = "0.5.0"; @@ -5698,6 +5700,11 @@ in { }; }; + poppler-qt5 = callPackage ../development/python-modules/poppler-qt5 { + inherit (pkgs.qt5) qtbase; + inherit (pkgs.libsForQt5) poppler; + }; + poyo = buildPythonPackage rec { version = "0.4.0"; name = "poyo-${version}";