Files
nixpkgs/pkgs/by-name/mo/mobsql/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

52 lines
1.3 KiB
Nix

{
lib,
buildGoModule,
fetchFromSourcehut,
sqlite,
}:
buildGoModule rec {
pname = "mobsql";
version = "0.9.0";
src = fetchFromSourcehut {
owner = "~mil";
repo = "mobsql";
rev = "v${version}";
hash = "sha256-7zrM2vmaikyClNgHHO8OXmATNpJtH85/CDv/86vwzZU=";
};
vendorHash = "sha256-YqduGY9c4zRQscjqze3ZOAB8EYj+0/6V7NceRwLe3DY=";
buildInputs = [ sqlite ];
buildPhase = ''
runHook preBuild
go build -o $GOPATH/bin/mobsql\
-tags=sqlite_math_functions,libsqlite3 cli/*.go
runHook postBuild
'';
checkPhase = ''
runHook preCheck
HOME=$TMPDIR go test -tags=sqlite_math_functions,libsqlite3 ./...
runHook postCheck
'';
meta = with lib; {
description = "GTFS to SQLite import utility";
longDescription = ''
Mobsql is a Go library and command-line application
which facilitates loading one or multiple Mobility Database
source GTFS feed archives into a SQLite database.
Its internal SQLite schema mirrors GTFS's spec but adds a feed_id field
to each table (thus allowing multiple feeds to be loaded
to the database simulatenously).
'';
homepage = "https://git.sr.ht/~mil/mobsql";
license = licenses.gpl3Plus;
maintainers = [ maintainers.McSinyx ];
mainProgram = "mobsql";
platforms = platforms.unix;
};
}