nix-files/pkgs/additional/pyln-proto/default.nix

46 lines
969 B
Nix
Raw Normal View History

2024-01-11 00:38:08 +00:00
# based on: <https://github.com/fort-nix/nix-bitcoin/blob/master/pkgs/python-packages/pyln-proto/default.nix>
{
clightning,
python3,
stdenv,
unzip,
2024-01-11 00:38:08 +00:00
}:
stdenv.mkDerivation {
2024-01-11 00:38:08 +00:00
pname = "pyln-proto";
format = "pyproject";
inherit (clightning) src version;
sourceRoot = "clightning-v${clightning.version}/contrib/pyln-proto";
2024-04-19 04:52:34 +00:00
# package pins its dependencies too aggressively
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'coincurve = "^18"' 'coincurve = ">=18"' \
--replace-fail 'cryptography = "^41"' 'cryptography = ">=41"'
'';
nativeBuildInputs = [
python3.pkgs.poetry-core
python3.pkgs.pypaBuildHook
python3.pkgs.pypaInstallHook
unzip # used by `unpackPhase`
];
2024-01-11 00:38:08 +00:00
propagatedBuildInputs = with python3.pkgs; [
2024-01-11 00:38:08 +00:00
bitstring
cryptography
coincurve
base58
pysocks
];
nativeCheckInputs = [
python3.pkgs.pytestCheckHook
];
doCheck = true;
strictDeps = true;
2024-01-11 00:38:08 +00:00
}