nur-packages

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

package.nix (1483B)


      1 {
      2   lib,
      3   fetchFromGitHub,
      4   python3Packages,
      5 }:
      6 
      7 python3Packages.buildPythonApplication (finalAttrs: {
      8   pname = "tilecloud";
      9   version = "1.14.0";
     10   pyproject = true;
     11 
     12   src = fetchFromGitHub {
     13     owner = "camptocamp";
     14     repo = "tilecloud";
     15     tag = finalAttrs.version;
     16     hash = "sha256-hyPktwTADOHekPvkvtqoLctlz3FSrAZyUUVx0ZX63Rs=";
     17   };
     18 
     19   pythonRelaxDeps = true;
     20 
     21   patches = [ ./set-tmpl-path.patch ];
     22 
     23   postPatch = ''
     24     substituteInPlace pyproject.toml \
     25       --replace-fail 'version = "0.0.0"' 'version = "${finalAttrs.version}"'
     26   '';
     27 
     28   build-system = with python3Packages; [
     29     poetry-core
     30     poetry-dynamic-versioning
     31   ];
     32 
     33   dependencies = with python3Packages; [
     34     azure-core
     35     azure-storage-blob
     36     azure-identity
     37     boto3
     38     bottle
     39     cryptography
     40     pillow
     41     prometheus-client
     42     pyproj
     43     requests
     44     redis
     45   ];
     46 
     47   nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
     48 
     49   # https://github.com/camptocamp/tilecloud/issues/391
     50   postInstall = ''
     51     site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages
     52     cp -r static tiles $site_packages
     53     substituteInPlace $out/bin/tc-viewer --subst-var site_packages
     54     # bogus entry point, c2cciutils module isn't part of tilecloud
     55     rm $out/bin/c2cciutils
     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 })