2014-06-14 19:45:43 +00:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-19 19:14:32 +00:00
|
|
|
name = "libmodbus-3.1.6";
|
2014-06-14 19:45:43 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://libmodbus.org/releases/${name}.tar.gz";
|
2019-08-19 19:14:32 +00:00
|
|
|
sha256 = "05kwz0n5gn9m33cflzv87lz3zp502yp8fpfzbx70knvfl6agmnfp";
|
2014-06-14 19:45:43 +00:00
|
|
|
};
|
|
|
|
|
2019-03-16 15:53:14 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2014-06-14 19:45:43 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Library to send/receive data according to the Modbus protocol";
|
2019-04-14 23:25:45 +00:00
|
|
|
homepage = https://libmodbus.org/;
|
2014-06-14 19:45:43 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|