nixpkgs/pkgs/development/compilers/dtc/default.nix
Rouven Czerwinski 22371fd67f dtc: 1.6.0 -> 1.6.1
New upstream release:
Changes since v1.6.0 include:
 * A number of bugfixes
 * Fix many warnings with -Wsign-compare
 * Add compilation with meson (not used by default so far)
 * Yet another revamp of how we handle unaligned accesses
 * Added a number of extra checks for common tree errors
   * Checks for interrupt providers
   * i2c reg properties
   * Tighten checking of gpio properties
 * Reduce dependencies when building libfdt only
 * Allow libfdt.h header to be used from C++ more easily
 * Accept .dtbo extension for overlays
 * Update valid node and property characters to match current devicetree spec
 * Add several checks for root node sanity in fdt_check_full()
 * Somewhat more robust type labelling for the benefit of yaml output
2021-08-23 12:45:14 +02:00

36 lines
1.1 KiB
Nix

{ stdenv, lib, fetchgit, flex, bison, pkg-config, which
, pythonSupport ? false, python ? null, swig, libyaml
}:
stdenv.mkDerivation rec {
pname = "dtc";
version = "1.6.1";
src = fetchgit {
url = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git";
rev = "refs/tags/v${version}";
sha256 = "sha256-gx9LG3U9etWhPxm7Ox7rOu9X5272qGeHqZtOe68zFs4=";
};
buildInputs = [ libyaml ];
nativeBuildInputs = [ flex bison pkg-config which ] ++ lib.optionals pythonSupport [ python swig ];
postPatch = ''
patchShebangs pylibfdt/
'';
makeFlags = [ "PYTHON=python" ];
installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];
# Checks are broken on aarch64 darwin
# https://github.com/NixOS/nixpkgs/pull/118700#issuecomment-885892436
doCheck = !stdenv.isDarwin;
meta = with lib; {
description = "Device Tree Compiler";
homepage = "https://git.kernel.org/cgit/utils/dtc/dtc.git";
license = licenses.gpl2Plus; # dtc itself is GPLv2, libfdt is dual GPL/BSD
maintainers = [ maintainers.dezgeg ];
platforms = platforms.unix;
};
}