lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

python2Packages.scandir: revert removal

This reverts commit 7d4a0668d26c39bfcd1b40b21b7d169cedbfe9aa.

Closes https://github.com/NixOS/nixpkgs/issues/205742

authored by

Fabián Heredia Montiel and committed by
Robert Schütz
8549e49c 38358880

+54
+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
+24
pkgs/development/python2-modules/scandir/default.nix
··· 1 + { lib, python, buildPythonPackage, fetchPypi }: 2 + 3 + buildPythonPackage rec { 4 + pname = "scandir"; 5 + version = "1.10.0"; 6 + 7 + src = fetchPypi { 8 + inherit pname version; 9 + sha256 = "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"; 10 + }; 11 + 12 + patches = [ 13 + ./add-aarch64-darwin-dirent.patch 14 + ]; 15 + 16 + checkPhase = "${python.interpreter} test/run_tests.py"; 17 + 18 + meta = with lib; { 19 + description = "A better directory iterator and faster os.walk()"; 20 + homepage = "https://github.com/benhoyt/scandir"; 21 + license = licenses.gpl3; 22 + maintainers = with maintainers; [ abbradar ]; 23 + }; 24 + }
+2
pkgs/top-level/python2-packages.nix
··· 67 67 68 68 rpm = disabled super.rpm; 69 69 70 + scandir = callPackage ../development/python2-modules/scandir { }; 71 + 70 72 sequoia = disabled super.sequoia; 71 73 72 74 setuptools = callPackage ../development/python2-modules/setuptools { };