about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/ht/http-server/package.nix
blob: 9a058ac255baf7af7808be50af050f259b21821a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ lib
, buildNpmPackage
, fetchFromGitHub
, fetchpatch2
}:

buildNpmPackage rec {
  pname = "http-server";
  version = "14.1.1";

  src = fetchFromGitHub {
    owner = "http-party";
    repo = "http-server";
    rev = "v${version}";
    hash = "sha256-M/YC721QWJfz5sYX6RHm1U9WPHVRBD0ZL2/ceYItnhs=";
  };

  patches = [
    # https://github.com/http-party/http-server/pull/875
    (fetchpatch2 {
      name = "regenerate-package-lock.patch";
      url = "https://github.com/http-party/http-server/commit/0cbd85175f1a399c4d13c88a25c5483a9f1dea08.patch";
      hash = "sha256-hJyiUKZfuSaXTsjFi4ojdaE3rPHgo+N8k5Hqete+zqk=";
    })
  ];

  npmDepsHash = "sha256-iUTDdcibnstbSxC7cD5WbwSxQbfiIL2iNyMWJ8izSu0=";

  dontNpmBuild = true;

  meta = {
    description = "A simple zero-configuration command-line http server";
    homepage = "https://github.com/http-party/http-server";
    license = lib.licenses.mit;
    mainProgram = "http-server";
    maintainers = with lib.maintainers; [ ];
  };
}