charge-lnd: fix build (#351155)

This commit is contained in:
Aleksana 2024-10-27 11:55:28 +08:00 committed by GitHub
commit cefb70fa51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 8 deletions

View File

@ -1,4 +1,9 @@
{ lib, fetchFromGitHub, python3Packages }:
{
lib,
fetchFromGitHub,
python3Packages,
makeWrapper,
}:
python3Packages.buildPythonApplication rec {
pname = "charge-lnd";
@ -6,9 +11,9 @@ python3Packages.buildPythonApplication rec {
src = fetchFromGitHub {
owner = "accumulator";
repo = pname;
repo = "charge-lnd";
rev = "refs/tags/v${version}";
sha256 = "sha256-mNU8bhiZqvYbNUU8vJNk9WbpAVrCTi9Fy3hlIpb06ac=";
hash = "sha256-mNU8bhiZqvYbNUU8vJNk9WbpAVrCTi9Fy3hlIpb06ac=";
};
propagatedBuildInputs = with python3Packages; [
@ -21,20 +26,35 @@ python3Packages.buildPythonApplication rec {
termcolor
];
nativeBuildInputs = [
makeWrapper
];
postInstall = ''
install README.md -Dt $out/share/doc/charge-lnd
wrapProgram $out/bin/charge-lnd \
--set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION "python"
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/charge-lnd --help > /dev/null
'';
meta = with lib; {
env = {
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
};
meta = {
description = "Simple policy-based fee manager for lightning network daemon";
homepage = "https://github.com/accumulator/charge-lnd";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ mmilata mariaa144 ];
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [
mmilata
mariaa144
];
mainProgram = "charge-lnd";
};
}

View File

@ -33844,8 +33844,6 @@ with pkgs;
btcpayserver-altcoins = callPackage ../applications/blockchains/btcpayserver { altcoinSupport = true; };
charge-lnd = callPackage ../applications/blockchains/charge-lnd { };
cryptop = python3.pkgs.callPackage ../applications/blockchains/cryptop { };
dcrctl = callPackage ../applications/blockchains/dcrctl { };