Files
nixpkgs/pkgs/by-name/li/libmodbus/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

39 lines
1.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
}:
stdenv.mkDerivation rec {
pname = "libmodbus";
version = "3.1.11";
src = fetchFromGitHub {
owner = "stephane";
repo = "libmodbus";
rev = "v${version}";
hash = "sha256-d/diR9yeV0WY0C6wqxYZfOjEKFeWTvN73MxcWtXPOJc=";
};
nativeBuildInputs = [ autoreconfHook ];
configureFlags = [
# when cross-compiling we assume that the host system will return a valid
# pointer for calls to malloc(0) or realloc(0)
# https://www.uclibc.org/FAQ.html#gnu_malloc
# https://www.gnu.org/software/autoconf/manual/autoconf.html#index-AC_005fFUNC_005fMALLOC-454
# the upstream source should be patched to avoid needing this
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
];
meta = with lib; {
description = "Library to send/receive data according to the Modbus protocol";
homepage = "https://libmodbus.org/";
license = licenses.lgpl21Plus;
platforms = with platforms; unix ++ windows;
maintainers = [ maintainers.bjornfor ];
};
}