build: Add cln-postgres package to nix flake

This commit is contained in:
Joseph Goulden 2024-09-30 23:16:07 +01:00 committed by Vincenzo Palazzo
parent f31a8cf749
commit d49b5a53fb
4 changed files with 9 additions and 0 deletions

View File

@ -8,6 +8,7 @@
{
checks = {
cln = config.packages.cln;
cln-postgres = config.packages.cln-postgres;
rust = config.packages.rust;
cargo-audit = pkgs.craneLib.cargoAudit {
src = ../../.;

View File

@ -3,6 +3,7 @@
lib,
pkgs,
config,
postgresSupport ? false,
}:
with pkgs;
let
@ -32,6 +33,7 @@ stdenv.mkDerivation {
automake
gettext
gitMinimal
postgresql
libtool
lowdown
pkgconf
@ -39,6 +41,7 @@ stdenv.mkDerivation {
unzip
which
]
++ lib.optionals postgresSupport [ postgresql ]
++ lib.optionals stdenv.isDarwin [
cctools
darwin.autoSignDarwinBinariesHook

View File

@ -6,6 +6,10 @@
packages = rec {
# This package depends on git submodules so use a shell command like 'nix build .?submodules=1'.
cln = pkgs.callPackage ./default.nix { inherit self pkgs config; };
cln-postgres = pkgs.callPackage ./default.nix {
inherit self pkgs config;
postgresSupport = true;
};
rust = pkgs.callPackage ./rust.nix { craneLib = pkgs.craneLib; };
default = cln;
};

View File

@ -10,6 +10,7 @@
{
devShells = {
default = pkgs.mkShell { inputsFrom = [ config.packages.default ]; };
postgres = pkgs.mkShell { inputsFrom = [ config.packages.cln-postgres ]; };
rust = pkgs.craneLib.devShell {
checks = {
inherit (self.checks.${system}) rust;