Skip to content

Commit

Permalink
Add xmake derivation with json fix
Browse files Browse the repository at this point in the history
The xmake derivation in nixpkgs uses `lua.pkgs.cjson`,
but xmake has it's own patched version of `cjson`
with hex literals support.
The CHERIoT RTOS requires hex literals to build.

This derivation uses the internal patched version `cjson`.

Note, there is a second fallback json parser within in xmake
which doesn't have hex literal support either.

Co-authored-by: Gary Guo <[email protected]>
  • Loading branch information
HU90m and nbdd0121 committed Jan 19, 2024
1 parent b140867 commit ff56df0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
bazel_ot = pkgs.callPackage ./bazel_ot {};
llvm_cheriot = pkgs.callPackage ./llvm_cheriot.nix {};
ibex-cosim = pkgs.callPackage ./ibex-cosim.nix {};
xmake = pkgs.callPackage ./xmake.nix {};
}
// pkgs.lib.optionalAttrs (pkgs.system == "x86_64-linux") {
lowrisc-toolchain-gcc-rv32imcb = pkgs.callPackage ./lowrisc-toolchain-gcc-rv32imcb.nix {};
Expand Down
9 changes: 9 additions & 0 deletions pkgs/xmake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
pkgs,
lua,
}:
pkgs.xmake.overrideAttrs (prev: {
buildInputs = builtins.filter (input: input != lua.pkgs.cjson) prev.buildInputs;
configureFlags = [];
enableParallelBuilding = true;
})

0 comments on commit ff56df0

Please sign in to comment.