nur-packages

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

default.nix (1622B)


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