Merge pull request #243945 from gaelreyrol/minify-update-2.12.7
minify: 2.11.1 -> 2.12.7
This commit is contained in:
commit
5df4d78d54
2 changed files with 45 additions and 6 deletions
|
@ -1,24 +1,51 @@
|
|||
{ buildGoModule, fetchFromGitHub, lib }:
|
||||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, nix-update-script
|
||||
, testers
|
||||
, minify
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "minify";
|
||||
version = "2.11.1";
|
||||
version = "2.12.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tdewolff";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-qna2u+Y4eRGLNvRKDbL/VQud1pn8b1wWzbKQM1p0Yws=";
|
||||
hash = "sha256-V3lFM58ciU9RrIp5s+ZMaCUAfRJxbTuQxusXhLCiGmI=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-stj3fOaPM70kF6vTX/DEs4qFq/O0Vq0TFw0J/3L5NmA=";
|
||||
patches = [ ./update-go-version-mod.patch ];
|
||||
|
||||
vendorHash = "sha256-v3ZPaeE1YW9BRXHxGsmN8tHv3ApOY+NivfePctOmYlM=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
|
||||
|
||||
subPackages = [ "cmd/minify" ];
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
tests.version = testers.testVersion {
|
||||
inherit version;
|
||||
package = minify;
|
||||
command = "minify --version";
|
||||
};
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd minify --bash cmd/minify/bash_completion
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Minifiers for web formats";
|
||||
license = licenses.mit;
|
||||
description = "Go minifiers for web formats";
|
||||
homepage = "https://go.tacodewolff.nl/minify";
|
||||
downloadPage = "https://github.com/tdewolff/minify";
|
||||
changelog = "https://github.com/tdewolff/minify/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
|
|
12
pkgs/development/web/minify/update-go-version-mod.patch
Normal file
12
pkgs/development/web/minify/update-go-version-mod.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git a/go.mod b/go.mod
|
||||
index cebe363..f9ae9c8 100644
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -1,6 +1,6 @@
|
||||
module github.com/tdewolff/minify/v2
|
||||
|
||||
-go 1.13
|
||||
+go 1.18
|
||||
|
||||
require (
|
||||
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 // indirect
|
Loading…
Reference in a new issue