1{ lib
2, buildPythonPackage
3, fetchPypi
4, numpy
5}:
6
7buildPythonPackage rec {
8 pname = "oldest-supported-numpy";
9 version = "2023.8.3";
10 format = "setuptools";
11
12 src = fetchPypi {
13 inherit pname version;
14 hash = "sha256-yJp+wzsihagnI3crGPDBo+CqbVO4Xhxulj/o/NitxU0=";
15 };
16
17 # The purpose of oldest-supported-numpy is to build a project against the
18 # oldest version of numpy for a given Python distribution in order to build
19 # a binary that is compatible with the largest possible versons of numpy.
20 # We only build against one version of numpy in nixpkgs, so instead we only
21 # want to make sure that we have a version above the minimum.
22 #
23 postPatch = ''
24 substituteInPlace setup.cfg \
25 --replace 'numpy==' 'numpy>='
26 '';
27
28 propagatedBuildInputs = [
29 numpy
30 ];
31
32 # package has no tests
33 doCheck = false;
34
35 meta = with lib; {
36 description = "Meta-package providing the oldest supported Numpy for a given Python version and platform";
37 homepage = "https://github.com/scipy/oldest-supported-numpy";
38 license = licenses.bsd2;
39 maintainers = with maintainers; [ tjni ];
40 };
41}