uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
41
pkgs/development/python-modules/xnd/default.nix
Normal file
41
pkgs/development/python-modules/xnd/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, python
|
||||
, ndtypes
|
||||
, libndtypes
|
||||
, libxnd
|
||||
, isPy27
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
pname = "xnd";
|
||||
disabled = isPy27;
|
||||
inherit (libxnd) version src meta;
|
||||
|
||||
propagatedBuildInputs = [ ndtypes ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace 'include_dirs = ["libxnd", "ndtypes/python/ndtypes"] + INCLUDES' \
|
||||
'include_dirs = ["${libndtypes}/include", "${ndtypes}/include", "${libxnd}/include"]' \
|
||||
--replace 'library_dirs = ["libxnd", "ndtypes/libndtypes"] + LIBS' \
|
||||
'library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' \
|
||||
--replace 'runtime_library_dirs = ["$ORIGIN"]' \
|
||||
'runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' \
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir $out/include
|
||||
cp python/xnd/*.h $out/include
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
install_name_tool -add_rpath ${libxnd}/lib $out/${python.sitePackages}/xnd/_xnd.*.so
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
pushd python
|
||||
mv xnd _xnd
|
||||
python test_xnd.py
|
||||
popd
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue