Zig_0_10 的无效编译参数

{
  lib,
  stdenv,
  fetchFromGitHub,
  zig_0_10,
}:

stdenv.mkDerivation rec {
  pname = "chinadns-ng";
  version = "2024.12.22";

  src = fetchFromGitHub {
    owner = "zfl9";
    repo = "chinadns-ng";
    rev = version;
    hash = "sha256-oV0sdlVBG/d0eVdHdvruAH9ketsWOsois6Uw/dCEMkA=";
  };

  nativeBuildInputs = [ zig_0_10.hook ];

  meta = {
    description = "Chinadns 重构增强版,支持域名分流、ipset/nftset、UDP/TCP/DoT";
    homepage = "https://github.com/zfl9/chinadns-ng";
    license = lib.licenses.agpl3Only;
    maintainers = with lib.maintainers; [ zxc ];
    mainProgram = "chinadns-ng";
    inherit (zig_0_10.meta) platforms;
  };
}

error: Invalid option: -Drelease-safe

:cry:

我们在 24.11 之后放弃了对 Zig 0.10 的支持。不过,Zig 0.10 似乎早于standardOptimizeOption。这就导致了这样的问题,因为每个软件包都有自己的优化处理方式。

2 Likes