Skip to content

Commit 0684059

Browse files
committed
chore: nix flake update
Updated nixpkgs to 25.05 Replaced postgresql dependency with much smaller libpq. Utilise new inputs.self.submodules feature to simplify flake use Moved apps to a separate file Changelog-None
1 parent c1ad55c commit 0684059

File tree

6 files changed

+73
-48
lines changed

6 files changed

+73
-48
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,11 +607,11 @@ jobs:
607607
- name: Check Nix flake inputs
608608
uses: DeterminateSystems/flake-checker-action@v8
609609
- name: Install Nix
610-
uses: cachix/install-nix-action@V27
610+
uses: cachix/install-nix-action@v31
611611
with:
612-
nix_path: nixpkgs=channel:nixos-24.05
612+
nix_path: nixpkgs=channel:nixos-25.05
613613
- name: Check flake
614-
run: nix flake check .?submodules=1#
614+
run: nix flake check
615615

616616
gather:
617617
# A dummy task that depends on the full matrix of tests, and

doc/developers-guide/developers-guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ The entry point is `flake.nix` in the root of the project, where the inputs and
6262

6363
`nix develop .#rust` will create a shell env for developing rust.
6464

65-
`nix build .?submodules=1` will build the default package (cln).
65+
`nix build` will build the default package (cln).
6666

67-
`nix flake check .?submodules=1` will build the cln and rust packages. Rust tests are run during the build. There are also checks to run cargo audit and nixfmt.
67+
`nix flake check` will build the cln and rust packages. Rust tests are run during the build. There are also checks to run cargo audit and nixfmt.
6868

69-
If you have nix installed you can use `nix run "git+https://github.com/hashrelay/lightning?ref=flake&submodules=1#lightningd"` to run lightningd without having to manually clone the repo. This make use of the flake output apps.
69+
If you have nix installed you can use `nix run "git+https://github.com/hashrelay/lightning?ref=flake#lightningd"` to run lightningd without having to manually clone the repo. This makes use of the flake output `apps`.

flake.lock

Lines changed: 28 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description = "Core Lightning (CLN): A specification compliant Lightning Network implementation in C";
33

44
inputs = {
5-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
66

77
flake-parts.url = "github:hercules-ci/flake-parts";
88

@@ -14,6 +14,8 @@
1414
url = "github:rustsec/advisory-db";
1515
flake = false;
1616
};
17+
18+
self.submodules = true;
1719
};
1820

1921
outputs =
@@ -29,6 +31,7 @@
2931
inputs.treefmt-nix.flakeModule
3032
./nix/pkgs/flake-module.nix
3133
./nix/checks/flake-module.nix
34+
./nix/apps.nix
3235
./nix/shells.nix
3336
./nix/treefmt.nix
3437
];
@@ -45,20 +48,6 @@
4548
inherit system;
4649
overlays = [ (final: prev: { craneLib = (inputs.crane.mkLib pkgs); }) ];
4750
};
48-
apps = {
49-
lightningd = {
50-
program = "${self'.packages.cln}/bin/lightningd";
51-
};
52-
lightning-cli = {
53-
program = "${self'.packages.cln}/bin/lightning-cli";
54-
};
55-
lightning-hsmtool = {
56-
program = "${self'.packages.cln}/bin/lightning-hsmtool";
57-
};
58-
reckless = {
59-
program = "${self'.packages.cln}/bin/reckless";
60-
};
61-
};
6251
};
6352
};
6453
}

nix/apps.nix

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{ ... }:
2+
{
3+
perSystem =
4+
{
5+
config,
6+
pkgs,
7+
system,
8+
self',
9+
...
10+
}:
11+
{
12+
apps = {
13+
lightningd = {
14+
program = "${self'.packages.cln}/bin/lightningd";
15+
meta.description = "Core Lightning daemon";
16+
};
17+
lightning-cli = {
18+
program = "${self'.packages.cln}/bin/lightning-cli";
19+
meta.description = "Core Lightning command line interface";
20+
};
21+
lightning-hsmtool = {
22+
program = "${self'.packages.cln}/bin/lightning-hsmtool";
23+
meta.description = "Core Lightning HSM tool";
24+
};
25+
reckless = {
26+
program = "${self'.packages.cln}/bin/reckless";
27+
meta.description = "Core Lightning reckless tool";
28+
};
29+
};
30+
};
31+
}

nix/pkgs/default.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,17 @@ stdenv.mkDerivation {
3333
automake
3434
gettext
3535
gitMinimal
36-
postgresql
3736
libtool
3837
lowdown
3938
pkgconf
4039
py3
4140
unzip
4241
which
4342
]
44-
++ lib.optionals postgresSupport [ postgresql ]
43+
++ lib.optionals postgresSupport [
44+
libpq
45+
libpq.pg_config
46+
]
4547
++ lib.optionals stdenv.isDarwin [
4648
cctools
4749
darwin.autoSignDarwinBinariesHook

0 commit comments

Comments
 (0)