nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

Merge pull request #193680 from wegank/gimp-aarch64-darwin

authored by

Sandro and committed by
GitHub
5ecf65eb 445e6eec

+44 -14
+3 -11
pkgs/development/misc/resholve/resholve.nix
··· 19 19 20 20 propagatedBuildInputs = [ 21 21 oildev 22 - /* 23 - Disable configargparse's tests on aarch64-darwin. 24 - Several of py27 scandir's tests fail on aarch64-darwin. Chain: 25 - configargparse -> pytest-check-hook -> pytest -> pathlib2 -> scandir 26 - TODO: drop if https://github.com/NixOS/nixpkgs/issues/156807 resolves? 27 - */ 28 - (python27Packages.configargparse.overridePythonAttrs (old: { 29 - doCheck = stdenv.hostPlatform.system != "aarch64-darwin"; 30 - })) 22 + python27Packages.configargparse 31 23 ]; 32 24 33 - patchPhase = '' 25 + postPatch = '' 34 26 for file in setup.cfg _resholve/version.py; do 35 27 substituteInPlace $file --subst-var-by version ${version} 36 28 done 37 29 ''; 38 30 39 - postInstall = '' 31 + postInstall = '' 40 32 installManPage resholve.1 41 33 ''; 42 34
+6 -1
pkgs/development/python-modules/pygobject/default.nix
··· 1 - { lib, stdenv, fetchurl, python, buildPythonPackage, pkg-config, glib, isPy3k, pythonAtLeast }: 1 + { lib, stdenv, fetchurl, fetchpatch, python, buildPythonPackage, pkg-config, glib, isPy3k, pythonAtLeast }: 2 2 3 3 buildPythonPackage rec { 4 4 pname = "pygobject"; ··· 15 15 16 16 patches = lib.optionals stdenv.isDarwin [ 17 17 ./pygobject-2.0-fix-darwin.patch 18 + (fetchpatch { 19 + url = "https://github.com/macports/macports-ports/raw/f2975d5bbbc2459c661905c5a850cc661fa32f55/python/py-gobject/files/py-gobject-dynamic_lookup-11.patch"; 20 + sha256 = "sha256-mtlyu+La3+iC5iQAmVJzDA5E35XGaRQy/EKXzvrWRCg="; 21 + extraPrefix = ""; 22 + }) 18 23 ]; 19 24 20 25 configureFlags = [ "--disable-introspection" ];
+2 -1
pkgs/development/python2-modules/pygtk/default.nix
··· 37 37 38 38 buildPhase = "buildPhase"; 39 39 40 - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-ObjC"; 40 + NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-ObjC" 41 + ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "-lpython2.7"; 41 42 42 43 installPhase = "installPhase"; 43 44
+28
pkgs/development/python2-modules/scandir/add-aarch64-darwin-dirent.patch
··· 1 + diff --git a/scandir.py b/scandir.py 2 + index 3f602fb..40af3e5 100644 3 + --- a/scandir.py 4 + +++ b/scandir.py 5 + @@ -23,6 +23,7 @@ from os import listdir, lstat, stat, strerror 6 + from os.path import join, islink 7 + from stat import S_IFDIR, S_IFLNK, S_IFREG 8 + import collections 9 + +import platform 10 + import sys 11 + 12 + try: 13 + @@ -432,6 +433,15 @@ elif sys.platform.startswith(('linux', 'darwin', 'sunos5')) or 'bsd' in sys.plat 14 + ('__d_padding', ctypes.c_uint8 * 4), 15 + ('d_name', ctypes.c_char * 256), 16 + ) 17 + + elif 'darwin' in sys.platform and 'arm64' in platform.machine(): 18 + + _fields_ = ( 19 + + ('d_ino', ctypes.c_uint64), 20 + + ('d_off', ctypes.c_uint64), 21 + + ('d_reclen', ctypes.c_uint16), 22 + + ('d_namlen', ctypes.c_uint16), 23 + + ('d_type', ctypes.c_uint8), 24 + + ('d_name', ctypes.c_char * 1024), 25 + + ) 26 + else: 27 + _fields_ = ( 28 + ('d_ino', ctypes.c_uint32), # must be uint32, not ulong
+5 -1
pkgs/development/python2-modules/scandir/default.nix
··· 6 6 7 7 src = fetchPypi { 8 8 inherit pname version; 9 - sha256 ="1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"; 9 + sha256 = "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"; 10 10 }; 11 + 12 + patches = [ 13 + ./add-aarch64-darwin-dirent.patch 14 + ]; 11 15 12 16 checkPhase = "${python.interpreter} test/run_tests.py"; 13 17