mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
34 lines
1.0 KiB
Nix
34 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 ];
|
|
};
|
|
}
|