package.nix (1558B)
1 { 2 lib, 3 fetchFromGitHub, 4 python3Packages, 5 c2cwsgiutils, 6 }: 7 8 python3Packages.buildPythonApplication (finalAttrs: { 9 pname = "tilecloud"; 10 version = "1.13.5"; 11 pyproject = true; 12 13 src = fetchFromGitHub { 14 owner = "camptocamp"; 15 repo = "tilecloud"; 16 tag = finalAttrs.version; 17 hash = "sha256-w/lKtxGjKz8AW4QhLolnTYP+89BZAbxcG8rY40OKLHU="; 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 --replace-fail "\"poetry-plugin-drop-python-upper-constraint\"" "" 29 ''; 30 31 build-system = with python3Packages; [ 32 poetry-core 33 poetry-dynamic-versioning 34 ]; 35 36 dependencies = with python3Packages; [ 37 azure-storage-blob 38 azure-identity 39 boto3 40 bottle 41 c2cwsgiutils 42 cryptography 43 pillow 44 prometheus-client 45 pyproj 46 requests 47 redis 48 ]; 49 50 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 51 52 # https://github.com/camptocamp/tilecloud/issues/391 53 postInstall = '' 54 site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages 55 cp -r static tiles $site_packages 56 substituteInPlace $out/bin/tc-viewer --subst-var site_packages 57 ''; 58 59 meta = { 60 description = "Tools for managing tiles"; 61 homepage = "https://github.com/camptocamp/tilecloud"; 62 license = lib.licenses.bsd2; 63 maintainers = [ lib.maintainers.sikmir ]; 64 }; 65 })
