2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2022-11-21 17:40:18 +00:00
|
|
|
, meson, ninja, pkg-config, cmake
|
2021-02-05 17:12:51 +00:00
|
|
|
, libtirpc, rpcsvc-proto, avahi, libxml2
|
|
|
|
}:
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-02-05 17:12:51 +00:00
|
|
|
pname = "liblxi";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "1.21";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lxi-tools";
|
|
|
|
repo = "liblxi";
|
2024-06-20 14:57:18 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-ZRUYwMy+vvNClHxctoTMDlbnCSp2A0L9roo5KXWCMpI=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
postPatch = ''
|
|
|
|
# needed by darwin
|
|
|
|
sed -e 1i'#include <string.h>' \
|
|
|
|
-e 1i'#include <stdlib.h>' \
|
|
|
|
-i src/bonjour.c
|
|
|
|
'';
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
nativeBuildInputs = [ meson ninja cmake pkg-config rpcsvc-proto ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
2023-07-15 17:15:38 +00:00
|
|
|
libtirpc
|
|
|
|
avahi
|
|
|
|
] ++ [
|
|
|
|
libxml2
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for communicating with LXI compatible instruments";
|
|
|
|
longDescription = ''
|
|
|
|
liblxi is an open source software library which offers a simple
|
|
|
|
API for communicating with LXI compatible instruments.
|
|
|
|
The API allows applications to easily discover instruments
|
|
|
|
on networks and communicate SCPI commands.
|
|
|
|
'';
|
|
|
|
homepage = "https://lxi-tools.github.io/";
|
|
|
|
license = licenses.bsd3;
|
2023-07-15 17:15:38 +00:00
|
|
|
platforms = platforms.unix;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = [ maintainers.vq ];
|
|
|
|
};
|
2024-06-20 14:57:18 +00:00
|
|
|
})
|