treewide: format all inactive Nix files

After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
This commit is contained in:
Silvan Mosberger
2024-12-10 20:26:33 +01:00
parent b32a094368
commit 4f0dadbf38
21293 changed files with 701276 additions and 428232 deletions
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
{
lib,
buildPythonPackage,
fetchPypi,
}:
buildPythonPackage rec {
@@ -1,8 +1,9 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, setuptools-scm
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
setuptools-scm,
}:
buildPythonPackage rec {
@@ -35,4 +36,3 @@ buildPythonPackage rec {
license = lib.licenses.mit;
};
}
@@ -1,7 +1,14 @@
{ lib, stdenv, python, makeWrapper, unzip
, pipInstallHook
, setuptoolsBuildHook
, wheel, pip, setuptools
{
lib,
stdenv,
python,
makeWrapper,
unzip,
pipInstallHook,
setuptoolsBuildHook,
wheel,
pip,
setuptools,
}:
stdenv.mkDerivation rec {
@@ -9,7 +16,11 @@ stdenv.mkDerivation rec {
inherit (pip) version;
name = "${python.libPrefix}-bootstrapped-${pname}-${version}";
srcs = [ wheel.src pip.src setuptools.src ];
srcs = [
wheel.src
pip.src
setuptools.src
];
sourceRoot = ".";
dontUseSetuptoolsBuild = true;
@@ -18,46 +29,54 @@ stdenv.mkDerivation rec {
# Should be propagatedNativeBuildInputs
propagatedBuildInputs = [
# Override to remove dependencies to prevent infinite recursion.
(pipInstallHook.override{pip=null;})
(setuptoolsBuildHook.override{setuptools=null; wheel=null;})
(pipInstallHook.override { pip = null; })
(setuptoolsBuildHook.override {
setuptools = null;
wheel = null;
})
];
postPatch = ''
mkdir -p $out/bin
'';
nativeBuildInputs = [ makeWrapper unzip ];
nativeBuildInputs = [
makeWrapper
unzip
];
buildInputs = [ python ];
dontBuild = true;
installPhase = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
'' + ''
# Give folders a known name
mv pip* pip
mv setuptools* setuptools
mv wheel* wheel
# Set up PYTHONPATH:
# - pip and setuptools need to be in PYTHONPATH to install setuptools, wheel, and pip.
# - $out is where we are installing to and takes precedence, and is where wheel will end so we can install pip.
export PYTHONPATH="$out/${python.sitePackages}:$(pwd)/pip/src:$(pwd)/setuptools:$(pwd)/setuptools/pkg_resources:$PYTHONPATH"
installPhase =
lib.optionalString (!stdenv.hostPlatform.isWindows) ''
export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
''
+ ''
# Give folders a known name
mv pip* pip
mv setuptools* setuptools
mv wheel* wheel
# Set up PYTHONPATH:
# - pip and setuptools need to be in PYTHONPATH to install setuptools, wheel, and pip.
# - $out is where we are installing to and takes precedence, and is where wheel will end so we can install pip.
export PYTHONPATH="$out/${python.sitePackages}:$(pwd)/pip/src:$(pwd)/setuptools:$(pwd)/setuptools/pkg_resources:$PYTHONPATH"
echo "Building setuptools wheel..."
pushd setuptools
${python.pythonOnBuildForHost.interpreter} -m pip install --no-build-isolation --no-index --prefix=$out --ignore-installed --no-dependencies --no-cache .
popd
echo "Building setuptools wheel..."
pushd setuptools
${python.pythonOnBuildForHost.interpreter} -m pip install --no-build-isolation --no-index --prefix=$out --ignore-installed --no-dependencies --no-cache .
popd
echo "Building wheel wheel..."
pushd wheel
${python.pythonOnBuildForHost.interpreter} -m pip install --no-build-isolation --no-index --prefix=$out --ignore-installed --no-dependencies --no-cache .
popd
echo "Building wheel wheel..."
pushd wheel
${python.pythonOnBuildForHost.interpreter} -m pip install --no-build-isolation --no-index --prefix=$out --ignore-installed --no-dependencies --no-cache .
popd
echo "Building pip wheel..."
pushd pip
${python.pythonOnBuildForHost.interpreter} -m pip install --no-build-isolation --no-index --prefix=$out --ignore-installed --no-dependencies --no-cache .
popd
'';
echo "Building pip wheel..."
pushd pip
${python.pythonOnBuildForHost.interpreter} -m pip install --no-build-isolation --no-index --prefix=$out --ignore-installed --no-dependencies --no-cache .
popd
'';
meta = {
description = "Version of pip used for bootstrapping";
@@ -1,45 +1,52 @@
{ lib, stdenv, cffi }:
{
lib,
stdenv,
cffi,
}:
if cffi == null then null else cffi.overridePythonAttrs {
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
# cannot load library 'c'
"test_FILE"
"test_FILE_object"
"test_FILE_only_for_FILE_arg"
"test_load_and_call_function"
"test_load_library"
if cffi == null then
null
else
cffi.overridePythonAttrs {
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
# cannot load library 'c'
"test_FILE"
"test_FILE_object"
"test_FILE_only_for_FILE_arg"
"test_load_and_call_function"
"test_load_library"
# cannot load library 'dl'
"test_dlopen_handle"
# cannot load library 'dl'
"test_dlopen_handle"
# cannot load library 'm'
"test_dir_on_dlopen_lib"
"test_dlclose"
"test_dlopen"
"test_dlopen_constant"
"test_dlopen_flags"
"test_function_typedef"
"test_line_continuation_in_defines"
"test_missing_function"
"test_remove_comments"
"test_remove_line_continuation_comments"
"test_simple"
"test_sin"
"test_sinf"
"test_stdcall_only_on_windows"
"test_wraps_from_stdlib"
# cannot load library 'm'
"test_dir_on_dlopen_lib"
"test_dlclose"
"test_dlopen"
"test_dlopen_constant"
"test_dlopen_flags"
"test_function_typedef"
"test_line_continuation_in_defines"
"test_missing_function"
"test_remove_comments"
"test_remove_line_continuation_comments"
"test_simple"
"test_sin"
"test_sinf"
"test_stdcall_only_on_windows"
"test_wraps_from_stdlib"
# MemoryError
"test_callback_as_function_argument"
"test_callback_crash"
"test_callback_decorator"
"test_callback_large_struct"
"test_callback_returning_void"
"test_cast_functionptr_and_int"
"test_function_pointer"
"test_functionptr_intptr_return"
"test_functionptr_simple"
"test_functionptr_void_return"
"test_functionptr_voidptr_return"
];
}
# MemoryError
"test_callback_as_function_argument"
"test_callback_crash"
"test_callback_decorator"
"test_callback_large_struct"
"test_callback_returning_void"
"test_cast_functionptr_and_int"
"test_function_pointer"
"test_functionptr_intptr_return"
"test_functionptr_simple"
"test_functionptr_void_return"
"test_functionptr_voidptr_return"
];
}
@@ -1,4 +1,10 @@
{ lib, stdenv, buildPythonPackage, fetchPypi, setuptools-scm }:
{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "configparser";
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
{
lib,
buildPythonPackage,
fetchPypi,
}:
buildPythonPackage rec {
@@ -1,7 +1,8 @@
{ lib
, buildPythonPackage
, fetchPypi
, mock
{
lib,
buildPythonPackage,
fetchPypi,
mock,
}:
buildPythonPackage rec {
@@ -1,8 +1,9 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPy3k
, isPyPy
{
lib,
buildPythonPackage,
fetchPypi,
isPy3k,
isPyPy,
}:
buildPythonPackage rec {
@@ -1,4 +1,9 @@
{ lib, buildPythonPackage, fetchPypi, setuptools-scm }:
{
lib,
buildPythonPackage,
fetchPypi,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "filelock";
@@ -1,4 +1,11 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k, python, stdenv }:
{
lib,
buildPythonPackage,
fetchPypi,
isPy3k,
python,
stdenv,
}:
buildPythonPackage rec {
pname = "futures";
@@ -1,7 +1,18 @@
{ lib, buildPythonPackage, fetchFromGitHub
, isPy3k, attrs, coverage, enum34, pexpect
, doCheck ? true, pytest, pytest-xdist, flaky, mock
, sortedcontainers
{
lib,
buildPythonPackage,
fetchFromGitHub,
isPy3k,
attrs,
coverage,
enum34,
pexpect,
doCheck ? true,
pytest,
pytest-xdist,
flaky,
mock,
sortedcontainers,
}:
buildPythonPackage rec {
# https://hypothesis.readthedocs.org/en/latest/packaging.html
@@ -29,7 +40,13 @@ buildPythonPackage rec {
sortedcontainers
] ++ lib.optional (!isPy3k) enum34;
nativeCheckInputs = [ pytest pytest-xdist flaky mock pexpect ];
nativeCheckInputs = [
pytest
pytest-xdist
flaky
mock
pexpect
];
inherit doCheck;
checkPhase = ''
@@ -1,12 +1,13 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools-scm
, zipp
, pathlib2
, contextlib2
, configparser
, isPy3k
{
lib,
buildPythonPackage,
fetchPypi,
setuptools-scm,
zipp,
pathlib2,
contextlib2,
configparser,
isPy3k,
}:
buildPythonPackage rec {
@@ -21,8 +22,13 @@ buildPythonPackage rec {
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ zipp ]
++ lib.optionals (!isPy3k) [ pathlib2 contextlib2 configparser ];
propagatedBuildInputs =
[ zipp ]
++ lib.optionals (!isPy3k) [
pathlib2
contextlib2
configparser
];
# Cyclic dependencies
doCheck = false;
@@ -1,10 +1,12 @@
{ lib, stdenv
, buildPythonPackage
, isPy3k
, fetchPypi
, pytest
, markupsafe
, setuptools
{
lib,
stdenv,
buildPythonPackage,
isPy3k,
fetchPypi,
pytest,
markupsafe,
setuptools,
}:
buildPythonPackage rec {
@@ -17,7 +19,10 @@ buildPythonPackage rec {
};
nativeCheckInputs = [ pytest ];
propagatedBuildInputs = [ markupsafe setuptools ];
propagatedBuildInputs = [
markupsafe
setuptools
];
# Multiple tests run out of stack space on 32bit systems with python2.
# See https://github.com/pallets/jinja/issues/1158
@@ -1,13 +1,14 @@
{ lib
, buildPythonPackage
, fetchPypi
{
lib,
buildPythonPackage,
fetchPypi,
}:
buildPythonPackage rec {
pname = "MarkupSafe";
version = "1.1.1";
src = fetchPypi {
src = fetchPypi {
inherit pname version;
sha256 = "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b";
};
@@ -1,12 +1,13 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPy27
, funcsigs
, six
, pbr
, unittestCheckHook
, pytest
{
lib,
buildPythonPackage,
fetchPypi,
isPy27,
funcsigs,
six,
pbr,
unittestCheckHook,
pytest,
}:
buildPythonPackage rec {
@@ -18,7 +19,10 @@ buildPythonPackage rec {
sha256 = "83657d894c90d5681d62155c82bda9c1187827525880eda8ff5df4ec813437c3";
};
propagatedBuildInputs = [ six pbr ] ++ lib.optionals isPy27 [ funcsigs ];
propagatedBuildInputs = [
six
pbr
] ++ lib.optionals isPy27 [ funcsigs ];
# On PyPy for Python 2.7 in particular, Mock's tests have a known failure.
# Mock upstream has a decoration to disable the failing test and make
@@ -1,12 +1,12 @@
{ lib
, buildPythonPackage
, fetchPypi
, unittestCheckHook
, six
, stdenv
{
lib,
buildPythonPackage,
fetchPypi,
unittestCheckHook,
six,
stdenv,
}:
buildPythonPackage rec {
pname = "more-itertools";
version = "5.0.0";
@@ -1,10 +1,11 @@
{ lib
, buildPythonPackage
, fetchPypi
, pyparsing
, six
, pytestCheckHook
, pretend
{
lib,
buildPythonPackage,
fetchPypi,
pyparsing,
six,
pytestCheckHook,
pretend,
}:
# We keep 20.4 because it uses setuptools instead of flit-core
@@ -20,7 +21,10 @@ buildPythonPackage rec {
sha256 = "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8";
};
propagatedBuildInputs = [ pyparsing six ];
propagatedBuildInputs = [
pyparsing
six
];
nativeCheckInputs = [
pytestCheckHook
@@ -33,7 +37,10 @@ buildPythonPackage rec {
meta = with lib; {
description = "Core utilities for Python packages";
homepage = "https://github.com/pypa/packaging";
license = [ licenses.bsd2 licenses.asl20 ];
license = [
licenses.bsd2
licenses.asl20
];
maintainers = with maintainers; [ bennofs ];
};
}
@@ -1,12 +1,13 @@
{ lib
, buildPythonPackage
, bootstrapped-pip
, fetchFromGitHub
, mock
, scripttest
, virtualenv
, pretend
, pytest
{
lib,
buildPythonPackage,
bootstrapped-pip,
fetchFromGitHub,
mock,
scripttest,
virtualenv,
pretend,
pytest,
}:
buildPythonPackage rec {
@@ -28,7 +29,13 @@ buildPythonPackage rec {
# to force it a little.
pipInstallFlags = [ "--ignore-installed" ];
nativeCheckInputs = [ mock scripttest virtualenv pretend pytest ];
nativeCheckInputs = [
mock
scripttest
virtualenv
pretend
pytest
];
# Pip wants pytest, but tests are not distributed
doCheck = false;
@@ -1,8 +1,9 @@
{ buildPythonPackage
, lib
, fetchPypi
, setuptools-scm
, importlib-metadata
{
buildPythonPackage,
lib,
fetchPypi,
setuptools-scm,
importlib-metadata,
}:
buildPythonPackage rec {
@@ -1,13 +1,14 @@
{ lib
, fetchFromGitHub
, fetchpatch
, meson
, ninja
, buildPythonPackage
, pytest
, pkg-config
, cairo
, python
{
lib,
fetchFromGitHub,
fetchpatch,
meson,
ninja,
buildPythonPackage,
pytest,
pkg-config,
cairo,
python,
}:
buildPythonPackage rec {
@@ -56,7 +57,10 @@ buildPythonPackage rec {
meta = with lib; {
description = "Python 2 bindings for cairo";
homepage = "https://pycairo.readthedocs.io/";
license = with licenses; [ lgpl21Only mpl11 ];
license = with licenses; [
lgpl21Only
mpl11
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}
@@ -1,4 +1,15 @@
{ lib, stdenv, fetchurl, fetchpatch, python, buildPythonPackage, pkg-config, glib, isPy3k, pythonAtLeast }:
{
lib,
stdenv,
fetchurl,
fetchpatch,
python,
buildPythonPackage,
pkg-config,
glib,
isPy3k,
pythonAtLeast,
}:
buildPythonPackage rec {
pname = "pygobject";
@@ -11,7 +22,10 @@ buildPythonPackage rec {
sha256 = "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv";
};
outputs = [ "out" "devdoc" ];
outputs = [
"out"
"devdoc"
];
patches = lib.optionals stdenv.hostPlatform.isDarwin [
./pygobject-2.0-fix-darwin.patch
@@ -1,9 +1,24 @@
{ lib, stdenv, fetchurl, fetchpatch, python, pkg-config, gtk2, pygobject2, pycairo, pango
, buildPythonPackage, isPy3k }:
{
lib,
stdenv,
fetchurl,
fetchpatch,
python,
pkg-config,
gtk2,
pygobject2,
pycairo,
pango,
buildPythonPackage,
isPy3k,
}:
buildPythonPackage rec {
pname = "pygtk";
outputs = [ "out" "dev" ];
outputs = [
"out"
"dev"
];
version = "2.24.0";
format = "other";
@@ -31,13 +46,18 @@ buildPythonPackage rec {
pango
];
propagatedBuildInputs = [ gtk2 pygobject2 pycairo ];
propagatedBuildInputs = [
gtk2
pygobject2
pycairo
];
configurePhase = "configurePhase";
buildPhase = "buildPhase";
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-ObjC"
env.NIX_CFLAGS_COMPILE =
lib.optionalString stdenv.hostPlatform.isDarwin "-ObjC"
+ lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) " -lpython2.7";
installPhase = "installPhase";
@@ -50,7 +70,8 @@ buildPythonPackage rec {
-e "s/.*testGlade.*//" \
-e "s/.*(glade.*//" \
tests/test_api.py
'' + ''
''
+ ''
sed -i -e "s/sys.path.insert(0, os.path.join(buildDir, 'gtk'))//" \
-e "s/sys.path.insert(0, buildDir)//" \
tests/common.py
@@ -1,11 +1,12 @@
{ buildPythonPackage
, fetchFromGitHub
, lib
{
buildPythonPackage,
fetchFromGitHub,
lib,
# since this is a dependency of pytest, we need to avoid
# circular dependencies
, jinja2
, railroad-diagrams
# since this is a dependency of pytest, we need to avoid
# circular dependencies
jinja2,
railroad-diagrams,
}:
let
@@ -32,7 +33,9 @@ let
'';
passthru.tests = {
check = pyparsing.overridePythonAttrs (_: { doCheck = true; });
check = pyparsing.overridePythonAttrs (_: {
doCheck = true;
});
};
meta = with lib; {
@@ -42,4 +45,4 @@ let
};
};
in
pyparsing
pyparsing
@@ -1,5 +1,16 @@
{ lib, fetchPypi, buildPythonPackage, execnet, pytest
, setuptools-scm, pytest-forked, filelock, psutil, six, isPy3k }:
{
lib,
fetchPypi,
buildPythonPackage,
execnet,
pytest,
setuptools-scm,
pytest-forked,
filelock,
psutil,
six,
isPy3k,
}:
buildPythonPackage rec {
pname = "pytest-xdist";
@@ -10,9 +21,20 @@ buildPythonPackage rec {
sha256 = "1vh4ps32lp5ignch5adbl3pgchvigdfmrl6qpmhxih54wa1qw3il";
};
nativeBuildInputs = [ setuptools-scm pytest ];
nativeCheckInputs = [ pytest filelock ];
propagatedBuildInputs = [ execnet pytest-forked psutil six ];
nativeBuildInputs = [
setuptools-scm
pytest
];
nativeCheckInputs = [
pytest
filelock
];
propagatedBuildInputs = [
execnet
pytest-forked
psutil
six
];
# Encountered a memory leak
# https://github.com/pytest-dev/pytest-xdist/issues/462
@@ -1,6 +1,25 @@
{ lib, buildPythonPackage, pythonOlder, fetchPypi, attrs, hypothesis, py
, setuptools-scm, setuptools, six, pluggy, funcsigs, isPy3k, more-itertools
, atomicwrites, mock, writeText, pathlib2, wcwidth, packaging, isPyPy
{
lib,
buildPythonPackage,
pythonOlder,
fetchPypi,
attrs,
hypothesis,
py,
setuptools-scm,
setuptools,
six,
pluggy,
funcsigs,
isPy3k,
more-itertools,
atomicwrites,
mock,
writeText,
pathlib2,
wcwidth,
packaging,
isPyPy,
}:
buildPythonPackage rec {
version = "4.6.11";
@@ -16,9 +35,23 @@ buildPythonPackage rec {
--replace "pluggy>=0.12,<1.0" "pluggy>=0.12,<2.0"
'';
nativeCheckInputs = [ hypothesis mock ];
nativeCheckInputs = [
hypothesis
mock
];
buildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ attrs py setuptools six pluggy more-itertools atomicwrites wcwidth packaging ]
propagatedBuildInputs =
[
attrs
py
setuptools
six
pluggy
more-itertools
atomicwrites
wcwidth
packaging
]
++ lib.optionals (!isPy3k) [ funcsigs ]
++ lib.optionals (pythonOlder "3.6") [ pathlib2 ];
@@ -61,7 +94,12 @@ buildPythonPackage rec {
meta = with lib; {
homepage = "https://docs.pytest.org";
description = "Framework for writing tests";
maintainers = with maintainers; [ domenkozar lovek323 madjar lsix ];
maintainers = with maintainers; [
domenkozar
lovek323
madjar
lsix
];
license = licenses.mit;
platforms = platforms.unix;
};
@@ -1,4 +1,9 @@
{ lib, python, buildPythonPackage, fetchPypi }:
{
lib,
python,
buildPythonPackage,
fetchPypi,
}:
buildPythonPackage rec {
pname = "scandir";
@@ -1,4 +1,9 @@
{ lib, buildPythonPackage, fetchPypi, toml }:
{
lib,
buildPythonPackage,
fetchPypi,
toml,
}:
buildPythonPackage rec {
pname = "setuptools_scm";
@@ -1,11 +1,12 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, python
, bootstrapped-pip
, lib
, pipInstallHook
, setuptoolsBuildHook
{
stdenv,
buildPythonPackage,
fetchFromGitHub,
python,
bootstrapped-pip,
lib,
pipInstallHook,
setuptoolsBuildHook,
}:
let
@@ -43,7 +44,8 @@ let
mv dist/${name} $out
'';
};
in buildPythonPackage rec {
in
buildPythonPackage rec {
inherit pname version;
# Because of bootstrapping we don't use the setuptoolsBuildHook that comes with format="setuptools" directly.
# Instead, we override it to remove setuptools to avoid a circular dependency.
@@ -54,8 +56,11 @@ in buildPythonPackage rec {
nativeBuildInputs = [
bootstrapped-pip
(pipInstallHook.override{pip=null;})
(setuptoolsBuildHook.override{setuptools=null; wheel=null;})
(pipInstallHook.override { pip = null; })
(setuptoolsBuildHook.override {
setuptools = null;
wheel = null;
})
];
preBuild = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
@@ -73,7 +78,10 @@ in buildPythonPackage rec {
meta = with lib; {
description = "Utilities to facilitate the installation of Python packages";
homepage = "https://pypi.python.org/pypi/setuptools";
license = with licenses; [ psfl zpl20 ];
license = with licenses; [
psfl
zpl20
];
platforms = python.meta.platforms;
priority = 10;
};
@@ -1,10 +1,19 @@
{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy3k, isPyPy, unittestCheckHook
, pythonAtLeast }:
{
lib,
buildPythonPackage,
fetchPypi,
pythonOlder,
isPy3k,
isPyPy,
unittestCheckHook,
pythonAtLeast,
}:
let
testDir = if isPy3k then "src" else "python2";
in buildPythonPackage rec {
in
buildPythonPackage rec {
pname = "typing";
version = "3.10.0.0";
@@ -22,7 +31,10 @@ in buildPythonPackage rec {
nativeCheckInputs = [ unittestCheckHook ];
unittestFlagsArray = [ "-s" testDir ];
unittestFlagsArray = [
"-s"
testDir
];
meta = with lib; {
description = "Backport of typing module to Python versions older than 3.5";
@@ -1,10 +1,11 @@
{ backports-functools-lru-cache
, wcwidth
, lib
{
backports-functools-lru-cache,
wcwidth,
lib,
}:
wcwidth.overridePythonAttrs(oldAttrs: {
propagatedBuildInputs = oldAttrs.propagatedBuildInputs or [] ++ [
wcwidth.overridePythonAttrs (oldAttrs: {
propagatedBuildInputs = oldAttrs.propagatedBuildInputs or [ ] ++ [
backports-functools-lru-cache
];
@@ -17,8 +18,10 @@ wcwidth.overridePythonAttrs(oldAttrs: {
disabled = false;
meta = oldAttrs.meta // {
/** maintainers overridden here for python2; this makes sure that python3
maintainers are not blamed for the breakage here. */
/**
maintainers overridden here for python2; this makes sure that python3
maintainers are not blamed for the breakage here.
*/
maintainers = with lib.maintainers; [ bryango ];
};
})
@@ -1,8 +1,9 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, bootstrapped-pip
, setuptools
{
lib,
buildPythonPackage,
fetchFromGitHub,
bootstrapped-pip,
setuptools,
}:
buildPythonPackage rec {
@@ -1,10 +1,11 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools-scm
, pytest
, pytest-flake8
, more-itertools
{
lib,
buildPythonPackage,
fetchPypi,
setuptools-scm,
pytest,
pytest-flake8,
more-itertools,
}:
buildPythonPackage rec {
@@ -20,7 +21,10 @@ buildPythonPackage rec {
propagatedBuildInputs = [ more-itertools ];
nativeCheckInputs = [ pytest pytest-flake8 ];
nativeCheckInputs = [
pytest
pytest-flake8
];
checkPhase = ''
pytest