Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, python 5, pythonOlder 6}: 7 8buildPythonPackage rec { 9 pname = "findimports"; 10 version = "2.3.0"; 11 format = "setuptools"; 12 13 disabled = pythonOlder "3.6"; 14 15 src = fetchFromGitHub { 16 owner = "mgedmin"; 17 repo = pname; 18 rev = "refs/tags/${version}"; 19 hash = "sha256-yA1foeGhgOXZArc/nZfS1tbGyONXJZ9lW+Zcx7hCedM="; 20 }; 21 22 pythonImportsCheck = [ 23 "findimports" 24 ]; 25 26 checkPhase = '' 27 # Tests fails 28 rm tests/cmdline.txt 29 30 runHook preCheck 31 ${python.interpreter} testsuite.py 32 runHook postCheck 33 ''; 34 35 meta = with lib; { 36 description = "Module for the analysis of Python import statements"; 37 homepage = "https://github.com/mgedmin/findimports"; 38 changelog = "https://github.com/mgedmin/findimports/blob/${version}/CHANGES.rst"; 39 license = with licenses; [ gpl2Only /* or */ gpl3Only ]; 40 maintainers = with maintainers; [ fab ]; 41 }; 42}