let crossPkgs = import { crossSystem = { config = "mips-unknown-linux-musl"; platform = { name = "fritzbox"; kernelMajor = "4.4"; kernelArch = "mips"; gcc = { arch = "mips32"; float = "soft"; }; }; }; crossOverlays = [ (import ) ]; overlays = [ (self: super: rec { }) ]; config.allowUnsupportedSystem = true; }; pkgs = import {}; in crossPkgs.stdenv.mkDerivation { name = "fritzbox-exporter"; nativeBuildInputs = [ pkgs.nim ]; src = ./.; buildPhase = '' runHook preBuild nim c --cpu:mips -d:release --nimcache:$PWD src/fb_exporter_client.nim runHook postBuild ''; installPhase = '' runHook preInstall install -Dm755 src/fb_exporter_client $out/bin/fb_exporter_client runHook postInstall ''; }