summary refs log tree commit diff
path: root/pkgs/development/web/minify/default.nix
blob: cd602317c70d86027d3cefc6bd718e1429233d94 (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
{ buildGoModule, fetchFromGitHub, stdenv, Security }:

buildGoModule rec {
  pname = "minify";
  version = "2.7.3";

  src = fetchFromGitHub {
    owner = "tdewolff";
    repo = pname;
    rev = "v${version}";
    sha256 = "12jns7m9liyjg9wy8ynvji2d2g4k2z1ymp6k3610mivmvg159sy4";
  };

  modSha256 = "09jk3mxf7n9wf1cgyiw9mhsr55fb12k399dmzhnib3vhd9xav15i";

  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

  buildFlagsArray = [ "-ldflags=-s -w -X main.Version=${version}" ];

  meta = with stdenv.lib; {
    description = "Minifiers for web formats";
    license = licenses.mit;
    homepage = "https://go.tacodewolff.nl/minify";
  };
}