python-bitcointx: 1.1.3 -> 1.1.4

This commit is contained in:
Erik Arvstedt 2023-12-11 23:13:52 +01:00
parent 1c07c5fa5c
commit 85bbdb857a
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
4 changed files with 18 additions and 25 deletions

View File

@ -1,15 +1,4 @@
nbPkgs: python3:
let
# Ignore eval error:
# `OpenSSL 1.1 is reaching its end of life on 2023/09/11 and cannot
# be supported through the NixOS 23.05 release cycle.`
# TODO-EXTERNAL: consider removing when
# https://github.com/Simplexum/python-bitcointx/issues/76 and
# https://github.com/JoinMarket-Org/joinmarket-clientserver#1451 are resolved.
openssl_1_1 = python3.pkgs.pkgs.openssl_1_1.overrideAttrs (old: {
meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
});
in
rec {
pyPkgsOverrides = self: super: let
inherit (self) callPackage;
@ -30,10 +19,7 @@ rec {
# Packages only used by joinmarket
bencoderpyx = callPackage ./bencoderpyx {};
chromalog = callPackage ./chromalog {};
python-bitcointx = callPackage ./python-bitcointx {
inherit (nbPkgs) secp256k1;
openssl = openssl_1_1;
};
python-bitcointx = callPackage ./python-bitcointx { inherit (nbPkgs) secp256k1; };
runes = callPackage ./runes {};
sha256 = callPackage ./sha256 {};

View File

@ -14,6 +14,11 @@ buildPythonPackageWithDepsCheck rec {
pytestCheckHook
];
patchPhase = ''
substituteInPlace setup.py \
--replace "'python-bitcointx==1.1.3'" "'python-bitcointx==1.1.4'"
'';
meta = with lib; {
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
maintainers = with maintainers; [ nixbitcoin ];

View File

@ -1,12 +1,14 @@
{ lib, buildPythonPackageWithDepsCheck, fetchurl, secp256k1, openssl }:
{ lib, buildPythonPackageWithDepsCheck, fetchFromGitHub, secp256k1 }:
buildPythonPackageWithDepsCheck rec {
pname = "python-bitcointx";
version = "1.1.3";
version = "1.1.4";
src = fetchurl {
url = "https://github.com/Simplexum/${pname}/archive/${pname}-v${version}.tar.gz";
sha256 = "f0f487c29619df0e94a04f6deb3dc950ff9954c072017bd3eda90f73c24f0953";
src = fetchFromGitHub {
owner = "Simplexum";
repo = "python-bitcointx";
rev = "python-bitcointx-v${version}";
hash = "sha256-y8/cyLQr3GbpYqCg8LKTfyL0OX7eIo5AxjdFTWTqHmk=";
};
patchPhase = ''
@ -14,8 +16,6 @@ buildPythonPackageWithDepsCheck rec {
substituteInPlace "bitcointx/$path" \
--replace "ctypes.util.find_library('secp256k1')" "'${secp256k1}/lib/libsecp256k1.so'"
done
substituteInPlace bitcointx/core/key.py \
--replace "ctypes.util.find_library('ssl')" "'${openssl.out}/lib/libssl.so'"
'';
meta = with lib; {

View File

@ -9,7 +9,7 @@ cd "$TMPDIR"
echo "Fetching latest release"
git clone https://github.com/simplexum/python-bitcointx 2> /dev/null
cd python-bitcointx
latest=python-bitcointx-v1.1.3
latest=python-bitcointx-v1.1.4
echo "Latest release is ${latest}"
# GPG verification
@ -19,6 +19,8 @@ gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys B17A35BBA187395784E2A6B3
echo "Verifying latest release"
git verify-commit "$latest"
git checkout -q "tags/$latest"
rm -rf .git
echo "tag: $latest"
# The prefix option is necessary because GitHub prefixes the archive contents in this format
echo "sha256: $(git archive --format tar.gz --prefix=python-bitcointx-"$latest"/ "$latest" | sha256sum | cut -d\ -f1)"
nix hash path .