blob: 2110f3628a8034ce496f1f313955d4c5bc831507 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, libndtypes
, isPy27
}:
buildPythonPackage {
pname = "ndtypes";
disabled = isPy27;
inherit (libndtypes) version src meta;
propagatedBuildInputs = [ numpy ];
postPatch = ''
substituteInPlace setup.py \
--replace 'include_dirs = ["libndtypes"]' \
'include_dirs = ["${libndtypes}/include"]' \
--replace 'library_dirs = ["libndtypes"]' \
'library_dirs = ["${libndtypes}/lib"]' \
--replace 'runtime_library_dirs = ["$ORIGIN"]' \
'runtime_library_dirs = ["${libndtypes}/lib"]'
'';
postInstall = ''
mkdir $out/include
cp python/ndtypes/*.h $out/include
'';
}
|