fff2419420
Without the change `ebusd` fails the build in `staging-next` as https://hydra.nixos.org/build/245419852: In file included from /build/source/src/lib/ebus/device.h:24, from /build/source/src/lib/ebus/device.cpp:23: /build/source/src/lib/ebus/transport.h:139:32: error: 'uint8_t' does not name a type 139 | virtual result_t write(const uint8_t* data, size_t len) = 0; // abstract | ^~~~~~~ /build/source/src/lib/ebus/transport.h:27:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? 26 | #include "lib/ebus/symbol.h" +++ |+#include <cstdint> 27 |
56 lines
1.3 KiB
Nix
56 lines
1.3 KiB
Nix
{ lib, stdenv, pkgs, fetchFromGitHub, fetchpatch, argparse, mosquitto, cmake, autoconf, automake, libtool, pkg-config, openssl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ebusd";
|
|
version = "23.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "john30";
|
|
repo = "ebusd";
|
|
rev = version;
|
|
sha256 = "sha256-K3gZ5OudNA92S38U1+HndxjA7OVfh2ymYf8OetB646M=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
autoconf
|
|
automake
|
|
libtool
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
argparse
|
|
mosquitto
|
|
openssl
|
|
];
|
|
|
|
patches = [
|
|
./patches/ebusd-cmake.patch
|
|
# Upstream patch for gcc-13 copmpatibility:
|
|
(fetchpatch {
|
|
name = "gcc-13.patch";
|
|
url = "https://github.com/john30/ebusd/commit/3384f3780087bd6b94d46bf18cdad18201ad516c.patch";
|
|
hash = "sha256-+wZDHjGaIhBCqhy2zmIE8Ko3uAiw8kfKx64etCqRQjM=";
|
|
})
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DCMAKE_INSTALL_SYSCONFDIR=${placeholder "out"}/etc"
|
|
"-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
|
|
"-DCMAKE_INSTALL_LOCALSTATEDIR=${placeholder "TMPDIR"}"
|
|
];
|
|
|
|
postInstall = ''
|
|
mv $out/usr/bin $out
|
|
rmdir $out/usr
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "ebusd";
|
|
homepage = "https://github.com/john30/ebusd";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ nathan-gs ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|