python-packages: add workaround to reenable requirements checking

This commit is contained in:
Erik Arvstedt 2023-12-12 11:57:43 +01:00
parent dc1033f1c8
commit 1c07c5fa5c
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
14 changed files with 38 additions and 26 deletions

View File

@ -1,6 +1,6 @@
{ lib, buildPythonPackage, fetchurl, cython, pytest, coverage }: { lib, buildPythonPackageWithDepsCheck, fetchurl, cython, pytest, coverage }:
buildPythonPackage rec { buildPythonPackageWithDepsCheck rec {
pname = "bencoder.pyx"; pname = "bencoder.pyx";
version = "3.0.1"; version = "3.0.1";

View File

@ -1,5 +1,5 @@
{ lib, buildPythonPackage, fetchFromGitHub, colorama, future, six }: { lib, buildPythonPackageWithDepsCheck, fetchFromGitHub, colorama, future, six }:
buildPythonPackage rec { buildPythonPackageWithDepsCheck rec {
pname = "chromalog"; pname = "chromalog";
version = "1.0.5"; version = "1.0.5";

View File

@ -46,6 +46,17 @@ rec {
# autobahn 20.12.3, required by joinmarketclient # autobahn 20.12.3, required by joinmarketclient
autobahn = callPackage ./specific-versions/autobahn.nix {}; autobahn = callPackage ./specific-versions/autobahn.nix {};
# A version of `buildPythonPackage` which checks that Python package
# requirements are met.
# This was the case for NixOS <= 23.05.
# TODO-EXTERNAL: Remove when this is resolved:
# https://github.com/NixOS/nixpkgs/issues/253131
buildPythonPackageWithDepsCheck = attrs:
self.buildPythonPackage (attrs // {
dontUsePypaInstall = true;
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ [ self.pipInstallHook ];
});
}; };
nbPython3Packages = (python3.override { nbPython3Packages = (python3.override {

View File

@ -1,6 +1,6 @@
{ version, src, lib, buildPythonPackage, fetchurl, future, twisted, service-identity, chromalog, txtorcon, pyaes }: { version, src, lib, buildPythonPackageWithDepsCheck, fetchurl, future, twisted, service-identity, chromalog, txtorcon, pyaes }:
buildPythonPackage rec { buildPythonPackageWithDepsCheck rec {
pname = "joinmarketbase"; pname = "joinmarketbase";
inherit version src; inherit version src;

View File

@ -1,6 +1,6 @@
{ version, src, lib, buildPythonPackage, fetchurl, python-bitcointx, joinmarketbase }: { version, src, lib, buildPythonPackageWithDepsCheck, fetchurl, python-bitcointx, joinmarketbase, pytestCheckHook }:
buildPythonPackage rec { buildPythonPackageWithDepsCheck rec {
pname = "joinmarketbitcoin"; pname = "joinmarketbitcoin";
inherit version src; inherit version src;

View File

@ -3,7 +3,7 @@
, version , version
, src , src
, lib , lib
, buildPythonPackage , buildPythonPackageWithDepsCheck
, argon2_cffi , argon2_cffi
, autobahn , autobahn
, bencoderpyx , bencoderpyx
@ -19,7 +19,7 @@
, werkzeug , werkzeug
}: }:
buildPythonPackage rec { buildPythonPackageWithDepsCheck rec {
pname = "joinmarketclient"; pname = "joinmarketclient";
inherit version src; inherit version src;

View File

@ -1,6 +1,6 @@
{ version, src, lib, buildPythonPackage, fetchurl, txtorcon, cryptography, pyopenssl, libnacl, joinmarketbase }: { version, src, lib, buildPythonPackageWithDepsCheck, fetchurl, txtorcon, cryptography, pyopenssl, libnacl, joinmarketbase }:
buildPythonPackage rec { buildPythonPackageWithDepsCheck rec {
pname = "joinmarketdaemon"; pname = "joinmarketdaemon";
inherit version src; inherit version src;
@ -23,6 +23,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ pythonImportsCheck = [
"jmdaemon" "jmdaemon"
]; ];
meta = with lib; { meta = with lib; {
description = "Client library for Bitcoin coinjoins"; description = "Client library for Bitcoin coinjoins";
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver"; homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";

View File

@ -1,6 +1,6 @@
{ buildPythonPackage, clightning, pyln-client }: { buildPythonPackageWithDepsCheck, clightning, pyln-client }:
buildPythonPackage rec { buildPythonPackageWithDepsCheck rec {
pname = "pylightning"; pname = "pylightning";
version = "0.10.1"; # defined in ${src}/contrib/pyln-client/pyln/client/__init__.py version = "0.10.1"; # defined in ${src}/contrib/pyln-client/pyln/client/__init__.py

View File

@ -1,6 +1,6 @@
{ buildPythonPackage, poetry-core, pytestCheckHook, clightning, pyln-proto }: { buildPythonPackageWithDepsCheck, poetry-core, pytestCheckHook, clightning, pyln-proto }:
buildPythonPackage rec { buildPythonPackageWithDepsCheck rec {
pname = "pyln-bolt7"; pname = "pyln-bolt7";
# The version is defined here: # The version is defined here:
# https://github.com/ElementsProject/lightning/blob/master/contrib/pyln-spec/bolt7/pyproject.toml # https://github.com/ElementsProject/lightning/blob/master/contrib/pyln-spec/bolt7/pyproject.toml

View File

@ -1,6 +1,6 @@
{ buildPythonPackage, poetry-core, pytestCheckHook, clightning, pyln-bolt7, pyln-proto }: { buildPythonPackageWithDepsCheck, poetry-core, pytestCheckHook, clightning, pyln-bolt7, pyln-proto }:
buildPythonPackage rec { buildPythonPackageWithDepsCheck rec {
pname = "pyln-client"; pname = "pyln-client";
version = clightning.version; version = clightning.version;
format = "pyproject"; format = "pyproject";

View File

@ -1,4 +1,4 @@
{ buildPythonPackage { buildPythonPackageWithDepsCheck
, clightning , clightning
, poetry-core , poetry-core
, pytestCheckHook , pytestCheckHook
@ -9,7 +9,7 @@
, pysocks , pysocks
}: }:
buildPythonPackage rec { buildPythonPackageWithDepsCheck rec {
pname = "pyln-proto"; pname = "pyln-proto";
version = clightning.version; version = clightning.version;
format = "pyproject"; format = "pyproject";

View File

@ -1,6 +1,6 @@
{ lib, buildPythonPackage, fetchurl, secp256k1, openssl }: { lib, buildPythonPackageWithDepsCheck, fetchurl, secp256k1, openssl }:
buildPythonPackage rec { buildPythonPackageWithDepsCheck rec {
pname = "python-bitcointx"; pname = "python-bitcointx";
version = "1.1.3"; version = "1.1.3";

View File

@ -1,6 +1,6 @@
{ sha256, lib, buildPythonPackage, fetchFromGitHub }: { sha256, lib, buildPythonPackageWithDepsCheck, fetchFromGitHub }:
buildPythonPackage { buildPythonPackageWithDepsCheck {
pname = "runes"; pname = "runes";
version = "0.4.0"; version = "0.4.0";

View File

@ -1,6 +1,6 @@
{ lib, buildPythonPackage, fetchFromGitHub, cython }: { lib, buildPythonPackageWithDepsCheck, fetchFromGitHub, cython }:
buildPythonPackage rec { buildPythonPackageWithDepsCheck rec {
pname = "sha256"; pname = "sha256";
version = builtins.substring 0 8 src.rev; version = builtins.substring 0 8 src.rev;