about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/geospatial/t-rex/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/geospatial/t-rex/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/geospatial/t-rex/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/geospatial/t-rex/default.nix b/nixpkgs/pkgs/servers/geospatial/t-rex/default.nix
new file mode 100644
index 000000000000..fb132da85876
--- /dev/null
+++ b/nixpkgs/pkgs/servers/geospatial/t-rex/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, gdal, openssl, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "t-rex";
+  version = "0.14.3";
+
+  src = fetchFromGitHub {
+    owner = "t-rex-tileserver";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-LUVk5li2cl/LKbhKOh6Bbwav0GEuI/vUbDPLn7NSRIs=";
+  };
+
+  cargoHash = "sha256-I4QmjTTKUp9iugEwzM0xCcNLvF5ozeBdYmbi8sytY88=";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ gdal openssl ] ++ lib.optional stdenv.isDarwin 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 = with maintainers; [ sikmir ];
+    mainProgram = "t_rex";
+    platforms = platforms.unix;
+  };
+}