default.nix (1462B)
1 { 2 lib, 3 fetchFromGitHub, 4 python3Packages, 5 c2cwsgiutils, 6 }: 7 8 python3Packages.buildPythonApplication rec { 9 pname = "tilecloud"; 10 version = "1.13.2"; 11 pyproject = true; 12 13 src = fetchFromGitHub { 14 owner = "camptocamp"; 15 repo = "tilecloud"; 16 tag = version; 17 hash = "sha256-nxTfMTKj0pXAzQPYRdh08Qi0u+WY865s3JtvdNy2eIQ="; 18 }; 19 20 pythonRelaxDeps = true; 21 22 patches = [ ./set-tmpl-path.patch ]; 23 24 postPatch = '' 25 substituteInPlace pyproject.toml \ 26 --replace-fail "\"poetry-plugin-tweak-dependencies-version\"," "" \ 27 --replace-fail "\"poetry-plugin-tweak-dependencies-version>=1.1.0\"," "" 28 ''; 29 30 build-system = with python3Packages; [ 31 poetry-core 32 poetry-dynamic-versioning 33 ]; 34 35 dependencies = with python3Packages; [ 36 azure-storage-blob 37 azure-identity 38 boto3 39 bottle 40 c2cwsgiutils 41 cryptography 42 pillow 43 prometheus_client 44 pyproj 45 requests 46 redis 47 ]; 48 49 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 50 51 # https://github.com/camptocamp/tilecloud/issues/391 52 postInstall = '' 53 site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages 54 cp -r static tiles $site_packages 55 substituteInPlace $out/bin/tc-viewer --subst-var site_packages 56 ''; 57 58 meta = { 59 description = "Tools for managing tiles"; 60 homepage = "https://github.com/camptocamp/tilecloud"; 61 license = lib.licenses.bsd2; 62 maintainers = [ lib.maintainers.sikmir ]; 63 }; 64 }