rtl, cl-rest: add /bin to pkg output

This commit is contained in:
Erik Arvstedt 2021-12-14 19:51:22 +01:00
parent f4872f3334
commit 602281b132
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
3 changed files with 29 additions and 8 deletions

View File

@ -105,6 +105,7 @@ let
cfg = config.services.rtl;
nbLib = config.nix-bitcoin.lib;
nbPkgs = config.nix-bitcoin.pkgs;
secretsDir = config.nix-bitcoin.secretsDir;
node = { isLnd, index }: ''
@ -223,7 +224,7 @@ in {
install -D -o ${cfg.user} -g ${cfg.group} ${lnd.networkDir}/admin.macaroon \
'${cfg.dataDir}/macaroons/admin.macaroon'
'');
ExecStart = "${pkgs.nodejs}/bin/node ${config.nix-bitcoin.pkgs.rtl}/lib/node_modules/rtl/rtl";
ExecStart = "${nbPkgs.rtl}/bin/rtl";
# Show "rtl" instead of "node" in the journal
SyslogIdentifier = "rtl";
User = cfg.user;
@ -247,7 +248,7 @@ in {
StateDirectory = "cl-rest";
# cl-rest reads the config file from the working directory
WorkingDirectory = cl-rest.dataDir;
ExecStart = "${pkgs.nodejs}/bin/node ${config.nix-bitcoin.pkgs.cl-rest}/lib/node_modules/c-lightning-rest/cl-rest";
ExecStart = "${nbPkgs.cl-rest}/bin/cl-rest";
# Show "cl-rest" instead of "node" in the journal
SyslogIdentifier = "cl-rest";
User = cfg.user;

View File

@ -1,5 +1,15 @@
{ pkgs }:
{ pkgs, makeWrapper }:
let
nodePackages = import ./composition.nix { inherit pkgs; inherit (pkgs) nodejs; };
inherit (pkgs) nodejs;
nodePackages = import ./composition.nix { inherit pkgs nodejs; };
in
nodePackages.package
nodePackages.package.overrideAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [
makeWrapper
];
postInstall = ''
makeWrapper ${nodejs}/bin/node $out/bin/cl-rest \
--add-flags $out/lib/node_modules/c-lightning-rest/cl-rest
'';
})

View File

@ -1,5 +1,15 @@
{ pkgs }:
{ pkgs, makeWrapper }:
let
nodePackages = import ./composition.nix { inherit pkgs; inherit (pkgs) nodejs; };
inherit (pkgs) nodejs;
nodePackages = import ./composition.nix { inherit pkgs nodejs; };
in
nodePackages.package
nodePackages.package.overrideAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [
makeWrapper
];
postInstall = ''
makeWrapper ${nodejs}/bin/node $out/bin/rtl \
--add-flags $out/lib/node_modules/rtl/rtl
'';
})