1{ lib
2, buildPythonPackage
3, fetchpatch
4, fetchPypi
5, pythonAtLeast
6}:
7
8buildPythonPackage rec {
9 pname = "fn";
10 version = "0.4.3";
11
12 # Python 3.11 changed the API of the `inspect` module and fn was never
13 # updated to adapt; last commit was in 2014.
14 disabled = pythonAtLeast "3.11";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "1nmsjmn8jb4gp22ksx0j0hhdf4y0zm8rjykyy2i6flzimg6q1kgq";
19 };
20
21 patches = [
22 (fetchpatch {
23 url = "https://github.com/kachayev/fn.py/commit/a54fc0bd8aeae277de2db726131d249ce607c0c2.patch";
24 hash = "sha256-I0ZISOgVibsc1k7gwSfeW6qV9PspQqdaHlRLr/IusQ8=";
25 excludes = [
26 "fn/monad.py"
27 ];
28 })
29 ];
30
31 meta = with lib; {
32 description = ''
33 Functional programming in Python: implementation of missing
34 features to enjoy FP
35 '';
36 homepage = "https://github.com/kachayev/fn.py";
37 license = licenses.asl20;
38 };
39}