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
42
pkgs/development/python-modules/pyeclib/default.nix
Normal file
42
pkgs/development/python-modules/pyeclib/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, liberasurecode, six }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyeclib";
|
||||
version = "unstable-2022-03-11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "openstack";
|
||||
repo = "pyeclib";
|
||||
rev = "b50040969a03f7566ffcb468336e875d21486113";
|
||||
sha256 = "sha256-nYYjocStC0q/MC6pum3J4hlXiu/R5xODwIE97Ho3iEY=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# patch dlopen call
|
||||
substituteInPlace src/c/pyeclib_c/pyeclib_c.c \
|
||||
--replace "liberasurecode.so" "${liberasurecode}/lib/liberasurecode.so"
|
||||
# python's platform.platform() doesn't return "Darwin" (anymore?)
|
||||
substituteInPlace setup.py \
|
||||
--replace '"Darwin"' '"macOS"'
|
||||
'';
|
||||
|
||||
preBuild = let
|
||||
ldLibraryPathEnvName = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
|
||||
in ''
|
||||
# required for the custom _find_library function in setup.py
|
||||
export ${ldLibraryPathEnvName}="${lib.makeLibraryPath [ liberasurecode ]}"
|
||||
'';
|
||||
|
||||
buildInputs = [ liberasurecode ];
|
||||
|
||||
checkInputs = [ six ];
|
||||
|
||||
pythonImportsCheck = [ "pyeclib" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "This library provides a simple Python interface for implementing erasure codes.";
|
||||
homepage = "https://github.com/openstack/pyeclib";
|
||||
license = licenses.bsd2;
|
||||
maintainers = teams.openstack.members;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue