1{
2 lib,
3 buildNpmPackage,
4 fetchFromGitHub,
5 fetchpatch2,
6}:
7
8buildNpmPackage rec {
9 pname = "http-server";
10 version = "14.1.1";
11
12 src = fetchFromGitHub {
13 owner = "http-party";
14 repo = "http-server";
15 rev = "v${version}";
16 hash = "sha256-M/YC721QWJfz5sYX6RHm1U9WPHVRBD0ZL2/ceYItnhs=";
17 };
18
19 patches = [
20 # https://github.com/http-party/http-server/pull/875
21 (fetchpatch2 {
22 name = "regenerate-package-lock.patch";
23 url = "https://github.com/http-party/http-server/commit/0cbd85175f1a399c4d13c88a25c5483a9f1dea08.patch";
24 hash = "sha256-hJyiUKZfuSaXTsjFi4ojdaE3rPHgo+N8k5Hqete+zqk=";
25 })
26 ];
27
28 npmDepsHash = "sha256-iUTDdcibnstbSxC7cD5WbwSxQbfiIL2iNyMWJ8izSu0=";
29
30 dontNpmBuild = true;
31
32 meta = {
33 description = "Simple zero-configuration command-line http server";
34 homepage = "https://github.com/http-party/http-server";
35 license = lib.licenses.mit;
36 mainProgram = "http-server";
37 maintainers = [ ];
38 };
39}