Merge staging-next into staging

authored by

github-actions[bot] and committed by
GitHub
ff0ea63d 1016b5a6

+108 -390
+2 -2
pkgs/applications/gis/qgis/unwrapped.nix
··· 77 77 # build to use PYQT5_SIP_DIR consistently. 78 78 postPatch = '' 79 79 substituteInPlace cmake/FindPyQt5.py \ 80 - --replace 'sip_dir = cfg.default_sip_dir' 'sip_dir = "${python3Packages.pyqt5}/share/sip/PyQt5"' 80 + --replace 'sip_dir = cfg.default_sip_dir' 'sip_dir = "${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings"' 81 81 ''; 82 82 83 83 cmakeFlags = [ 84 84 "-DCMAKE_SKIP_BUILD_RPATH=OFF" 85 - "-DPYQT5_SIP_DIR=${python3Packages.pyqt5}/share/sip/PyQt5" 85 + "-DPYQT5_SIP_DIR=${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings" 86 86 "-DQSCI_SIP_DIR=${python3Packages.qscintilla-qt5}/share/sip/PyQt5" 87 87 ] ++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF" 88 88 ++ lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}";
+2 -2
pkgs/applications/graphics/krita/default.nix
··· 32 32 ++ lib.optional stdenv.cc.isGNU "-Wno-deprecated-copy"; 33 33 34 34 cmakeFlags = [ 35 - "-DPYQT5_SIP_DIR=${python3Packages.pyqt5}/share/sip/PyQt5" 36 - "-DPYQT_SIP_DIR_OVERRIDE=${python3Packages.pyqt5}/share/sip/PyQt5" 35 + "-DPYQT5_SIP_DIR=${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings" 36 + "-DPYQT_SIP_DIR_OVERRIDE=${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings" 37 37 "-DCMAKE_BUILD_TYPE=RelWithDebInfo" 38 38 ]; 39 39
+8 -8
pkgs/applications/graphics/veusz/default.nix
··· 14 14 sha256 = "4ClgYwiU21wHDve2q9cItSAVb9hbR2F+fJc8znGI8OA="; 15 15 }; 16 16 17 - nativeBuildInputs = [ wrapQtAppsHook python3Packages.sip ]; 17 + nativeBuildInputs = [ wrapQtAppsHook python3Packages.sip_4 ]; 18 18 19 19 buildInputs = [ qtbase ]; 20 20 ··· 25 25 wrapQtApp "$out/bin/veusz" 26 26 ''; 27 27 28 - # For some reason, if sip5 is found on the PATH, the option --sip-dir is 29 - # ignored in setupPyBuildFlags, see 30 - # https://github.com/veusz/veusz/blob/53b99dffa999f2bc41fdc5335d7797ae857c761f/pyqtdistutils.py#L292 28 + # Since sip 6 (we use sip 4 here, but pyqt5 is built with sip 6), sip files are 29 + # placed in a different directory layout and --sip-dir won't work anymore. 30 + # --sip-dir expects a directory with a PyQt5 subdirectory (where sip files are located), 31 + # but the new directory layout places sip files in a subdirectory named 'bindings'. 32 + # To workaround this, we patch the full path into pyqtdistutils.py. 31 33 postPatch = '' 32 34 substituteInPlace pyqtdistutils.py \ 33 - --replace "'-I', pyqt5_include_dir," "'-I', '${python3Packages.pyqt5}/share/sip/PyQt5'," 35 + --replace "'-I', pyqt5_include_dir," "'-I', '${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings'," 34 36 patchShebangs tests/runselftest.py 35 37 ''; 36 38 37 39 # you can find these options at 38 40 # https://github.com/veusz/veusz/blob/53b99dffa999f2bc41fdc5335d7797ae857c761f/pyqtdistutils.py#L71 41 + # --sip-dir cannot be used here for the reasons explained above 39 42 setupPyBuildFlags = [ 40 - # --sip-dir does nothing here, but it should be the correct way to set the 41 - # sip_dir, so I'm leaving it here for future versions 42 - "--sip-dir=${python3Packages.pyqt5}/share/sip" 43 43 "--qt-include-dir=${qtbase.dev}/include" 44 44 # veusz tries to find a libinfix and fails without one 45 45 # but we simply don't need a libinfix, so set it to empty here
+1 -1
pkgs/applications/misc/calibre/default.nix
··· 41 41 ++ lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch; 42 42 43 43 prePatch = '' 44 - sed -i "s@\[tool.sip.project\]@[tool.sip.project]\nsip-include-dirs = [\"${python3Packages.pyqt5}/share/sip/PyQt5\"]@g" \ 44 + sed -i "s@\[tool.sip.project\]@[tool.sip.project]\nsip-include-dirs = [\"${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings\"]@g" \ 45 45 setup/build.py 46 46 sed -i "s/\[tool.sip.bindings.pictureflow\]/[tool.sip.bindings.pictureflow]\ntags = [\"${python3Packages.sip.platform_tag}\"]/g" \ 47 47 setup/build.py
+3 -2
pkgs/development/python-modules/pyqt-builder/default.nix
··· 2 2 3 3 buildPythonPackage rec { 4 4 pname = "pyqt-builder"; 5 - version = "1.6.0"; 5 + version = "1.10.1"; 6 6 7 7 src = fetchPypi { 8 8 pname = "PyQt-builder"; 9 9 inherit version; 10 - sha256 = "0g51yak53zzjs4gpq65i01cmpz7w8cjny9wfyxlgr2vi0wag107v"; 10 + sha256 = "05vyckg4pq95s3b23drhd24sjwzic1k36nwckxz5jc83mixhqywn"; 11 11 }; 12 12 13 13 propagatedBuildInputs = [ packaging sip ]; ··· 21 21 description = "PEP 517 compliant build system for PyQt"; 22 22 homepage = "https://pypi.org/project/PyQt-builder/"; 23 23 license = licenses.gpl3Only; 24 + maintainers = with maintainers; [ eduardosm ]; 24 25 }; 25 26 }
+33 -75
pkgs/development/python-modules/pyqt/5.x.nix
··· 1 - { lib, pythonPackages, pkg-config 1 + { lib 2 + , buildPythonPackage 3 + , isPy27 4 + , fetchPypi 5 + , pkg-config 2 6 , dbus 3 - , qmake, lndir 4 - , qtbase 5 - , qtsvg 6 - , qtdeclarative 7 - , qtwebchannel 8 - , withConnectivity ? false, qtconnectivity 9 - , withMultimedia ? false, qtmultimedia 10 - , withWebKit ? false, qtwebkit 11 - , withWebSockets ? false, qtwebsockets 7 + , lndir 8 + , python 9 + , dbus-python 10 + , sip 11 + , pyqt-builder 12 + , libsForQt5 13 + , withConnectivity ? false 14 + , withMultimedia ? false 15 + , withWebKit ? false 16 + , withWebSockets ? false 12 17 }: 13 18 14 19 let 15 - 16 - inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34; 17 - 18 - sip = if isPy3k then 19 - pythonPackages.sip 20 - else 21 - (pythonPackages.sip_4.override { sip-module = "PyQt5.sip"; }).overridePythonAttrs(oldAttrs: { 22 - # If we install sip in another folder, then we need to create a __init__.py as well 23 - # if we want to be able to import it with Python 2. 24 - # Python 3 could rely on it being an implicit namespace package, however, 25 - # PyQt5 we made an explicit namespace package so sip should be as well. 26 - postInstall = '' 27 - cat << EOF > $out/${python.sitePackages}/PyQt5/__init__.py 28 - from pkgutil import extend_path 29 - __path__ = extend_path(__path__, __name__) 30 - EOF 31 - ''; 32 - }); 33 - 34 20 pyqt5_sip = buildPythonPackage rec { 35 21 pname = "PyQt5_sip"; 36 - version = "12.8.1"; 22 + version = "12.9.0"; 37 23 38 - src = pythonPackages.fetchPypi { 24 + src = fetchPypi { 39 25 inherit pname version; 40 - sha256 = "30e944db9abee9cc757aea16906d4198129558533eb7fadbe48c5da2bd18e0bd"; 26 + sha256 = "0cmfxb7igahxy74qkq199l6zdxrr75bnxris42fww3ibgjflir6k"; 41 27 }; 42 28 43 29 # There is no test code and the check phase fails with: 44 30 # > error: could not create 'PyQt5/sip.cpython-38-x86_64-linux-gnu.so': No such file or directory 45 31 doCheck = false; 46 32 }; 47 - 48 33 in buildPythonPackage rec { 49 34 pname = "PyQt5"; 50 - version = "5.15.2"; 51 - format = "other"; 35 + version = "5.15.4"; 36 + format = "pyproject"; 52 37 53 - src = pythonPackages.fetchPypi { 38 + disabled = isPy27; 39 + 40 + src = fetchPypi { 54 41 inherit pname version; 55 - sha256 = "1z74295i69cha52llsqffzhb5zz7qnbjc64h8qg21l91jgf0harp"; 42 + sha256 = "1gp5jz71nmg58zsm1h4vzhcphf36rbz37qgsfnzal76i1mz5js9a"; 56 43 }; 57 44 58 45 outputs = [ "out" "dev" ]; 59 46 60 47 dontWrapQtApps = true; 61 48 62 - nativeBuildInputs = [ 49 + nativeBuildInputs = with libsForQt5; [ 63 50 pkg-config 64 51 qmake 65 52 lndir ··· 75 62 ++ lib.optional withWebSockets qtwebsockets 76 63 ; 77 64 78 - buildInputs = [ 65 + buildInputs = with libsForQt5; [ 79 66 dbus 80 67 qtbase 81 68 qtsvg 82 69 qtdeclarative 70 + pyqt-builder 83 71 ] 84 72 ++ lib.optional withConnectivity qtconnectivity 85 73 ++ lib.optional withWebKit qtwebkit ··· 88 76 89 77 propagatedBuildInputs = [ 90 78 dbus-python 91 - ] ++ (if isPy3k then [ pyqt5_sip ] else [ sip enum34 ]); 79 + pyqt5_sip 80 + ]; 92 81 93 82 patches = [ 94 - # Fix some wrong assumptions by ./configure.py 83 + # Fix some wrong assumptions by ./project.py 95 84 # TODO: figure out how to send this upstream 96 85 ./pyqt5-fix-dbus-mainloop-support.patch 97 86 ]; ··· 103 92 WebSocketsEnabled = withWebSockets; 104 93 }; 105 94 106 - configurePhase = '' 107 - runHook preConfigure 108 - 109 - export PYTHONPATH=$PYTHONPATH:$out/${python.sitePackages} 110 - 111 - ${python.executable} configure.py -w \ 112 - --confirm-license \ 113 - --dbus-moduledir=$out/${python.sitePackages}/dbus/mainloop \ 114 - --no-qml-plugin \ 115 - --bindir=$out/bin \ 116 - --destdir=$out/${python.sitePackages} \ 117 - --stubsdir=$out/${python.sitePackages}/PyQt5 \ 118 - --sipdir=$out/share/sip/PyQt5 \ 119 - --designer-plugindir=$out/plugins/designer 120 - 121 - runHook postConfigure 122 - ''; 123 - 124 - postInstall = lib.optionalString (!isPy3k) '' 125 - ln -s ${sip}/${python.sitePackages}/PyQt5/sip.* $out/${python.sitePackages}/PyQt5/ 126 - for i in $out/bin/*; do 127 - wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH" 128 - done 129 - 130 - # Let's make it a namespace package 131 - cat << EOF > $out/${python.sitePackages}/PyQt5/__init__.py 132 - from pkgutil import extend_path 133 - __path__ = extend_path(__path__, __name__) 134 - EOF 135 - ''; 95 + dontConfigure = true; 136 96 137 97 # Checked using pythonImportsCheck 138 98 doCheck = false; ··· 150 110 ++ lib.optional withConnectivity "PyQt5.QtConnectivity" 151 111 ; 152 112 153 - enableParallelBuilding = true; 154 - 155 113 meta = with lib; { 156 114 description = "Python bindings for Qt5"; 157 - homepage = "http://www.riverbankcomputing.co.uk"; 158 - license = licenses.gpl3; 115 + homepage = "https://riverbankcomputing.com/"; 116 + license = licenses.gpl3Only; 159 117 platforms = platforms.mesaPlatforms; 160 118 maintainers = with maintainers; [ sander ]; 161 119 };
+17 -7
pkgs/development/python-modules/pyqt/pyqt5-fix-dbus-mainloop-support.patch
··· 21 21 1 file changed, 11 insertions(+), 2 deletions(-) 22 22 23 23 diff --git a/configure.py b/configure.py 24 - index a3450ca3..440d90a2 100644 24 + index c6663e4..65e7da7 100644 25 25 --- a/configure.py 26 26 +++ b/configure.py 27 27 @@ -905,6 +905,9 @@ class TargetConfiguration: ··· 34 34 if opts.pyuicinterpreter is not None: 35 35 self.pyuic_interpreter = opts.pyuicinterpreter 36 36 37 - @@ -1184,6 +1187,11 @@ def create_optparser(target_config): 37 + @@ -1191,6 +1194,11 @@ def create_optparser(target_config): 38 38 metavar="DIR", 39 39 help="the directory containing the dbus/dbus-python.h header is " 40 40 "DIR [default: supplied by pkg-config]") ··· 46 46 p.add_option_group(g) 47 47 48 48 # Installation. 49 - @@ -2149,7 +2157,7 @@ def check_dbus(target_config, verbose): 49 + @@ -2277,7 +2285,7 @@ def check_dbus(target_config, verbose): 50 50 51 51 inform("Checking to see if the dbus support module should be built...") 52 52 ··· 55 55 56 56 if verbose: 57 57 sys.stdout.write(cmd + "\n") 58 - @@ -2178,7 +2186,8 @@ def check_dbus(target_config, verbose): 58 + @@ -2307,7 +2315,8 @@ def check_dbus(target_config, verbose): 59 59 inform("The Python dbus module doesn't seem to be installed.") 60 60 return 61 61 ··· 65 65 66 66 # Try and find dbus-python.h. We don't use pkg-config because it is broken 67 67 # for dbus-python (at least for versions up to and including v0.81.0). 68 - -- 69 - 2.18.0 70 - 68 + diff --git a/project.py b/project.py 69 + index fe9fbce..9ae1ca1 100644 70 + --- a/project.py 71 + +++ b/project.py 72 + @@ -261,7 +261,7 @@ del find_qt 73 + dbus_lib_dirs = [] 74 + dbus_libs = [] 75 + 76 + - args = ['pkg-config', '--cflags-only-I', '--libs dbus-1'] 77 + + args = ['pkg-config', '--cflags-only-I', '--libs dbus-1', 'dbus-python'] 78 + 79 + for line in self.read_command_pipe(args, fatal=False): 80 + for flag in line.strip().split():
+18 -48
pkgs/development/python-modules/pyqtwebengine/default.nix
··· 4 4 }: 5 5 6 6 let 7 - 8 - inherit (pythonPackages) buildPythonPackage python isPy3k pyqt5 enum34; 9 - inherit (pyqt5) sip; 10 - # source: https://www.riverbankcomputing.com/pipermail/pyqt/2020-June/042985.html 11 - patches = lib.optional (lib.hasPrefix "5.14" pyqt5.version) 12 - [ ./fix-build-with-qt-514.patch ] 13 - ; 14 - 7 + inherit (pythonPackages) buildPythonPackage python isPy27 pyqt5 enum34 sip pyqt-builder; 15 8 in buildPythonPackage rec { 16 9 pname = "PyQtWebEngine"; 17 10 version = "5.15.4"; 18 - format = "other"; 11 + format = "pyproject"; 12 + 13 + disabled = isPy27; 19 14 20 15 src = pythonPackages.fetchPypi { 21 16 inherit pname version; 22 17 sha256 = "06fc35hzg346a9c86dk7vzm1fakkgzn5l52jfq3bix3587sjip6f"; 23 18 }; 24 19 25 - inherit patches; 20 + postPatch = '' 21 + substituteInPlace pyproject.toml \ 22 + --replace "[tool.sip.project]" "[tool.sip.project]''\nsip-include-dirs = [\"${pyqt5}/${python.sitePackages}/PyQt5/bindings\"]" 23 + ''; 26 24 27 25 outputs = [ "out" "dev" ]; 28 26 ··· 33 31 qtbase 34 32 qtsvg 35 33 qtwebengine 34 + pyqt-builder 36 35 ]; 37 36 38 37 buildInputs = [ ··· 42 41 qtwebengine 43 42 ]; 44 43 45 - propagatedBuildInputs = [ pyqt5 ] 46 - ++ lib.optional (!isPy3k) enum34; 44 + propagatedBuildInputs = [ pyqt5 ]; 47 45 48 46 dontWrapQtApps = true; 49 47 50 - configurePhase = '' 51 - runHook preConfigure 52 - 53 - mkdir -p "$out/share/sip/PyQt5" 54 - 55 - # FIXME: Without --no-dist-info, I get 56 - # unable to create /nix/store/yv4pzx3lxk3lscq0pw3hqzs7k4x76xsm-python3-3.7.2/lib/python3.7/site-packages/PyQtWebEngine-5.12.dist-info 57 - ${python.executable} configure.py -w \ 58 - --destdir="$out/${python.sitePackages}/PyQt5" \ 59 - --no-dist-info \ 60 - --apidir="$out/api/${python.libPrefix}" \ 61 - --sipdir="$out/share/sip/PyQt5" \ 62 - --pyqt-sipdir="${pyqt5}/share/sip/PyQt5" \ 63 - --stubsdir="$out/${python.sitePackages}/PyQt5" 48 + # Avoid running qmake, which is in nativeBuildInputs 49 + dontConfigure = true; 64 50 65 - runHook postConfigure 66 - ''; 51 + # Checked using pythonImportsCheck 52 + doCheck = false; 67 53 68 - postInstall = '' 69 - # Let's make it a namespace package 70 - cat << EOF > $out/${python.sitePackages}/PyQt5/__init__.py 71 - from pkgutil import extend_path 72 - __path__ = extend_path(__path__, __name__) 73 - EOF 74 - ''; 75 - 76 - installCheckPhase = let 77 - modules = [ 78 - "PyQt5.QtWebEngine" 79 - "PyQt5.QtWebEngineWidgets" 80 - ]; 81 - imports = lib.concatMapStrings (module: "import ${module};") modules; 82 - in '' 83 - echo "Checking whether modules can be imported..." 84 - PYTHONPATH=$PYTHONPATH:$out/${python.sitePackages} ${python.interpreter} -c "${imports}" 85 - ''; 86 - 87 - doCheck = true; 54 + pythonImportsCheck = [ 55 + "PyQt5.QtWebEngine" 56 + "PyQt5.QtWebEngineWidgets" 57 + ]; 88 58 89 59 enableParallelBuilding = true; 90 60
+17 -3
pkgs/development/python-modules/qscintilla-qt5/default.nix
··· 3 3 , qscintilla 4 4 , qtbase 5 5 }: 6 - with pythonPackages; 7 - buildPythonPackage { 6 + 7 + let 8 + inherit (pythonPackages) buildPythonPackage isPy3k python sip_4 pyqt5; 9 + in buildPythonPackage rec { 8 10 pname = "qscintilla"; 9 11 version = qscintilla.version; 10 12 src = qscintilla.src; 11 13 format = "other"; 14 + 15 + disabled = !isPy3k; 12 16 13 17 nativeBuildInputs = [ sip_4 qtbase ]; 14 18 buildInputs = [ qscintilla ]; ··· 38 42 --qsci-incdir=${qscintilla}/include \ 39 43 --qsci-featuresdir=${qscintilla}/mkspecs/features \ 40 44 --qsci-libdir=${qscintilla}/lib \ 41 - --pyqt-sipdir=${pyqt5}/share/sip/PyQt5 \ 45 + --pyqt-sipdir=${pyqt5}/${python.sitePackages}/PyQt5/bindings \ 42 46 --qsci-sipdir=$out/share/sip/PyQt5 \ 43 47 --sip-incdir=${sip_4}/include 44 48 ''; 49 + 50 + postInstall = '' 51 + # Needed by pythonImportsCheck to find the module 52 + export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH" 53 + ''; 54 + 55 + # Checked using pythonImportsCheck 56 + doCheck = false; 57 + 58 + pythonImportsCheck = [ "PyQt5.Qsci" ]; 45 59 46 60 meta = with lib; { 47 61 description = "A Python binding to QScintilla, Qt based text editing control";
+1 -1
pkgs/development/python-modules/sip/4.x.nix
··· 36 36 37 37 meta = with lib; { 38 38 description = "Creates C++ bindings for Python modules"; 39 - homepage = "http://www.riverbankcomputing.co.uk/"; 39 + homepage = "https://riverbankcomputing.com/"; 40 40 license = licenses.gpl2Plus; 41 41 maintainers = with maintainers; [ lovek323 sander ]; 42 42 platforms = platforms.all;
+3 -3
pkgs/development/python-modules/sip/default.nix
··· 2 2 3 3 buildPythonPackage rec { 4 4 pname = "sip"; 5 - version = "5.5.0"; 5 + version = "6.1.1"; 6 6 7 7 src = fetchPypi { 8 8 pname = "sip"; 9 9 inherit version; 10 - sha256 = "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"; 10 + sha256 = "083ykzg7zbvrfrg3ram2vx93zrmhpm817kf9bkhw8r6pzkr5mljj"; 11 11 }; 12 12 13 13 propagatedBuildInputs = [ packaging toml ]; ··· 33 33 34 34 meta = with lib; { 35 35 description = "Creates C++ bindings for Python modules"; 36 - homepage = "http://www.riverbankcomputing.co.uk/"; 36 + homepage = "https://riverbankcomputing.com/"; 37 37 license = licenses.gpl3Only; 38 38 maintainers = with maintainers; [ eduardosm ]; 39 39 };
-229
pkgs/misc/drivers/hplip/3.18.5.nix
··· 1 - { lib, stdenv, fetchurl, substituteAll 2 - , pkg-config 3 - , cups, zlib, libjpeg, libusb1, python2Packages, sane-backends 4 - , dbus, file, ghostscript, usbutils 5 - , net-snmp, openssl, perl, nettools 6 - , bash, coreutils, util-linux 7 - , withQt5 ? true 8 - , withPlugin ? false 9 - , withStaticPPDInstall ? false 10 - }: 11 - 12 - let 13 - 14 - name = "hplip-${version}"; 15 - version = "3.18.5"; 16 - 17 - src = fetchurl { 18 - url = "mirror://sourceforge/hplip/${name}.tar.gz"; 19 - sha256 = "0xb7ga2wgbwjxsss67mjn2y6fmqsfwzmv11ivvfzhnl36lh22hkb"; 20 - }; 21 - 22 - plugin = fetchurl { 23 - url = "https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${name}-plugin.run"; 24 - sha256 = "1jf74jya071zqvwhy9n0c3007pzgcxydkw7qdh4sx70brly81i7p"; 25 - }; 26 - 27 - hplipState = substituteAll { 28 - inherit version; 29 - src = ./hplip.state; 30 - }; 31 - 32 - hplipPlatforms = { 33 - i686-linux = "x86_32"; 34 - x86_64-linux = "x86_64"; 35 - armv6l-linux = "arm32"; 36 - armv7l-linux = "arm32"; 37 - aarch64-linux = "arm64"; 38 - }; 39 - 40 - hplipArch = hplipPlatforms.${stdenv.hostPlatform.system} 41 - or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}"); 42 - 43 - pluginArches = [ "x86_32" "x86_64" "arm32" "arm64" ]; 44 - 45 - in 46 - 47 - assert withPlugin -> builtins.elem hplipArch pluginArches 48 - || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}"; 49 - 50 - python2Packages.buildPythonApplication { 51 - inherit name src; 52 - format = "other"; 53 - 54 - buildInputs = [ 55 - libjpeg 56 - cups 57 - libusb1 58 - sane-backends 59 - dbus 60 - file 61 - ghostscript 62 - net-snmp 63 - openssl 64 - perl 65 - zlib 66 - ]; 67 - 68 - nativeBuildInputs = [ 69 - pkg-config 70 - ]; 71 - 72 - pythonPath = with python2Packages; [ 73 - dbus 74 - pillow 75 - pygobject2 76 - reportlab 77 - usbutils 78 - sip_4 79 - ] ++ lib.optionals withQt5 [ 80 - pyqt5 81 - ]; 82 - 83 - makeWrapperArgs = [ "--prefix" "PATH" ":" "${nettools}/bin" ]; 84 - 85 - prePatch = '' 86 - # HPLIP hardcodes absolute paths everywhere. Nuke from orbit. 87 - find . -type f -exec sed -i \ 88 - -e s,/etc/hp,$out/etc/hp,g \ 89 - -e s,/etc/sane.d,$out/etc/sane.d,g \ 90 - -e s,/usr/include/libusb-1.0,${libusb1.dev}/include/libusb-1.0,g \ 91 - -e s,/usr/share/hal/fdi/preprobe/10osvendor,$out/share/hal/fdi/preprobe/10osvendor,g \ 92 - -e s,/usr/lib/systemd/system,$out/lib/systemd/system,g \ 93 - -e s,/var/lib/hp,$out/var/lib/hp,g \ 94 - -e s,/usr/bin/perl,${perl}/bin/perl,g \ 95 - -e s,/usr/bin/file,${file}/bin/file,g \ 96 - -e s,/usr/bin/gs,${ghostscript}/bin/gs,g \ 97 - -e s,/usr/share/cups/fonts,${ghostscript}/share/ghostscript/fonts,g \ 98 - -e "s,ExecStart=/usr/bin/python /usr/bin/hp-config_usb_printer,ExecStart=$out/bin/hp-config_usb_printer,g" \ 99 - {} + 100 - ''; 101 - 102 - preConfigure = '' 103 - export configureFlags="$configureFlags 104 - --with-hpppddir=$out/share/cups/model/HP 105 - --with-cupsfilterdir=$out/lib/cups/filter 106 - --with-cupsbackenddir=$out/lib/cups/backend 107 - --with-icondir=$out/share/applications 108 - --with-systraydir=$out/xdg/autostart 109 - --with-mimedir=$out/etc/cups 110 - --enable-policykit 111 - ${lib.optionalString withStaticPPDInstall "--enable-cups-ppd-install"} 112 - --disable-qt4 113 - ${lib.optionalString withQt5 "--enable-qt5"} 114 - " 115 - 116 - export makeFlags=" 117 - halpredir=$out/share/hal/fdi/preprobe/10osvendor 118 - rulesdir=$out/etc/udev/rules.d 119 - policykit_dir=$out/share/polkit-1/actions 120 - policykit_dbus_etcdir=$out/etc/dbus-1/system.d 121 - policykit_dbus_sharedir=$out/share/dbus-1/system-services 122 - hplip_confdir=$out/etc/hp 123 - hplip_statedir=$out/var/lib/hp 124 - " 125 - 126 - # Prevent 'ppdc: Unable to find include file "<font.defs>"' which prevent 127 - # generation of '*.ppd' files. 128 - # This seems to be a 'ppdc' issue when the tool is run in a hermetic sandbox. 129 - # Could not find how to fix the problem in 'ppdc' so this is a workaround. 130 - export CUPS_DATADIR="${cups}/share/cups" 131 - ''; 132 - 133 - enableParallelBuilding = true; 134 - 135 - # 136 - # Running `hp-diagnose_plugin -g` can be used to diagnose 137 - # issues with plugins. 138 - # 139 - postInstall = lib.optionalString withPlugin '' 140 - sh ${plugin} --noexec --keep 141 - cd plugin_tmp 142 - 143 - cp plugin.spec $out/share/hplip/ 144 - 145 - mkdir -p $out/share/hplip/data/firmware 146 - cp *.fw.gz $out/share/hplip/data/firmware 147 - 148 - mkdir -p $out/share/hplip/data/plugins 149 - cp license.txt $out/share/hplip/data/plugins 150 - 151 - mkdir -p $out/share/hplip/prnt/plugins 152 - for plugin in lj hbpl1; do 153 - cp $plugin-${hplipArch}.so $out/share/hplip/prnt/plugins 154 - chmod 0755 $out/share/hplip/prnt/plugins/$plugin-${hplipArch}.so 155 - ln -s $out/share/hplip/prnt/plugins/$plugin-${hplipArch}.so \ 156 - $out/share/hplip/prnt/plugins/$plugin.so 157 - done 158 - 159 - mkdir -p $out/share/hplip/scan/plugins 160 - for plugin in bb_soap bb_marvell bb_soapht bb_escl; do 161 - cp $plugin-${hplipArch}.so $out/share/hplip/scan/plugins 162 - chmod 0755 $out/share/hplip/scan/plugins/$plugin-${hplipArch}.so 163 - ln -s $out/share/hplip/scan/plugins/$plugin-${hplipArch}.so \ 164 - $out/share/hplip/scan/plugins/$plugin.so 165 - done 166 - 167 - mkdir -p $out/share/hplip/fax/plugins 168 - for plugin in fax_marvell; do 169 - cp $plugin-${hplipArch}.so $out/share/hplip/fax/plugins 170 - chmod 0755 $out/share/hplip/fax/plugins/$plugin-${hplipArch}.so 171 - ln -s $out/share/hplip/fax/plugins/$plugin-${hplipArch}.so \ 172 - $out/share/hplip/fax/plugins/$plugin.so 173 - done 174 - 175 - mkdir -p $out/var/lib/hp 176 - cp ${hplipState} $out/var/lib/hp/hplip.state 177 - ''; 178 - 179 - # The installed executables are just symlinks into $out/share/hplip, 180 - # but wrapPythonPrograms ignores symlinks. We cannot replace the Python 181 - # modules in $out/share/hplip with wrapper scripts because they import 182 - # each other as libraries. Instead, we emulate wrapPythonPrograms by 183 - # 1. Calling patchPythonProgram on the original script in $out/share/hplip 184 - # 2. Making our own wrapper pointing directly to the original script. 185 - dontWrapPythonPrograms = true; 186 - preFixup = '' 187 - buildPythonPath "$out $pythonPath" 188 - 189 - for bin in $out/bin/*; do 190 - py=$(readlink -m $bin) 191 - rm $bin 192 - echo "patching \`$py'..." 193 - patchPythonScript "$py" 194 - echo "wrapping \`$bin'..." 195 - makeWrapper "$py" "$bin" \ 196 - --prefix PATH ':' "$program_PATH" \ 197 - --set PYTHONNOUSERSITE "true" \ 198 - $makeWrapperArgs 199 - done 200 - ''; 201 - 202 - # There are some binaries there, which reference gcc-unwrapped otherwise. 203 - stripDebugList = [ 204 - "share/hplip" 205 - ]; 206 - 207 - postFixup = '' 208 - substituteInPlace $out/etc/hp/hplip.conf --replace /usr $out 209 - # Patch udev rules: 210 - # with plugin, they upload firmware to printers, 211 - # without plugin, they complain about the missing plugin. 212 - substituteInPlace $out/etc/udev/rules.d/56-hpmud.rules \ 213 - --replace {,${bash}}/bin/sh \ 214 - --replace /usr/bin/nohup "" \ 215 - --replace {,${util-linux}/bin/}logger \ 216 - --replace {/usr,$out}/bin 217 - ''; 218 - 219 - meta = with lib; { 220 - description = "Print, scan and fax HP drivers for Linux"; 221 - homepage = "https://developers.hp.com/hp-linux-imaging-and-printing"; 222 - downloadPage = "https://sourceforge.net/projects/hplip/files/hplip/"; 223 - license = if withPlugin 224 - then licenses.unfree 225 - else with licenses; [ mit bsd2 gpl2Plus ]; 226 - platforms = [ "i686-linux" "x86_64-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" ]; 227 - maintainers = with maintainers; [ jgeerds ttuegel ]; 228 - }; 229 - }
+2 -2
pkgs/os-specific/linux/libratbag/default.nix
··· 4 4 5 5 stdenv.mkDerivation rec { 6 6 pname = "libratbag"; 7 - version = "0.15"; 7 + version = "0.16"; 8 8 9 9 src = fetchFromGitHub { 10 10 owner = "libratbag"; 11 11 repo = "libratbag"; 12 12 rev = "v${version}"; 13 - sha256 = "0z6ps5aqwjmbdvahs80fh9cdgcvp4q4w3kfycmzv4kzgzihjki7b"; 13 + sha256 = "sha256-wJLG0Gxm1RWwW5SCGoa2QscU1VC0r93KZfEMNVg3Tko="; 14 14 }; 15 15 16 16 nativeBuildInputs = [
-4
pkgs/top-level/all-packages.nix
··· 30743 30743 30744 30744 hplipWithPlugin_3_16_11 = hplip_3_16_11.override { withPlugin = true; }; 30745 30745 30746 - hplip_3_18_5 = callPackage ../misc/drivers/hplip/3.18.5.nix { }; 30747 - 30748 - hplipWithPlugin_3_18_5 = hplip_3_18_5.override { withPlugin = true; }; 30749 - 30750 30746 hyperfine = callPackage ../tools/misc/hyperfine { 30751 30747 inherit (darwin.apple_sdk.frameworks) Security; 30752 30748 };
+1 -3
pkgs/top-level/python-packages.nix
··· 6349 6349 6350 6350 pyqt4 = callPackage ../development/python-modules/pyqt/4.x.nix { }; 6351 6351 6352 - pyqt5 = pkgs.libsForQt5.callPackage ../development/python-modules/pyqt/5.x.nix { 6353 - pythonPackages = self; 6354 - }; 6352 + pyqt5 = callPackage ../development/python-modules/pyqt/5.x.nix { }; 6355 6353 6356 6354 pyqt5_with_qtmultimedia = self.pyqt5.override { 6357 6355 withMultimedia = true;