Skip to content

Commit

Permalink
liblxi: fix darwin build, use finalAttrs
Browse files Browse the repository at this point in the history
  • Loading branch information
TomaSajt committed May 14, 2024
1 parent 9f7053f commit 78da6b3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkgs/development/libraries/liblxi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 <string.h>' \
-e 1i'#include <stdlib.h>' \
-i src/bonjour.c
'';

nativeBuildInputs = [ meson ninja cmake pkg-config rpcsvc-proto ];

buildInputs = lib.optionals (!stdenv.isDarwin) [
Expand All @@ -36,4 +43,4 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
maintainers = [ maintainers.vq ];
};
}
})

0 comments on commit 78da6b3

Please sign in to comment.