2024-01-24 12:50:41 +01:00
|
|
|
|
{ config, lib, pkgs, modulesPath, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
nixpkgs.crossSystem = {
|
|
|
|
|
system = "riscv64-linux";
|
|
|
|
|
gcc.arch = "rv64g";
|
|
|
|
|
gcc.tune = "rv64g";
|
|
|
|
|
};
|
2024-03-01 18:31:57 +01:00
|
|
|
|
|
|
|
|
|
# FIXME: Broken as rustc injects compressed instructions.
|
|
|
|
|
# For now we disable it.
|
|
|
|
|
services.nscd.enableNsncd = false;
|
2024-03-04 14:44:49 +01:00
|
|
|
|
|
|
|
|
|
boot.kernelPatches = [ {
|
|
|
|
|
name = "disable-compressed";
|
|
|
|
|
patch = null;
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
RISCV_ISA_C n
|
|
|
|
|
NONPORTABLE y
|
|
|
|
|
EFI n
|
|
|
|
|
'';
|
|
|
|
|
} ];
|
2024-03-07 12:04:05 +01:00
|
|
|
|
|
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
|
(final: prev: {
|
|
|
|
|
# Fix GCC 13 format-overflow warning/error:
|
|
|
|
|
# ../src/shared/install.c:444:64: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
|
|
|
|
|
# 444 | err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.",
|
|
|
|
|
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
systemd = prev.systemd.overrideAttrs (old: {
|
|
|
|
|
CFLAGS = "-Wno-error=format-overflow";
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
];
|
2024-01-24 12:50:41 +01:00
|
|
|
|
}
|