NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.93k stars 13.95k forks source link

`lightnind` is missing CLI options on darwin #305060

Open plebhash opened 6 months ago

plebhash commented 6 months ago

Describe the bug

I need to run clightning on my darwin setup. More specifically, I need to call lightningd --bitcoin-datadir=${bitcoin_dir}.

However, this CLI option is not available on the darwin build.

Steps To Reproduce

Steps to reproduce the behavior (on darwin):

# nix-shell -p clightning
$ lightningd --bitcoin-datadir=.
2024-04-18T13:47:28.658Z INFO    lightningd: v24.02.1
lightningd: --bitcoin-datadir=.: unknown option

Expected behavior

Here's the expected behavior (validated on nixOS):

# nix-shell -p clightning
$ lightningd --bitcoin-datadir=.
2024-04-18T13:48:45.580Z INFO    lightningd: Creating database
2024-04-18T13:48:45.604Z UNUSUAL hsmd: HSM: created new hsm_secret file
...

Additional context

Not sure if this is relevant, but my main motivation is to have a stable development setup on darwin for this project: https://github.com/thesimplekid/cashu-rs-mint

It has a flake that deploys a local regtest+LN setup via shellHook.

Notify maintainers

cc @jb55 @prusnak

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

darwin:

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.4.0, macOS 14.4.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.21.1`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

nixOS:

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-linux"`
 - host os: `Linux 6.1.86, NixOS, 23.11 (Tapir), 23.11.6359.53a2c32bc66f`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

storopoli commented 6 months ago

This should be backported to 23.11 if a fix is to be merged.

prusnak commented 5 months ago

@jonasnick any ideas why darwin build does not provide the --bitcoin-datadir (and possibly other) options? I don't see anything special in the build instructions.

plebhash commented 5 months ago

I also reported on the upstream CLN repo:

https://github.com/ElementsProject/lightning/issues/7241