summaryrefslogtreecommitdiff
path: root/pkgs/by-name/ht/html-minifier/package.nix
blob: 45d4e247bebb03ea67800f97c301c0669ff6806a (about) (plain)
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
{
  lib,
  buildNpmPackage,
  fetchFromGitHub,
}:

buildNpmPackage rec {
  pname = "html-minifier";
  version = "4.0.0";

  src = fetchFromGitHub {
    owner = "kangax";
    repo = "html-minifier";
    rev = "v${version}";
    hash = "sha256-OAykAqBxgr7tbeXXfSH23DALf7Eoh3VjDKNKWGAL3+A=";
  };

  npmDepsHash = "sha256-VWXc/nBXgvSE/DoLHR4XTFQ5kuwWC1m0/cj1CndfPH8=";

  npmFlags = [ "--ignore-scripts" ];

  postInstall = ''
    find $out/lib/node_modules -xtype l -delete
  '';

  dontNpmBuild = true;

  meta = {
    description = "Highly configurable, well-tested, JavaScript-based HTML minifier";
    homepage = "https://github.com/kangax/html-minifier";
    license = lib.licenses.mit;
    mainProgram = "html-minifier";
    maintainers = with lib.maintainers; [ chris-martin ];
  };
}