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 { 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; {

View File

@ -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 { };