2021-08-05 21:33:18 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, python3
|
2022-10-30 15:09:59 +00:00
|
|
|
, nix-update-script
|
|
|
|
, testers
|
2021-08-05 21:33:18 +00:00
|
|
|
}:
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "libvarlink";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "23";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "varlink";
|
2022-10-30 15:09:59 +00:00
|
|
|
repo = finalAttrs.pname;
|
|
|
|
rev = finalAttrs.version;
|
|
|
|
sha256 = "sha256-oUy9HhybNMjRBWoqqal1Mw8cC5RddgN4izxAl0cgnKE=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace varlink-wrapper.py \
|
|
|
|
--replace "/usr/bin/env python3" "${python3}/bin/python3"
|
|
|
|
|
|
|
|
# test-object: ../lib/test-object.c:129: main: Assertion `setlocale(LC_NUMERIC, "de_DE.UTF-8") != 0' failed.
|
|
|
|
# PR that added it https://github.com/varlink/libvarlink/pull/27
|
|
|
|
substituteInPlace lib/test-object.c \
|
|
|
|
--replace 'assert(setlocale(LC_NUMERIC, "de_DE.UTF-8") != 0);' ""
|
|
|
|
|
|
|
|
patchShebangs lib/test-symbols.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = finalAttrs.pname;
|
|
|
|
};
|
|
|
|
tests = {
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
command = "varlink --version";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "C implementation of the Varlink protocol and command line tool";
|
|
|
|
homepage = "https://github.com/varlink/libvarlink";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ artturin ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2022-10-30 15:09:59 +00:00
|
|
|
})
|