nixpkgs/pkgs/servers/db-rest/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
834 B
Nix
Raw Normal View History

2023-09-05 20:31:52 +00:00
{ lib
, buildNpmPackage
, fetchFromGitHub
, nodejs_18
, nix-update-script
2023-11-14 20:58:11 +00:00
, nixosTests
2023-09-05 20:31:52 +00:00
}:
buildNpmPackage rec {
pname = "db-rest";
2024-05-31 20:27:33 +00:00
version = "6.0.5";
2023-09-05 20:31:52 +00:00
nodejs = nodejs_18;
src = fetchFromGitHub {
owner = "derhuerst";
repo = pname;
rev = version;
2024-05-31 20:27:33 +00:00
hash = "sha256-jMHqJ1whGPz2ti7gn8SPz6o7Fm4oMF6hYjB4wsjKAEU=";
2023-09-05 20:31:52 +00:00
};
2024-05-31 20:27:33 +00:00
npmDepsHash = "sha256-rXBIpar5L6fGpDlphr1PqRNxARSccV7Gi+uTNlCqh7I=";
2023-09-05 20:31:52 +00:00
preConfigure = ''
patchShebangs ./build/index.js
'';
passthru.updateScript = nix-update-script { };
2023-11-14 20:58:11 +00:00
passthru.tests = {
inherit (nixosTests) db-rest;
};
2023-09-05 20:31:52 +00:00
meta = {
description = "Clean REST API wrapping around the Deutsche Bahn API";
homepage = "https://v6.db.transport.rest/";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ marie ];
2023-11-23 21:09:35 +00:00
mainProgram = "db-rest";
2023-09-05 20:31:52 +00:00
};
}