uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
69
pkgs/development/python-modules/pyqt/4.x.nix
Normal file
69
pkgs/development/python-modules/pyqt/4.x.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{ lib, stdenv, fetchurl, buildPythonPackage, python, dbus-python, sip_4, qt4, pkg-config, lndir, dbus, makeWrapper }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "PyQt-x11-gpl";
|
||||
version = "4.12.3";
|
||||
format = "other";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/pyqt/PyQt4_gpl_x11-${version}.tar.gz";
|
||||
sha256 = "0wnlasg62rm5d39nq1yw4namcx2ivxgzl93r5f2vb9s0yaz5l3x0";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
mkdir -p $out
|
||||
lndir ${dbus-python} $out
|
||||
rm -rf "$out/nix-support"
|
||||
|
||||
export PYTHONPATH=$PYTHONPATH:$out/lib/${python.libPrefix}/site-packages
|
||||
${lib.optionalString stdenv.isDarwin ''
|
||||
export QMAKESPEC="unsupported/macx-clang-libc++" # macOS target after bootstrapping phase \
|
||||
''}
|
||||
|
||||
substituteInPlace configure.py \
|
||||
--replace 'install_dir=pydbusmoddir' "install_dir='$out/lib/${python.libPrefix}/site-packages/dbus/mainloop'" \
|
||||
${lib.optionalString stdenv.isDarwin ''
|
||||
--replace "qt_macx_spec = 'macx-g++'" "qt_macx_spec = 'unsupported/macx-clang-libc++'" # for bootstrapping phase \
|
||||
''}
|
||||
|
||||
chmod +x configure.py
|
||||
sed -i '1i#!${python.interpreter}' configure.py
|
||||
'';
|
||||
|
||||
configureScript = "./configure.py";
|
||||
dontAddPrefix = true;
|
||||
configureFlags = [
|
||||
"--confirm-license"
|
||||
"--bindir=${placeholder "out"}/bin"
|
||||
"--destdir=${placeholder "out"}/${python.sitePackages}"
|
||||
"--plugin-destdir=${placeholder "out"}/lib/qt4/plugins"
|
||||
"--sipdir=${placeholder "out"}/share/sip/PyQt4"
|
||||
"--dbus=${lib.getDev dbus-python}/include/dbus-1.0"
|
||||
"--verbose"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config lndir makeWrapper qt4 ];
|
||||
buildInputs = [ qt4 dbus ];
|
||||
|
||||
propagatedBuildInputs = [ sip_4 ];
|
||||
|
||||
postInstall = ''
|
||||
for i in $out/bin/*; do
|
||||
wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH"
|
||||
done
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = {
|
||||
qt = qt4;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python bindings for Qt";
|
||||
license = "GPL";
|
||||
homepage = "http://www.riverbankcomputing.co.uk";
|
||||
maintainers = [ maintainers.sander ];
|
||||
platforms = platforms.mesaPlatforms;
|
||||
};
|
||||
}
|
||||
110
pkgs/development/python-modules/pyqt/5.x.nix
Normal file
110
pkgs/development/python-modules/pyqt/5.x.nix
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, isPy27
|
||||
, fetchPypi
|
||||
, pkg-config
|
||||
, dbus
|
||||
, lndir
|
||||
, dbus-python
|
||||
, sip
|
||||
, pyqt5_sip
|
||||
, pyqt-builder
|
||||
, libsForQt5
|
||||
, withConnectivity ? false
|
||||
, withMultimedia ? false
|
||||
, withWebKit ? false
|
||||
, withWebSockets ? false
|
||||
, withLocation ? false
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "PyQt5";
|
||||
version = "5.15.4";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = isPy27;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1gp5jz71nmg58zsm1h4vzhcphf36rbz37qgsfnzal76i1mz5js9a";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
nativeBuildInputs = with libsForQt5; [
|
||||
pkg-config
|
||||
qmake
|
||||
lndir
|
||||
sip
|
||||
qtbase
|
||||
qtsvg
|
||||
qtdeclarative
|
||||
qtwebchannel
|
||||
]
|
||||
++ lib.optional withConnectivity qtconnectivity
|
||||
++ lib.optional withMultimedia qtmultimedia
|
||||
++ lib.optional withWebKit qtwebkit
|
||||
++ lib.optional withWebSockets qtwebsockets
|
||||
++ lib.optional withLocation qtlocation
|
||||
;
|
||||
|
||||
buildInputs = with libsForQt5; [
|
||||
dbus
|
||||
qtbase
|
||||
qtsvg
|
||||
qtdeclarative
|
||||
pyqt-builder
|
||||
]
|
||||
++ lib.optional withConnectivity qtconnectivity
|
||||
++ lib.optional withWebKit qtwebkit
|
||||
++ lib.optional withWebSockets qtwebsockets
|
||||
++ lib.optional withLocation qtlocation
|
||||
;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dbus-python
|
||||
pyqt5_sip
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Fix some wrong assumptions by ./project.py
|
||||
# TODO: figure out how to send this upstream
|
||||
./pyqt5-fix-dbus-mainloop-support.patch
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit sip pyqt5_sip;
|
||||
multimediaEnabled = withMultimedia;
|
||||
webKitEnabled = withWebKit;
|
||||
WebSocketsEnabled = withWebSockets;
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
# Checked using pythonImportsCheck
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"PyQt5"
|
||||
"PyQt5.QtCore"
|
||||
"PyQt5.QtQml"
|
||||
"PyQt5.QtWidgets"
|
||||
"PyQt5.QtGui"
|
||||
]
|
||||
++ lib.optional withWebSockets "PyQt5.QtWebSockets"
|
||||
++ lib.optional withWebKit "PyQt5.QtWebKit"
|
||||
++ lib.optional withMultimedia "PyQt5.QtMultimedia"
|
||||
++ lib.optional withConnectivity "PyQt5.QtConnectivity"
|
||||
++ lib.optional withLocation "PyQt5.QtPositioning"
|
||||
;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python bindings for Qt5";
|
||||
homepage = "https://riverbankcomputing.com/";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.mesaPlatforms;
|
||||
maintainers = with maintainers; [ sander ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 944d5467e1655aac20a14325631df6daccaf5804 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Tojnar <jtojnar@gmail.com>
|
||||
Date: Sun, 3 Mar 2019 01:13:46 +0100
|
||||
Subject: [PATCH] Fix building on Nix
|
||||
|
||||
./configure.py tries to find dbus-python header in dbus-1 includedir
|
||||
obtained from pkg-config or from --dbus flag. Unfortunately, when supplied,
|
||||
it also uses the flag for locating dbus-1 headers. This fails on Nix,
|
||||
since every package is installed into its own immutable tree so we cannot
|
||||
use a single directory for both dbus-python and dbus-1. We can fix this by
|
||||
using pkg-config for finding dbus-python headers too.
|
||||
|
||||
Additionally, the build system also tries to install the dbus support module
|
||||
to dbus-python tree. Often, it is possible to handle this in pkgconfig as well [1]
|
||||
but unfortunately, dbus-python does not export the moduledir in its pc file
|
||||
so I have decided to solve this with an extra configure flag.
|
||||
|
||||
[1]: https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/
|
||||
---
|
||||
configure.py | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.py b/configure.py
|
||||
index c6663e4..65e7da7 100644
|
||||
--- a/configure.py
|
||||
+++ b/configure.py
|
||||
@@ -905,6 +905,9 @@ class TargetConfiguration:
|
||||
if opts.pydbusincdir is not None:
|
||||
self.pydbus_inc_dir = opts.pydbusincdir
|
||||
|
||||
+ if opts.pydbusmoduledir is not None:
|
||||
+ self.pydbus_module_dir = opts.pydbusmoduledir
|
||||
+
|
||||
if opts.pyuicinterpreter is not None:
|
||||
self.pyuic_interpreter = opts.pyuicinterpreter
|
||||
|
||||
@@ -1191,6 +1194,11 @@ def create_optparser(target_config):
|
||||
metavar="DIR",
|
||||
help="the directory containing the dbus/dbus-python.h header is "
|
||||
"DIR [default: supplied by pkg-config]")
|
||||
+ g.add_option("--dbus-moduledir", dest='pydbusmoduledir', type='string',
|
||||
+ default=None, action='callback', callback=store_abspath,
|
||||
+ metavar="DIR",
|
||||
+ help="the directory where dbus support module will be installed to"
|
||||
+ "DIR [default: obtained from dbus.mainloop python module]")
|
||||
p.add_option_group(g)
|
||||
|
||||
# Installation.
|
||||
@@ -2277,7 +2285,7 @@ def check_dbus(target_config, verbose):
|
||||
|
||||
inform("Checking to see if the dbus support module should be built...")
|
||||
|
||||
- cmd = 'pkg-config --cflags-only-I --libs dbus-1'
|
||||
+ cmd = 'pkg-config --cflags-only-I --libs dbus-1 dbus-python'
|
||||
|
||||
if verbose:
|
||||
sys.stdout.write(cmd + "\n")
|
||||
@@ -2307,7 +2315,8 @@ def check_dbus(target_config, verbose):
|
||||
inform("The Python dbus module doesn't seem to be installed.")
|
||||
return
|
||||
|
||||
- target_config.pydbus_module_dir = dbus.mainloop.__path__[0]
|
||||
+ if target_config.pydbus_module_dir == '':
|
||||
+ target_config.pydbus_module_dir = dbus.mainloop.__path__[0]
|
||||
|
||||
# Try and find dbus-python.h. We don't use pkg-config because it is broken
|
||||
# for dbus-python (at least for versions up to and including v0.81.0).
|
||||
diff --git a/project.py b/project.py
|
||||
index fe9fbce..9ae1ca1 100644
|
||||
--- a/project.py
|
||||
+++ b/project.py
|
||||
@@ -261,7 +261,7 @@ del find_qt
|
||||
dbus_lib_dirs = []
|
||||
dbus_libs = []
|
||||
|
||||
- args = ['pkg-config', '--cflags-only-I', '--libs dbus-1']
|
||||
+ args = ['pkg-config', '--cflags-only-I', '--libs dbus-1', 'dbus-python']
|
||||
|
||||
for line in self.read_command_pipe(args, fatal=False):
|
||||
for flag in line.strip().split():
|
||||
28
pkgs/development/python-modules/pyqt/sip.nix
Normal file
28
pkgs/development/python-modules/pyqt/sip.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyqt5-sip";
|
||||
version = "12.9.1";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "PyQt5_sip";
|
||||
inherit version;
|
||||
sha256 = "LyTymbRMURwjeWqvu7WBv96/eNCQVle3zuIUG0mCAw4=";
|
||||
};
|
||||
|
||||
# There is no test code and the check phase fails with:
|
||||
# > error: could not create 'PyQt5/sip.cpython-38-x86_64-linux-gnu.so': No such file or directory
|
||||
doCheck = false;
|
||||
pythonImportsCheck = ["PyQt5.sip"];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python bindings for Qt5";
|
||||
homepage = "https://www.riverbankcomputing.com/software/sip/";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.mesaPlatforms;
|
||||
maintainers = with maintainers; [ sander ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue