bundlerUpdateScript: init and use (#64822)

This commit is contained in:
Nick Novitski
2019-07-22 12:02:47 +00:00
committed by zimbatm
parent b24841dd22
commit 7136e0d0a6
79 changed files with 310 additions and 249 deletions
@@ -1,4 +1,4 @@
{ lib, bundlerApp, ruby, makeWrapper,
{ lib, bundlerApp, bundlerUpdateScript, makeWrapper,
withPngcrush ? true, pngcrush ? null,
withPngout ? true, pngout ? null,
withAdvpng ? true, advancecomp ? null,
@@ -45,8 +45,6 @@ bundlerApp {
pname = "image_optim";
gemdir = ./.;
inherit ruby;
exes = [ "image_optim" ];
buildInputs = [ makeWrapper ];
@@ -56,11 +54,13 @@ bundlerApp {
--prefix PATH : ${makeBinPath optionalDepsPath}
'';
passthru.updateScript = bundlerUpdateScript "image_optim";
meta = with lib; {
description = "Command line tool and ruby interface to optimize (lossless compress, optionally lossy) jpeg, png, gif and svg images using external utilities (advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegrescan, jpegtran, optipng, pngcrush, pngout, pngquant, svgo)";
homepage = https://github.com/toy/image_optim;
license = licenses.mit;
maintainers = with maintainers; [ srghma ];
maintainers = with maintainers; [ srghma nicknovitski ];
platforms = platforms.all;
};
}
@@ -1,9 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bundix bundler
SCRIPT_DIR=$(dirname "$(readlink -f "$BASH_SOURCE")")
cd $SCRIPT_DIR
bundle lock --update
bundix