nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (1559B)


      1 {
      2   lib,
      3   fetchFromGitHub,
      4   python3Packages,
      5   c2cwsgiutils,
      6 }:
      7 
      8 python3Packages.buildPythonApplication rec {
      9   pname = "tilecloud";
     10   version = "1.12.2";
     11   pyproject = true;
     12 
     13   src = fetchFromGitHub {
     14     owner = "camptocamp";
     15     repo = "tilecloud";
     16     rev = version;
     17     hash = "sha256-B/TMLif24HYjETyvsXf00/H/ComQjs8P92DQdtygWw4=";
     18   };
     19 
     20   patches = [ ./set-tmpl-path.patch ];
     21 
     22   postPatch = ''
     23     substituteInPlace pyproject.toml \
     24       --replace-fail "\"poetry-plugin-drop-python-upper-constraint\"" "" \
     25       --replace-fail "\"poetry-plugin-tweak-dependencies-version\"," "" \
     26       --replace-fail "\"poetry-plugin-tweak-dependencies-version>=1.1.0\"," "" \
     27       --replace-fail "requests = \"2.32.2\"" "requests = \"*\""
     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     pillow
     42     prometheus_client
     43     pyproj
     44     requests
     45     redis
     46   ];
     47 
     48   nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
     49 
     50   # https://github.com/camptocamp/tilecloud/issues/391
     51   postInstall = ''
     52     site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages
     53     cp -r static tiles $site_packages
     54     substituteInPlace $out/bin/tc-viewer --subst-var site_packages
     55   '';
     56 
     57   meta = {
     58     description = "Tools for managing tiles";
     59     homepage = "https://github.com/camptocamp/tilecloud";
     60     license = lib.licenses.bsd2;
     61     maintainers = [ lib.maintainers.sikmir ];
     62   };
     63 }