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

View File

@ -1,5 +1,15 @@
{ pkgs }: { pkgs, makeWrapper }:
let let
nodePackages = import ./composition.nix { inherit pkgs; inherit (pkgs) nodejs; }; inherit (pkgs) nodejs;
nodePackages = import ./composition.nix { inherit pkgs nodejs; };
in 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 let
nodePackages = import ./composition.nix { inherit pkgs; inherit (pkgs) nodejs; }; inherit (pkgs) nodejs;
nodePackages = import ./composition.nix { inherit pkgs nodejs; };
in 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
'';
})