tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
image_optim: init at 0.26.3
Serhii Khoma
7 years ago
57aa8713
1d7a5d87
+155
6 changed files
expand all
collapse all
unified
split
pkgs
applications
graphics
image_optim
Gemfile
Gemfile.lock
default.nix
gemset.nix
update.sh
top-level
all-packages.nix
+2
pkgs/applications/graphics/image_optim/Gemfile
···
1
1
+
source 'https://rubygems.org'
2
2
+
gem 'image_optim'
+23
pkgs/applications/graphics/image_optim/Gemfile.lock
···
1
1
+
GEM
2
2
+
remote: https://rubygems.org/
3
3
+
specs:
4
4
+
exifr (1.3.6)
5
5
+
fspath (3.1.0)
6
6
+
image_optim (0.26.3)
7
7
+
exifr (~> 1.2, >= 1.2.2)
8
8
+
fspath (~> 3.0)
9
9
+
image_size (>= 1.5, < 3)
10
10
+
in_threads (~> 1.3)
11
11
+
progress (~> 3.0, >= 3.0.1)
12
12
+
image_size (2.0.0)
13
13
+
in_threads (1.5.1)
14
14
+
progress (3.5.0)
15
15
+
16
16
+
PLATFORMS
17
17
+
ruby
18
18
+
19
19
+
DEPENDENCIES
20
20
+
image_optim
21
21
+
22
22
+
BUNDLED WITH
23
23
+
1.16.3
+68
pkgs/applications/graphics/image_optim/default.nix
···
1
1
+
{ lib, bundlerApp, fetchurl, ruby, makeWrapper,
2
2
+
withPngcrush ? true, pngcrush ? null,
3
3
+
withPngout ? true, pngout ? null,
4
4
+
withAdvpng ? true, advancecomp ? null,
5
5
+
withOptipng ? true, optipng ? null,
6
6
+
withPngquant ? true, pngquant ? null,
7
7
+
withJhead ? true, jhead ? null,
8
8
+
withJpegoptim ? true, jpegoptim ? null,
9
9
+
withJpegrecompress ? true, jpeg-archive ? null,
10
10
+
withJpegtran ? true, libjpeg ? null,
11
11
+
withGifsicle ? true, gifsicle ? null,
12
12
+
withSvgo ? true, svgo ? null
13
13
+
}:
14
14
+
15
15
+
assert withPngcrush -> pngcrush != null;
16
16
+
assert withPngout -> pngout != null;
17
17
+
assert withAdvpng -> advancecomp != null;
18
18
+
assert withOptipng -> optipng != null;
19
19
+
assert withPngquant -> pngquant != null;
20
20
+
assert withJhead -> jhead != null;
21
21
+
assert withJpegoptim -> jpegoptim != null;
22
22
+
assert withJpegrecompress -> jpeg-archive != null;
23
23
+
assert withJpegtran -> libjpeg != null;
24
24
+
assert withGifsicle -> gifsicle != null;
25
25
+
assert withSvgo -> svgo != null;
26
26
+
27
27
+
with lib;
28
28
+
29
29
+
let
30
30
+
optionalDepsPath = makeBinPath (
31
31
+
[]
32
32
+
++ optional withPngcrush pngcrush
33
33
+
++ optional withPngout pngout
34
34
+
++ optional withAdvpng advancecomp
35
35
+
++ optional withOptipng optipng
36
36
+
++ optional withPngquant pngquant
37
37
+
++ optional withJhead jhead
38
38
+
++ optional withJpegoptim jpegoptim
39
39
+
++ optional withJpegrecompress jpeg-archive
40
40
+
++ optional withJpegtran libjpeg
41
41
+
++ optional withGifsicle gifsicle
42
42
+
++ optional withSvgo svgo
43
43
+
);
44
44
+
in
45
45
+
46
46
+
bundlerApp {
47
47
+
pname = "image_optim";
48
48
+
gemdir = ./.;
49
49
+
50
50
+
inherit ruby;
51
51
+
52
52
+
exes = [ "image_optim" ];
53
53
+
54
54
+
buildInputs = [ makeWrapper ];
55
55
+
56
56
+
postBuild = ''
57
57
+
wrapProgram $out/bin/image_optim \
58
58
+
--prefix PATH : ${optionalDepsPath}
59
59
+
'';
60
60
+
61
61
+
meta = with lib; {
62
62
+
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)";
63
63
+
homepage = http://github.com/toy/image_optim;
64
64
+
license = licenses.mit;
65
65
+
maintainers = with maintainers; [ srghma ];
66
66
+
platforms = platforms.all;
67
67
+
};
68
68
+
}
+51
pkgs/applications/graphics/image_optim/gemset.nix
···
1
1
+
{
2
2
+
exifr = {
3
3
+
source = {
4
4
+
remotes = ["https://rubygems.org"];
5
5
+
sha256 = "0q2abhiyvgfv23i0izbskjxcqaxiw9bfg6s57qgn4li4yxqpwpfg";
6
6
+
type = "gem";
7
7
+
};
8
8
+
version = "1.3.6";
9
9
+
};
10
10
+
fspath = {
11
11
+
source = {
12
12
+
remotes = ["https://rubygems.org"];
13
13
+
sha256 = "1vjn9sy4hklr2d5wxmj5x1ry31dfq3sjp779wyprb3nbbdmra1sc";
14
14
+
type = "gem";
15
15
+
};
16
16
+
version = "3.1.0";
17
17
+
};
18
18
+
image_optim = {
19
19
+
dependencies = ["exifr" "fspath" "image_size" "in_threads" "progress"];
20
20
+
source = {
21
21
+
remotes = ["https://rubygems.org"];
22
22
+
sha256 = "082w9qcyy9j6m6s2pknfdcik7l2qch4j48axs13m06l4s1hz0dmg";
23
23
+
type = "gem";
24
24
+
};
25
25
+
version = "0.26.3";
26
26
+
};
27
27
+
image_size = {
28
28
+
source = {
29
29
+
remotes = ["https://rubygems.org"];
30
30
+
sha256 = "0bcn7nc6qix3w4sf7xd557lnsgjniqa7qvz7nnznx70m8qfbc7ig";
31
31
+
type = "gem";
32
32
+
};
33
33
+
version = "2.0.0";
34
34
+
};
35
35
+
in_threads = {
36
36
+
source = {
37
37
+
remotes = ["https://rubygems.org"];
38
38
+
sha256 = "14hqm59sgqi91ag187zwpgwi58xckjkk58m031ghkp0csl8l9mkx";
39
39
+
type = "gem";
40
40
+
};
41
41
+
version = "1.5.1";
42
42
+
};
43
43
+
progress = {
44
44
+
source = {
45
45
+
remotes = ["https://rubygems.org"];
46
46
+
sha256 = "1yrzq4v5sp7cg4nbgqh11k3d1czcllfz98dcdrxrsjxwq5ziiw0p";
47
47
+
type = "gem";
48
48
+
};
49
49
+
version = "3.5.0";
50
50
+
};
51
51
+
}
+9
pkgs/applications/graphics/image_optim/update.sh
···
1
1
+
#!/usr/bin/env nix-shell
2
2
+
#!nix-shell -i bash -p bundix bundler
3
3
+
4
4
+
SCRIPT_DIR=$(dirname "$(readlink -f "$BASH_SOURCE")")
5
5
+
6
6
+
cd $SCRIPT_DIR
7
7
+
8
8
+
bundle lock --update
9
9
+
bundix
+2
pkgs/top-level/all-packages.nix
···
22515
22515
22516
22516
illum = callPackage ../tools/system/illum { };
22517
22517
22518
22518
+
image_optim = callPackage ../applications/graphics/image_optim { inherit (nodePackages) svgo; };
22519
22519
+
22518
22520
# using the new configuration style proposal which is unstable
22519
22521
jack1 = callPackage ../misc/jackaudio/jack1.nix { };
22520
22522