-
-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
due to NixOS/nixpkgs#251898 the compileDTS function has been moved to `device-tree` nixos-hardware has an own overlay for the raspberry-pi which needs the `compileDTS` function now, too. This commit adds it. Signed-off-by: Florian Brandes <[email protected]>
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# added this seperate compileDTS due to a change in nixpkgs which seperated `compileDTS` | ||
# see https://github.com/NixOS/nixpkgs/pull/251898 | ||
{ lib, stdenv, stdenvNoCC, dtc, libraspberrypi }: | ||
|
||
with lib; | ||
# Compile single Device Tree overlay source | ||
# file (.dts) into its compiled variant (.dtb) | ||
({ name | ||
, dtsFile | ||
, includePaths ? [ ] | ||
, extraPreprocessorFlags ? [ ] | ||
}: stdenv.mkDerivation { | ||
inherit name; | ||
|
||
nativeBuildInputs = [ dtc ]; | ||
|
||
buildCommand = | ||
let | ||
includeFlagsStr = lib.concatMapStringsSep " " (includePath: "-I${includePath}") includePaths; | ||
extraPreprocessorFlagsStr = lib.concatStringsSep " " extraPreprocessorFlags; | ||
in | ||
'' | ||
$CC -E -nostdinc ${includeFlagsStr} -undef -D__DTS__ -x assembler-with-cpp ${extraPreprocessorFlagsStr} ${dtsFile} | \ | ||
dtc -I dts -O dtb -@ -o $out | ||
''; | ||
}) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters