2021-12-14 18:51:23 +00:00
|
|
|
{ pkgs, lib, makeWrapper }:
|
2021-12-14 18:51:20 +00:00
|
|
|
let
|
2021-12-14 18:51:22 +00:00
|
|
|
inherit (pkgs) nodejs;
|
|
|
|
nodePackages = import ./composition.nix { inherit pkgs nodejs; };
|
2021-12-14 18:51:20 +00:00
|
|
|
in
|
2021-12-14 18:51:22 +00:00
|
|
|
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
|
|
|
|
'';
|
2021-12-14 18:51:23 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "REST API for C-Lightning";
|
|
|
|
homepage = "https://github.com/Ride-The-Lightning/c-lightning-REST";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nixbitcoin earvstedt ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2021-12-14 18:51:22 +00:00
|
|
|
})
|