Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 setuptools, 6 flask, 7 webassets, 8 pytestCheckHook, 9}: 10 11buildPythonPackage rec { 12 pname = "flask-assets"; 13 version = "2.1.0"; 14 pyproject = true; 15 16 src = fetchPypi { 17 pname = "Flask-Assets"; 18 inherit version; 19 hash = "sha256-+E1lMv/lnJ/zUoheh0D/TaJcC8+s2AXwqAaBXkQ1SBM="; 20 }; 21 22 patchPhase = '' 23 substituteInPlace tests/test_integration.py --replace 'static_path=' 'static_url_path=' 24 substituteInPlace tests/test_integration.py --replace "static_folder = '/'" "static_folder = '/x'" 25 substituteInPlace tests/test_integration.py --replace "'/foo'" "'/x/foo'" 26 ''; 27 28 nativeBuildInputs = [ setuptools ]; 29 30 propagatedBuildInputs = [ 31 flask 32 webassets 33 ]; 34 35 doCheck = false; # tests are broken with webassets 2.0 36 37 nativeCheckInputs = [ pytestCheckHook ]; 38 39 pythonImportsCheck = [ "flask_assets" ]; 40 41 meta = with lib; { 42 homepage = "https://github.com/miracle2k/flask-assets"; 43 description = "Asset management for Flask, to compress and merge CSS and Javascript files"; 44 license = licenses.bsd2; 45 maintainers = with maintainers; [ abbradar ]; 46 }; 47}