nixpkgs/pkgs/by-name/kn/knxd/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

71 lines
1.4 KiB
Nix

{
lib,
stdenv,
buildPackages,
fetchFromGitHub,
autoreconfHook,
pkg-config,
indent,
perl,
argp-standalone,
fmt_9,
libev,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
systemd,
withUsb ? stdenv.hostPlatform.isLinux,
libusb1,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "knxd";
version = "0.14.66";
src = fetchFromGitHub {
owner = "knxd";
repo = "knxd";
rev = finalAttrs.version;
hash = "sha256-3Npf+SlCWOMBd9CBLPysGtYe2Zk7I7T4t1bQHZTq3rI=";
};
postPatch = ''
sed -i '2i echo ${finalAttrs.version}; exit' tools/version.sh
sed -i '2i exit' tools/get_libfmt
'';
nativeBuildInputs = [
autoreconfHook
pkg-config
indent
perl
];
buildInputs =
[
fmt_9
libev
]
++ lib.optional withSystemd systemd
++ lib.optional withUsb libusb1
++ lib.optional stdenv.hostPlatform.isDarwin argp-standalone;
configureFlags = [
(lib.enableFeature withSystemd "systemd")
(lib.enableFeature withUsb "usb")
];
depsBuildBuild = [ buildPackages.stdenv.cc ];
installFlags = lib.optionals withSystemd [
"systemdsystemunitdir=$(out)/lib/systemd/system"
"systemdsysusersdir=$(out)/lib/sysusers.d"
];
meta = with lib; {
description = "Advanced router/gateway for KNX";
homepage = "https://github.com/knxd/knxd";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.unix;
};
})