diff --git a/nix/checks/flake-module.nix b/nix/checks/flake-module.nix index 131f5fffc..2af5bedd8 100644 --- a/nix/checks/flake-module.nix +++ b/nix/checks/flake-module.nix @@ -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 = ../../.; diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index 28b5e522f..268bdb929 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -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 diff --git a/nix/pkgs/flake-module.nix b/nix/pkgs/flake-module.nix index 5132f17c7..31e2353b3 100644 --- a/nix/pkgs/flake-module.nix +++ b/nix/pkgs/flake-module.nix @@ -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; }; diff --git a/nix/shells.nix b/nix/shells.nix index e2c4f23f5..bb3588c28 100644 --- a/nix/shells.nix +++ b/nix/shells.nix @@ -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;