about summary refs log tree commit diff
path: root/pkgs/development/python2-modules/scandir/default.nix
diff options
context:
space:
mode:
authorFabián Heredia Montiel <fabianhjr@protonmail.com>2022-12-12 11:11:10 -0600
committerRobert Schütz <github@dotlambda.de>2022-12-15 00:28:46 -0800
commit8549e49c1833197f71e62e6d3f51bf72d4338ee2 (patch)
tree3abb25c472eb49c3b224a36a8618b5e16416b89f /pkgs/development/python2-modules/scandir/default.nix
parent38358880b31c619a4596f3a462095a7f41ed0eb1 (diff)
python2Packages.scandir: revert removal
This reverts commit 7d4a0668d26c39bfcd1b40b21b7d169cedbfe9aa.

Closes https://github.com/NixOS/nixpkgs/issues/205742
Diffstat (limited to 'pkgs/development/python2-modules/scandir/default.nix')
-rw-r--r--pkgs/development/python2-modules/scandir/default.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/pkgs/development/python2-modules/scandir/default.nix b/pkgs/development/python2-modules/scandir/default.nix
new file mode 100644
index 0000000000000..e712cca8348d1
--- /dev/null
+++ b/pkgs/development/python2-modules/scandir/default.nix
@@ -0,0 +1,24 @@
+{ lib, python, buildPythonPackage, fetchPypi }:
+
+buildPythonPackage rec {
+  pname = "scandir";
+  version = "1.10.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd";
+  };
+
+  patches = [
+    ./add-aarch64-darwin-dirent.patch
+  ];
+
+  checkPhase = "${python.interpreter} test/run_tests.py";
+
+  meta = with lib; {
+    description = "A better directory iterator and faster os.walk()";
+    homepage = "https://github.com/benhoyt/scandir";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}