about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNikolay Korotkiy <sikmir@disroot.org>2022-11-15 18:25:03 +0300
committerBjørn Forsman <bjorn.forsman@gmail.com>2022-11-18 12:45:23 +0100
commit9e4a35d13f528b0195c1be79613f6c25cbf02646 (patch)
treef1b2666d7d9b918fba03993051377f5f333326b3
parent4c43ce2587c2603ce615ef52dde88b22af02c63a (diff)
libmodbus: 3.1.7 → 3.1.8, enable on darwin
-rw-r--r--pkgs/development/libraries/libmodbus/default.nix16
1 files changed, 10 insertions, 6 deletions
diff --git a/pkgs/development/libraries/libmodbus/default.nix b/pkgs/development/libraries/libmodbus/default.nix
index d5a5647837dd9..1ce3b0d4a0079 100644
--- a/pkgs/development/libraries/libmodbus/default.nix
+++ b/pkgs/development/libraries/libmodbus/default.nix
@@ -1,14 +1,18 @@
-{ lib, stdenv, fetchurl }:
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
 
 stdenv.mkDerivation rec {
   pname = "libmodbus";
-  version = "3.1.7";
+  version = "3.1.8";
 
-  src = fetchurl {
-    url = "http://libmodbus.org/releases/libmodbus-${version}.tar.gz";
-    sha256 = "sha256-ff6VhDHQVwsnHhpbMpt2pljonGFM8RnrWq23Jch/j70=";
+  src = fetchFromGitHub {
+    owner = "stephane";
+    repo = "libmodbus";
+    rev = "v${version}";
+    hash = "sha256-rIsMTSyctPZmIh6hFeL3MxyNzey0+iOc2lbBKTkE7To=";
   };
 
+  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)
@@ -23,7 +27,7 @@ stdenv.mkDerivation rec {
     description = "Library to send/receive data according to the Modbus protocol";
     homepage = "https://libmodbus.org/";
     license = licenses.lgpl21Plus;
-    platforms = platforms.linux;
+    platforms = platforms.unix;
     maintainers = [ maintainers.bjornfor ];
   };
 }