Skip to content

Commit

Permalink
dtc: add yaml support and enable tests (NixOS#118700)
Browse files Browse the repository at this point in the history
  • Loading branch information
tnias authored and cideM committed Apr 9, 2021
1 parent 3b49bb6 commit af507c6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkgs/development/compilers/dtc/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{ stdenv, lib, fetchgit, flex, bison, pkg-config, which
, pythonSupport ? false, python ? null, swig
, pythonSupport ? false, python, swig, libyaml
}:

assert pythonSupport -> python != null;

stdenv.mkDerivation rec {
pname = "dtc";
version = "1.6.0";
Expand All @@ -14,6 +12,7 @@ stdenv.mkDerivation rec {
sha256 = "0li992wwd7kgy71bikanqky49y4hq3p3vx35p2hvyxy1k0wfy7i8";
};

buildInputs = [ libyaml ];
nativeBuildInputs = [ flex bison pkg-config which ] ++ lib.optionals pythonSupport [ python swig ];

postPatch = ''
Expand All @@ -23,10 +22,12 @@ stdenv.mkDerivation rec {
makeFlags = [ "PYTHON=python" ];
installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];

doCheck = true;

meta = with lib; {
description = "Device Tree Compiler";
homepage = "https://git.kernel.org/cgit/utils/dtc/dtc.git";
license = licenses.gpl2; # dtc itself is GPLv2, libfdt is dual GPL/BSD
license = licenses.gpl2Plus; # dtc itself is GPLv2, libfdt is dual GPL/BSD
maintainers = [ maintainers.dezgeg ];
platforms = platforms.unix;
};
Expand Down

0 comments on commit af507c6

Please sign in to comment.