dtc: fix Python support
This commit is contained in:
parent
20de44845d
commit
53489b496e
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, lib, fetchgit, flex, bison, pkgconfig, which
|
{ stdenv, lib, fetchgit, flex, bison, pkgconfig, which
|
||||||
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform, python2, swig
|
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform, python, swig
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -12,14 +12,14 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1jhhfrg22h53lvm2lqhd66pyk20pil08ry03wcwyx1c3ln27k73z";
|
sha256 = "1jhhfrg22h53lvm2lqhd66pyk20pil08ry03wcwyx1c3ln27k73z";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ flex bison pkgconfig which ] ++ lib.optionals pythonSupport [ python2 swig ];
|
nativeBuildInputs = [ flex bison pkgconfig which ] ++ lib.optionals pythonSupport [ python swig ];
|
||||||
buildInputs = lib.optionals pythonSupport [ python2 ];
|
buildInputs = lib.optionals pythonSupport [ python ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs pylibfdt/
|
patchShebangs pylibfdt/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = lib.optionals (!pythonSupport) [ "NO_PYTHON=1" ];
|
makeFlags = [ "PYTHON=python" ];
|
||||||
installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];
|
installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -2145,9 +2145,9 @@ in {
|
|||||||
|
|
||||||
libais = callPackage ../development/python-modules/libais { };
|
libais = callPackage ../development/python-modules/libais { };
|
||||||
|
|
||||||
libfdt = disabledIf isPy3k (toPythonModule (pkgs.dtc.override {
|
libfdt = toPythonModule (pkgs.dtc.override {
|
||||||
python2 = python;
|
inherit python;
|
||||||
}));
|
});
|
||||||
|
|
||||||
libtmux = callPackage ../development/python-modules/libtmux { };
|
libtmux = callPackage ../development/python-modules/libtmux { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user