mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
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" ```
31 lines
972 B
Nix
31 lines
972 B
Nix
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, gdal, openssl, darwin }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "t-rex";
|
|
version = "0.15.0-alpha3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "t-rex-tileserver";
|
|
repo = "t-rex";
|
|
rev = "v${version}";
|
|
hash = "sha256-oZZrR86/acoyMX3vC1JGrpc8G+DEuplqfEAnaP+TBGU=";
|
|
};
|
|
|
|
cargoHash = "sha256-nxq4mX2Sy6Hyi8tA2CQsQwISB/kau4DEkAgIm4SvGns=";
|
|
|
|
nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ];
|
|
|
|
buildInputs = [ gdal openssl ]
|
|
++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security;
|
|
|
|
meta = with lib; {
|
|
description = "Vector tile server specialized on publishing MVT tiles";
|
|
homepage = "https://t-rex.tileserver.ch/";
|
|
changelog = "https://github.com/t-rex-tileserver/t-rex/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = teams.geospatial.members;
|
|
mainProgram = "t_rex";
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|