nix-bitcoin/pkgs/rtl/default.nix
Jonas Nick da612fe84f
Merge fort-nix/nix-bitcoin#577: Upgrade to NixOS 22.11
4b5b4eac58 examples/deploy-container: fix `sudo` env propagation (Erik Arvstedt)
8d476cfeaf nix-bitcoin/runAsUserCmd: remove workaround (Erik Arvstedt)
00cceca861 joinmarket: fix Python packages (Erik Arvstedt)
e4b8e14d3a clightning: fix Python packages (Erik Arvstedt)
d1ef2a6e1e pythonPackages: improve layout (Erik Arvstedt)
74c8593407 pythonPackages: add indentation (Erik Arvstedt)
109dccca27 treewide: use `mdDoc` for descriptions (Erik Arvstedt)
a9c1995ed9 treewide: rename maintainer `earvstedt` -> `erikarvstedt` (Erik Arvstedt)
9e456ea3a9 shellcheck-services.nix: update to NixOS 22.11 (Erik Arvstedt)
77d58162e7 test: update to NixOS 22.11 (Erik Arvstedt)
142cbcfb37 flake: remove 32-bit systems (Erik Arvstedt)
c9b1e59f20 update to NixOS 22.11 (Erik Arvstedt)
62515a5696 helper/update-flake: support updating NixOS versions (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 4b5b4eac58

Tree-SHA512: b6ff443c4c6721dee9e6bf8f068d72c819851d54cb52d3fec64475cd884825063c28a87b2e9d1645617b7d0e7c1d52ee1ccd898f833c720c25f1b07add938cd5
2023-01-06 22:37:46 +00:00

64 lines
1.5 KiB
Nix

{ lib
, stdenvNoCC
, nodejs-16_x
, nodejs-slim-16_x
, fetchNodeModules
, fetchpatch
, fetchurl
, applyPatches
, makeWrapper
}:
let self = stdenvNoCC.mkDerivation {
pname = "rtl";
version = "0.13.2";
src = fetchurl {
url = "https://github.com/Ride-The-Lightning/RTL/archive/refs/tags/v${self.version}.tar.gz";
hash = "sha256-7VrLxmE+xPCipx7UOG1mja2pSBrj+swk55afcvBQeDU=";
};
passthru = {
nodejs = nodejs-16_x;
nodejsRuntime = nodejs-slim-16_x;
nodeModules = fetchNodeModules {
inherit (self) src nodejs;
hash = "sha256-ohS6gVX0M1Ir1QE9SjibbCrBpkXYIv5jV1Bkv0czRw4=";
};
};
nativeBuildInputs = [
makeWrapper
];
phases = "unpackPhase patchPhase installPhase";
# `src` already contains the precompiled frontend and backend.
# Copy all files required for packaging, like in
# https://github.com/Ride-The-Lightning/RTL/blob/master/dockerfiles/Dockerfile
installPhase = ''
dest=$out/lib/node_modules/rtl
mkdir -p $dest
cp -r \
rtl.js \
package.json \
frontend \
backend \
${self.nodeModules}/lib/node_modules \
$dest
makeWrapper ${self.nodejsRuntime}/bin/node "$out/bin/rtl" \
--add-flags "$dest/rtl.js"
runHook postInstall
'';
meta = with lib; {
description = "A web interface for LND, c-lightning and Eclair";
homepage = "https://github.com/Ride-The-Lightning/RTL";
license = licenses.mit;
maintainers = with maintainers; [ nixbitcoin erikarvstedt ];
platforms = platforms.unix;
};
}; in self