Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, isPy27, fetchFromGitHub, buildPythonPackage, pythonOlder, fetchpatch, flake8, importlib-metadata, six }: 2 3buildPythonPackage rec { 4 pname = "flake8-future-import"; 5 version = "0.4.6"; 6 7 # PyPI tarball doesn't include the test suite 8 src = fetchFromGitHub { 9 owner = "xZise"; 10 repo = "flake8-future-import"; 11 rev = version; 12 sha256 = "00q8n15xdnvqj454arn7xxksyrzh0dw996kjyy7g9rdk0rf8x82z"; 13 }; 14 15 propagatedBuildInputs = [ flake8 six ] 16 ++ lib.optionals (pythonOlder "3.8") [ 17 importlib-metadata 18 ]; 19 20 # Upstream disables this test case naturally on python 3, but it also fails 21 # inside NixPkgs for python 2. Since it's going to be deleted, we just skip it 22 # on py2 as well. 23 patches = lib.optionals isPy27 [ ./skip-test.patch ]; 24 25 meta = with lib; { 26 description = "A flake8 extension to check for the imported __future__ modules to make it easier to have a consistent code base"; 27 homepage = "https://github.com/xZise/flake8-future-import"; 28 license = licenses.mit; 29 }; 30}