From a6e3802b11a08983b6023cea0a59ad5d3d2660c3 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Sun, 5 Jan 2025 21:13:59 +0800 Subject: [PATCH] libplctag: fix build --- pkgs/by-name/li/libplctag/package.nix | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/li/libplctag/package.nix b/pkgs/by-name/li/libplctag/package.nix index 3c6548073e04..b83fb999b2aa 100644 --- a/pkgs/by-name/li/libplctag/package.nix +++ b/pkgs/by-name/li/libplctag/package.nix @@ -5,27 +5,34 @@ fetchFromGitHub, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libplctag"; version = "2.6.3"; src = fetchFromGitHub { owner = "libplctag"; repo = "libplctag"; - rev = "v${version}"; - sha256 = "sha256-HUog7Tlm4jiqYXk22dziumCA/68c35+OwnTNYu9mV5E="; + tag = "v${finalAttrs.version}"; + hash = "sha256-HUog7Tlm4jiqYXk22dziumCA/68c35+OwnTNYu9mV5E="; + }; + + env = { + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=implicit-function-declaration" + "-Wno-error=int-conversion" + ]; }; nativeBuildInputs = [ cmake ]; - meta = with lib; { + meta = { homepage = "https://github.com/libplctag/libplctag"; description = "Library that uses EtherNet/IP or Modbus TCP to read and write tags in PLCs"; - license = with licenses; [ + license = with lib.licenses; [ lgpl2Plus mpl20 ]; - maintainers = with maintainers; [ petterstorvik ]; - platforms = platforms.all; + maintainers = with lib.maintainers; [ petterstorvik ]; + platforms = lib.platforms.all; }; -} +})