Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 31 lines 906 B view raw
1{ lib, fetchPypi, buildPythonPackage, python, isPy3k, glibcLocales }: 2 3buildPythonPackage rec { 4 pname = "aenum"; 5 version = "3.0.0"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "17cd8cfed1ee4b617198c9fabbabd70ebd8f01e54ac29cd6c3a92df14bd86656"; 10 }; 11 12 # For Python 3, locale has to be set to en_US.UTF-8 for 13 # tests to pass 14 checkInputs = if isPy3k then [ glibcLocales ] else []; 15 16 # py2 likes to reorder tests 17 doCheck = isPy3k; 18 checkPhase = '' 19 runHook preCheck 20 ${if isPy3k then "export LC_ALL=en_US.UTF-8" else ""} 21 PYTHONPATH=`pwd` ${python.interpreter} aenum/test.py 22 runHook postCheck 23 ''; 24 25 meta = with lib; { 26 description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants"; 27 maintainers = with maintainers; [ vrthra ]; 28 license = licenses.bsd3; 29 homepage = "https://github.com/ethanfurman/aenum"; 30 }; 31}