e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
61 lines
1.1 KiB
Nix
61 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
|
|
attrs,
|
|
click,
|
|
flit,
|
|
mercantile,
|
|
pydantic,
|
|
pyproj,
|
|
rasterio,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "morecantile";
|
|
version = "5.4.2";
|
|
pyproject = true;
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "developmentseed";
|
|
repo = "morecantile";
|
|
rev = version;
|
|
hash = "sha256-kUAde+6IUu95tFHFCB6kWoYsRf9GxR+gRJki/tvhIaY=";
|
|
};
|
|
|
|
nativeBuildInputs = [ flit ];
|
|
|
|
propagatedBuildInputs = [
|
|
attrs
|
|
click
|
|
pydantic
|
|
pyproj
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
mercantile
|
|
pytestCheckHook
|
|
rasterio
|
|
];
|
|
|
|
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
# https://github.com/developmentseed/morecantile/issues/156
|
|
"test_tiles_when_tms_bounds_and_provided_bounds_cross_antimeridian"
|
|
];
|
|
|
|
pythonImportsCheck = [ "morecantile" ];
|
|
|
|
meta = {
|
|
description = "Construct and use map tile grids in different projection";
|
|
homepage = "https://developmentseed.org/morecantile/";
|
|
license = lib.licenses.mit;
|
|
maintainers = lib.teams.geospatial.members;
|
|
mainProgram = "morecantile";
|
|
};
|
|
}
|