From 01cf5e4d680cdd1c67907c28a06b3ac07ccd9a51 Mon Sep 17 00:00:00 2001 From: tnias Date: Fri, 9 Apr 2021 02:02:36 +0200 Subject: [PATCH] dtc: add yaml support and enable tests (#118700) --- pkgs/development/compilers/dtc/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/dtc/default.nix b/pkgs/development/compilers/dtc/default.nix index 245e5bf2f54..ac1acfe4b8f 100644 --- a/pkgs/development/compilers/dtc/default.nix +++ b/pkgs/development/compilers/dtc/default.nix @@ -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"; @@ -14,6 +12,7 @@ stdenv.mkDerivation rec { sha256 = "0li992wwd7kgy71bikanqky49y4hq3p3vx35p2hvyxy1k0wfy7i8"; }; + buildInputs = [ libyaml ]; nativeBuildInputs = [ flex bison pkg-config which ] ++ lib.optionals pythonSupport [ python swig ]; postPatch = '' @@ -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; };