clboss/flake.nix
Ken Sedgwick de45be31a3
Add missing runtime dependencies and fix structure of dev shell
coderabbit:

1. The main buildInputs (libev, libunwind, curlWithGnuTls, sqlite) from lines 31-36
are not included—developers won't be able to build/link the project in this
shell.

2. autoconf-archive is duplicated (line 80 and already inherited via
nativeBuildInputs).

3. libevdev (line 77) is a different library than libev—verify this is intentional.
2025-12-17 09:35:45 -08:00

85 lines
2 KiB
Nix

{
description = "CLBOSS Automated Core Lightning Node Manager";
nixConfig.bash-prompt = "\[nix-develop\]$ ";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs =
{
self,
nixpkgs,
flake-utils,
flake-compat,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
nativeBuildInputs = [
pkgs.autoconf-archive
pkgs.autoreconfHook
pkgs.pkg-config
];
buildInputs = [
pkgs.libev
pkgs.libunwind
pkgs.curlWithGnuTls
pkgs.sqlite
];
clboss = pkgs.stdenv.mkDerivation {
name = "clboss";
src = ./.;
inherit nativeBuildInputs;
inherit buildInputs;
enableParallelBuilding = true;
preBuild = ''
./generate_commit_hash.sh
'';
doCheck = false;
meta = with pkgs.lib; {
description = "Automated Core Lightning Node Manager";
homepage = "https://github.com/ZmnSCPxj/clboss";
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
mainProgram = "clboss";
};
};
in
{
packages.default = clboss;
checks.default = clboss.overrideAttrs (old: {
doCheck = true;
checkPhase = ''
make -j4 distcheck
'';
});
formatter = pkgs.nixfmt-tree;
devShells.default = pkgs.mkShell {
inherit nativeBuildInputs;
buildInputs = buildInputs ++ (with pkgs; [
gcc
bind
autoconf
libtool
automake
git
# editor support
bear
]);
};
}
);
}