4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
31 lines
942 B
Nix
31 lines
942 B
Nix
{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k,
|
|
numpy, django_colorful, pillow, psycopg2,
|
|
pyparsing, django, celery, boto3, importlib-metadata
|
|
}:
|
|
if stdenv.lib.versionOlder django.version "2.0"
|
|
then throw "django-raster requires Django >= 2.0. Consider overiding the python package set to use django_2."
|
|
else
|
|
buildPythonPackage rec {
|
|
version = "0.8";
|
|
pname = "django-raster";
|
|
|
|
disabled = !isPy3k;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "9417d8a17930dffee4719f79a38c6ab5d20ac7145d4edf88df0abcb5a360de51";
|
|
};
|
|
|
|
# Tests require a postgresql + postgis server
|
|
doCheck = false;
|
|
|
|
propagatedBuildInputs = [ numpy django_colorful pillow psycopg2
|
|
pyparsing django celery boto3 importlib-metadata ];
|
|
|
|
meta = with lib; {
|
|
description = "Basic raster data integration for Django";
|
|
homepage = "https://github.com/geodesign/django-raster";
|
|
license = licenses.mit;
|
|
};
|
|
}
|