summary refs log tree commit diff
path: root/pkgs/applications/graphics/mozjpeg
diff options
context:
space:
mode:
authorAristid Breitkreuz <aristidb@gmail.com>2016-01-07 22:05:13 +0100
committerAristid Breitkreuz <aristidb@gmail.com>2016-01-07 22:05:26 +0100
commit6acad9ea0443d39b1dc9a0df7c33b4d67709cfd8 (patch)
tree121e6efe78b0fdc2fd707567d3d2348cf7a0469e /pkgs/applications/graphics/mozjpeg
parentf148e119fe963e4c25051f34dcc48d3469089dd9 (diff)
downloadnixpkgs-6acad9ea0443d39b1dc9a0df7c33b4d67709cfd8.tar
nixpkgs-6acad9ea0443d39b1dc9a0df7c33b4d67709cfd8.tar.gz
nixpkgs-6acad9ea0443d39b1dc9a0df7c33b4d67709cfd8.tar.bz2
nixpkgs-6acad9ea0443d39b1dc9a0df7c33b4d67709cfd8.tar.lz
nixpkgs-6acad9ea0443d39b1dc9a0df7c33b4d67709cfd8.tar.xz
nixpkgs-6acad9ea0443d39b1dc9a0df7c33b4d67709cfd8.tar.zst
nixpkgs-6acad9ea0443d39b1dc9a0df7c33b4d67709cfd8.zip
mozjpeg: init at 3.1
Diffstat (limited to 'pkgs/applications/graphics/mozjpeg')
-rw-r--r--pkgs/applications/graphics/mozjpeg/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/mozjpeg/default.nix b/pkgs/applications/graphics/mozjpeg/default.nix
new file mode 100644
index 00000000000..2845bfd3e27
--- /dev/null
+++ b/pkgs/applications/graphics/mozjpeg/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, file, libpng, nasm }:
+
+stdenv.mkDerivation rec {
+  version = "3.1";
+  name = "mozjpeg-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/mozilla/mozjpeg/releases/download/v${version}/mozjpeg-${version}-release-source.tar.gz";
+    sha256 = "07vs0xq9di7bv3y68daig8dvxvjqrn8a5na702gj3nn58a1xivfy";
+  };
+
+  postPatch = ''
+
+    sed -i -e "s!/usr/bin/file!${file}/bin/file!g" configure
+  '';
+
+  buildInputs = [ libpng nasm ];
+
+  meta = {
+    description = "Mozilla JPEG Encoder Project";
+    longDescription = ''
+      This project's goal is to reduce the size of JPEG files without reducing quality or compatibility with the
+      vast majority of the world's deployed decoders.
+
+      The idea is to reduce transfer times for JPEGs on the Web, thus reducing page load times.
+    '';
+    homepage = https://github.com/mozilla/mozjpeg ;
+    license = stdenv.lib.licenses.bsd3;
+    maintainers = [ stdenv.lib.maintainers.aristid ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}