Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkgs/by-name/fb/fbpanel/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ stdenv.mkDerivation {
'';

makeFlags = [ "V=1" ];
NIX_CFLAGS_COMPILE = [

env.NIX_CFLAGS_COMPILE = toString [
"-Wno-error"
"-Wno-error=incompatible-pointer-types" # not implied by -Wno-error
"-I${gdk-pixbuf-xlib.dev}/include/gdk-pixbuf-2.0"
];

Expand Down
16 changes: 15 additions & 1 deletion pkgs/development/interpreters/python/pypy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,22 @@ stdenv.mkDerivation rec {
tcl_libprefix = tcl.libPrefix;
})

(replaceVars ./sqlite_paths.patch {
# Python ctypes.util uses three different strategies to find a library (on Linux):
# 1. /sbin/ldconfig
# 2. cc -Wl,-t -l"$libname"; objdump -p
# 3. ld -t (where it attaches the values in $LD_LIBRARY_PATH as -L arguments)
# The first is disabled in Nix (and wouldn't work in the build sandbox or on NixOS anyway), and
# the third was only introduced in Python 3.6 (see bugs.python.org/issue9998), so is not
# available when buliding PyPy (which is built using Python/PyPy 2.7).
# The second requires SONAME to be set for the dynamic library for the second part not to fail.
# As libsqlite3 stopped shipping with SONAME after the switch to autosetup (>= 3.50 in Nixpkgs;
# see https://www.sqlite.org/src/forumpost/5a3b44f510df8ded). This makes the Python CFFI module
# unable to find the SQLite library.
# To circumvent these issues, we hardcode the path during build.
# For more information, see https://github.com/NixOS/nixpkgs/issues/419942.
(replaceVars (if isPy3k then ./sqlite_paths.patch else ./sqlite_paths_2_7.patch) {
inherit (sqlite) out dev;
libsqlite = "${sqlite.out}/lib/libsqlite3${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];

Expand Down
36 changes: 32 additions & 4 deletions pkgs/development/interpreters/python/pypy/sqlite_paths.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,35 @@
diff -ur a/lib_pypy/_sqlite3_build.py b/lib_pypy/_sqlite3_build.py
--- a/lib_pypy/_sqlite3_build.py 2021-04-12 01:11:48.000000000 -0400
+++ b/lib_pypy/_sqlite3_build.py 2021-07-14 18:08:33.000000000 -0400
@@ -301,6 +301,8 @@
diff --git a/lib_pypy/_sqlite3_build.py b/lib_pypy/_sqlite3_build.py
index 2a4e573..92ab786 100644
--- a/lib_pypy/_sqlite3_build.py
+++ b/lib_pypy/_sqlite3_build.py
@@ -352,7 +352,7 @@ def _has_load_extension():
typedef ... sqlite3;
int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
""")
- libname = 'sqlite3'
+ libname = '@libsqlite@'
if sys.platform == 'win32':
import os
_libname = os.path.join(os.path.dirname(sys.executable), libname)
@@ -369,7 +369,7 @@ def _has_backup():
typedef ... sqlite3_backup;
sqlite3_backup* sqlite3_backup_init(sqlite3 *, const char* , sqlite3 *, const char*);
""")
- libname = 'sqlite3'
+ libname = '@libsqlite@'
if sys.platform == 'win32':
import os
_libname = os.path.join(os.path.dirname(sys.executable), libname)
@@ -383,7 +383,7 @@ def _get_version():
unverified_ffi.cdef("""
int sqlite3_libversion_number(void);
""")
- libname = 'sqlite3'
+ libname = '@libsqlite@'
if sys.platform == 'win32':
import os
_libname = os.path.join(os.path.dirname(sys.executable), libname)
@@ -554,6 +554,8 @@ if sys.platform.startswith('freebsd'):
else:
extra_args = dict(
libraries=libraries,
Expand Down
22 changes: 22 additions & 0 deletions pkgs/development/interpreters/python/pypy/sqlite_paths_2_7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/lib_pypy/_sqlite3_build.py b/lib_pypy/_sqlite3_build.py
index fb03aee..b3b5f39 100644
--- a/lib_pypy/_sqlite3_build.py
+++ b/lib_pypy/_sqlite3_build.py
@@ -234,7 +234,7 @@ def _has_load_extension():
typedef ... sqlite3;
int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
""")
- libname = 'sqlite3'
+ libname = '@libsqlite@'
if sys.platform == 'win32':
import os
_libname = os.path.join(os.path.dirname(sys.executable), libname)
@@ -257,6 +257,8 @@ if sys.platform.startswith('freebsd'):
else:
extra_args = dict(
libraries=libraries,
+ include_dirs=['@dev@/include'],
+ library_dirs=['@out@/lib']
)

_ffi.set_source("_sqlite3_cffi", "#include <sqlite3.h>", **extra_args)
1 change: 1 addition & 0 deletions pkgs/development/python-modules/pyflakes/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ buildPythonPackage rec {
disabledTests = lib.optionals isPyPy [
# https://github.com/PyCQA/pyflakes/issues/779
"test_eofSyntaxError"
"test_misencodedFileUTF16"
"test_misencodedFileUTF8"
"test_multilineSyntaxError"
];
Expand Down
Loading