mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 05:50:00 +00:00
52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromSourcehut,
|
|
sqlite,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "mobsql";
|
|
version = "0.10.0";
|
|
|
|
src = fetchFromSourcehut {
|
|
owner = "~mil";
|
|
repo = "mobsql";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-Q0TMSomLDDivfDD4bDeirEpzRUuoJkC0Ph3XIhJ/dYw=";
|
|
};
|
|
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 = {
|
|
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 simultaneously).
|
|
'';
|
|
homepage = "https://git.sr.ht/~mil/mobsql";
|
|
license = lib.licenses.gpl3Plus;
|
|
maintainers = [ lib.maintainers.McSinyx ];
|
|
mainProgram = "mobsql";
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|