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