From a36b794f00fc99e00140aad6c4fb284bf05b1bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C6=B0=C6=A1ng=20Huy=20Trung?= Date: Fri, 14 Jun 2024 00:56:41 +0930 Subject: [PATCH] mobroute: init at 0.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Nguyễn Gia Phong Co-Authored-By: Nikolay Korotkiy --- pkgs/by-name/mo/mobroute/package.nix | 57 ++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 pkgs/by-name/mo/mobroute/package.nix diff --git a/pkgs/by-name/mo/mobroute/package.nix b/pkgs/by-name/mo/mobroute/package.nix new file mode 100644 index 000000000000..6f1006ca9fdb --- /dev/null +++ b/pkgs/by-name/mo/mobroute/package.nix @@ -0,0 +1,57 @@ +{ + lib, + buildGoModule, + fetchFromSourcehut, + sqlite, + stdenv, +}: + +buildGoModule rec { + pname = "mobroute"; + version = "0.9.0"; + + src = fetchFromSourcehut { + owner = "~mil"; + repo = "mobroute"; + rev = "v${version}"; + hash = "sha256-eMLn9Px6jO88CQWpwFF7JK1UPHoEbhDXoU2G1aYe2dw="; + }; + vendorHash = "sha256-fMIa9HCfK6YDb0V0RhzomwuSqPhlwLBHJRjQV96cY8g="; + + buildInputs = [ sqlite ]; + tags = [ + "libsqlite3" + "sqlite_math_functions" + ]; + + preCheck = '' + export HOME=$TMPDIR + ''; + + postInstall = '' + mv $out/bin/{cli,mobroute} + ''; + + meta = with lib; { + description = "General purpose public transportation router based on GTFS"; + longDescription = '' + Mobroute is a general purpose public transportation router + (e.g. trip planner) Go library and CLI that works + by directly ingesting timetable (GTFS) data from transit agencies + (sourced from the Mobility Database). After data has been fetched, + routing calculations can be run offline. + + Overall, Mobroute aims to offer an opensource framework + for integrating data-provider-agnostic GTFS public transit capabilities + (integrated GTFS ETL, GTFS multisource support, and routing algorithm) + into applications to get users from point-a to point-b via public transit + without comprising privacy or user freedoms. + ''; + homepage = "https://git.sr.ht/~mil/mobroute"; + license = licenses.gpl3Plus; + maintainers = [ maintainers.McSinyx ]; + mainProgram = "mobroute"; + platforms = platforms.unix; + broken = stdenv.hostPlatform.isDarwin; + }; +}