dtc: fix Python support

This commit is contained in:
Ben Wolsieffer 2019-09-21 21:23:48 -04:00 committed by Bjørn Forsman
parent 20de44845d
commit 53489b496e
2 changed files with 7 additions and 7 deletions

View file

@ -1,5 +1,5 @@
{ stdenv, lib, fetchgit, flex, bison, pkgconfig, which
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform, python2, swig
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform, python, swig
}:
stdenv.mkDerivation rec {
@ -12,14 +12,14 @@ stdenv.mkDerivation rec {
sha256 = "1jhhfrg22h53lvm2lqhd66pyk20pil08ry03wcwyx1c3ln27k73z";
};
nativeBuildInputs = [ flex bison pkgconfig which ] ++ lib.optionals pythonSupport [ python2 swig ];
buildInputs = lib.optionals pythonSupport [ python2 ];
nativeBuildInputs = [ flex bison pkgconfig which ] ++ lib.optionals pythonSupport [ python swig ];
buildInputs = lib.optionals pythonSupport [ python ];
postPatch = ''
patchShebangs pylibfdt/
'';
makeFlags = lib.optionals (!pythonSupport) [ "NO_PYTHON=1" ];
makeFlags = [ "PYTHON=python" ];
installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];
meta = with lib; {

View file

@ -2145,9 +2145,9 @@ in {
libais = callPackage ../development/python-modules/libais { };
libfdt = disabledIf isPy3k (toPythonModule (pkgs.dtc.override {
python2 = python;
}));
libfdt = toPythonModule (pkgs.dtc.override {
inherit python;
});
libtmux = callPackage ../development/python-modules/libtmux { };