From 83b9550e91877364aa43c249a33947661be6dc2c Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 12 May 2024 20:13:06 +0200 Subject: [PATCH] liblxi: fix darwin build, use finalAttrs (cherry picked from commit 78da6b378b84f3217890f2b1db98f8a838ed8375) --- pkgs/development/libraries/liblxi/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/liblxi/default.nix b/pkgs/development/libraries/liblxi/default.nix index 8531c8ea7c4c5..24c454d4ee7e8 100644 --- a/pkgs/development/libraries/liblxi/default.nix +++ b/pkgs/development/libraries/liblxi/default.nix @@ -3,17 +3,24 @@ , libtirpc, rpcsvc-proto, avahi, libxml2 }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "liblxi"; version = "1.20"; src = fetchFromGitHub { owner = "lxi-tools"; repo = "liblxi"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-jS0huNkbyKrsJ3NkenrYtjkzLakOsTJpwlgSo98ribE="; }; + postPatch = '' + # needed by darwin + sed -e 1i'#include ' \ + -e 1i'#include ' \ + -i src/bonjour.c + ''; + nativeBuildInputs = [ meson ninja cmake pkg-config rpcsvc-proto ]; buildInputs = lib.optionals (!stdenv.isDarwin) [ @@ -36,4 +43,4 @@ stdenv.mkDerivation rec { platforms = platforms.unix; maintainers = [ maintainers.vq ]; }; -} +})