python.pkgs.pybfd: support split libbfd and libopcodes
PR #30484 (f8741c38cd
) has split libbfd and
libopcodes from binutils and gdb. The original pybfd setup.py is completely
unsuitable to handle that. This commit replaces the original source with a fork
with a patched setup.py.
This commit is contained in:
parent
b089c21506
commit
130bf93bb4
@ -1,25 +1,27 @@
|
|||||||
{ lib, buildPythonPackage, isPyPy, isPy3k, fetchurl, gdb, libbfd }:
|
{ lib, fetchFromGitHub, buildPythonPackage, isPyPy, isPy3k, libbfd, libopcodes }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
name = "pybfd-0.1.1";
|
name = "pybfd-0.1.1";
|
||||||
|
|
||||||
disabled = isPyPy || isPy3k;
|
disabled = isPyPy || isPy3k;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "mirror://pypi/p/pybfd/${name}.tar.gz";
|
owner = "orivej";
|
||||||
sha256 = "d99b32ad077e704ddddc0b488c83cae851c14919e5cbc51715d00464a1932df4";
|
repo = "pybfd";
|
||||||
|
rev = "a2c3a7b94a3c9f7a353b863f69a79174c6a41ebe";
|
||||||
|
sha256 = "0wrz234dz25hs0ajzcz5w8lzc1yzf64wqa8fj01hhr4yy23vjkcr";
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
LIBBFD_INCLUDE_DIR = "${libbfd.dev}/include";
|
||||||
substituteInPlace setup.py \
|
LIBBFD_LIBRARY = "${libbfd}/lib/libbfd.so";
|
||||||
--replace '"/usr/include"' '"${gdb}/include"' \
|
LIBOPCODES_INCLUDE_DIR = "${libopcodes.dev}/include";
|
||||||
--replace '"/usr/lib"' '"${libbfd}/lib"'
|
LIBOPCODES_LIBRARY = "${libopcodes}/lib/libopcodes.so";
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = https://github.com/Groundworkstech/pybfd;
|
homepage = https://github.com/Groundworkstech/pybfd;
|
||||||
description = "A Python interface to the GNU Binary File Descriptor (BFD) library";
|
description = "A Python interface to the GNU Binary File Descriptor (BFD) library";
|
||||||
license = lib.licenses.gpl2;
|
license = lib.licenses.gpl2;
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
|
maintainers = with lib.maintainers; [ orivej ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user