depot/third_party/nixpkgs/pkgs/servers/db-rest/default.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

40 lines
849 B
Nix

{ lib
, buildNpmPackage
, fetchFromGitHub
, nodejs_18
, nix-update-script
, fetchpatch
, nixosTests
}:
buildNpmPackage rec {
pname = "db-rest";
version = "6.0.4";
nodejs = nodejs_18;
src = fetchFromGitHub {
owner = "derhuerst";
repo = pname;
rev = version;
hash = "sha256-guiAtPOvU/yqspq+G+mTSIFqBp6Kl0JZBPfjPC+ZM1g=";
};
npmDepsHash = "sha256-lJT344HpHJFN3QO6kVAj1NhRFTwS+EVkR0ePbtIguFo=";
preConfigure = ''
patchShebangs ./build/index.js
'';
passthru.updateScript = nix-update-script { };
passthru.tests = {
inherit (nixosTests) db-rest;
};
meta = {
description = "A clean REST API wrapping around the Deutsche Bahn API";
homepage = "https://v6.db.transport.rest/";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ marie ];
mainProgram = "db-rest";
};
}