Merge pull request #315681 from sikmir/knxd

knxd: fix cross-compilation
This commit is contained in:
Artturin 2024-06-06 16:28:37 +03:00 committed by GitHub
commit 9d907b831f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 9 deletions

View File

@ -1,5 +1,6 @@
{ lib
, stdenv
, buildPackages
, fetchFromGitHub
, autoreconfHook
, pkg-config
@ -12,19 +13,19 @@
, withUsb ? stdenv.isLinux, libusb1
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "knxd";
version = "0.14.61";
src = fetchFromGitHub {
owner = "knxd";
repo = "knxd";
rev = version;
rev = finalAttrs.version;
hash = "sha256-b8svjGaxW8YqonhXewebDUitezKoMcZxcUFGd2EKZQ4=";
};
postPatch = ''
sed -i '2i echo ${version}; exit' tools/version.sh
sed -i '2i echo ${finalAttrs.version}; exit' tools/version.sh
sed -i '2i exit' tools/get_libfmt
'';
@ -35,8 +36,12 @@ stdenv.mkDerivation rec {
++ lib.optional withUsb libusb1
++ lib.optional stdenv.isDarwin argp-standalone;
configureFlags = lib.optional (!withSystemd) "--disable-systemd"
++ lib.optional (!withUsb) "--disable-usb";
configureFlags = [
(lib.enableFeature withSystemd "systemd")
(lib.enableFeature withUsb "usb")
];
depsBuildBuild = [ buildPackages.stdenv.cc ];
installFlags = lib.optionals withSystemd [
"systemdsystemunitdir=$(out)/lib/systemd/system"
@ -50,5 +55,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ sikmir ];
platforms = platforms.unix;
};
}
})

View File

@ -5623,8 +5623,6 @@ with pkgs;
klog = qt5.callPackage ../applications/radio/klog { };
knxd = callPackage ../servers/knxd { };
komga = callPackage ../servers/komga { };
komorebi = callPackage ../applications/graphics/komorebi { };