nixpkgs-suyu/pkgs/development/tools/b4/default.nix
Rouven Czerwinski da99ec9f3a b4: loosen versions for request and dnspython
Until the next stable release, we need to loosen the version
requirements ourselves by hand for dnspython, since NixOS has updated to
version 2.1. While at it, adjust requests from ~=2.24.0 to ~=2.25 which
effectively enables all 2.* versions for requests.

Fixes the following build error:

  adding 'b4-0.6.2.dist-info/RECORD'
  removing build/bdist.linux-x86_64/wheel
  Finished executing setuptoolsBuildPhase
  installing
  Executing pipInstallPhase
  /build/b4-0.6.2/dist /build/b4-0.6.2
  Processing ./b4-0.6.2-py3-none-any.whl
  Requirement already satisfied: dkimpy~=1.0.5 in /nix/store/3war2scyn6pnrhhcfdx48vd5023x2rkp-python3.8-dkimpy-1.0.5/lib/python3.8/site-packages (from b4==0.6.2) (1.0.5)
  ERROR: Could not find a version that satisfies the requirement dnspython~=2.0.0 (from b4)
  ERROR: No matching distribution found for dnspython~=2.0.0
2021-04-29 07:20:52 +02:00

37 lines
963 B
Nix

{ lib, python3Packages }:
python3Packages.buildPythonApplication rec {
pname = "b4";
version = "0.6.2";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "1j904dy9cwxl85k2ngc498q5cdnqwsmw3jibjr1m55w8aqdck68z";
};
preConfigure = ''
substituteInPlace setup.py \
--replace 'requests~=2.24.0' 'requests~=2.25' \
--replace 'dnspython~=2.0.0' 'dnspython~=2.1'
'';
# tests make dns requests and fails
doCheck = false;
propagatedBuildInputs = with python3Packages; [
requests
dnspython
dkimpy
# These may be required in the future for other patch attestation features
#pycryptodomex~=3.9.9
#PyNaCl
];
meta = with lib; {
homepage = "https://git.kernel.org/pub/scm/utils/b4/b4.git/about";
license = licenses.gpl2Only;
description = "A helper utility to work with patches made available via a public-inbox archive";
maintainers = with maintainers; [ jb55 ];
};
}