1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

Merge pull request #319868 from NixOS/backport-311131-to-release-24.05

[Backport release-24.05] liblxi: fix darwin build, use finalAttrs
This commit is contained in:
Weijia Wang 2024-06-17 05:08:22 +02:00 committed by GitHub
commit c0273b5a48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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) [
@ -36,4 +43,4 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
maintainers = [ maintainers.vq ];
};
}
})