mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
blinker,
|
|
pytestCheckHook,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
flask,
|
|
pythonOlder,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "flask-testing";
|
|
version = "0.8.1";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
pname = "Flask-Testing";
|
|
inherit version;
|
|
hash = "sha256-CnNNe2jmOpQQtBPNex+WRW+ahYvQmmIi1GVlDMeC6wE=";
|
|
};
|
|
|
|
propagatedBuildInputs = [ flask ];
|
|
|
|
nativeCheckInputs = [
|
|
blinker
|
|
pytestCheckHook
|
|
];
|
|
|
|
# Some of the tests use localhost networking on darwin
|
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
|
|
|
disabledTests = [
|
|
# RuntimeError and NotImplementedError
|
|
"test_assert_redirects"
|
|
"test_server_listening"
|
|
"test_server_process_is_spawned"
|
|
# change in repr(template) in recent flask
|
|
"test_assert_template_rendered_signal_sent"
|
|
];
|
|
|
|
disabledTestPaths = [
|
|
# twill is only used by Python 2 according setup.py
|
|
"tests/test_twill.py"
|
|
];
|
|
|
|
pythonImportsCheck = [ "flask_testing" ];
|
|
|
|
meta = with lib; {
|
|
description = "Extension provides unit testing utilities for Flask";
|
|
homepage = "https://pythonhosted.org/Flask-Testing/";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ mic92 ];
|
|
};
|
|
}
|