diff options
author | Luca Bruno <lethalman88@gmail.com> | 2015-11-25 21:31:09 +0100 |
---|---|---|
committer | Luca Bruno <lethalman88@gmail.com> | 2015-11-25 21:37:30 +0100 |
commit | a41292792498e03024d682d092947c2153290073 (patch) | |
tree | b937402b60ea79cfa0e5562dad3268127a491d81 /pkgs/tools/graphics | |
parent | 8a664fd5bc6b170bdf809030de6871fd6a454f5a (diff) | |
parent | b34a6c96ee14518b82648c5a8c1b29225c15d9df (diff) | |
download | nixpkgs-a41292792498e03024d682d092947c2153290073.tar nixpkgs-a41292792498e03024d682d092947c2153290073.tar.gz nixpkgs-a41292792498e03024d682d092947c2153290073.tar.bz2 nixpkgs-a41292792498e03024d682d092947c2153290073.tar.lz nixpkgs-a41292792498e03024d682d092947c2153290073.tar.xz nixpkgs-a41292792498e03024d682d092947c2153290073.tar.zst nixpkgs-a41292792498e03024d682d092947c2153290073.zip |
Merge remote-tracking branch 'origin/master' into closure-size
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r-- | pkgs/tools/graphics/barcode/default.nix | 45 | ||||
-rw-r--r-- | pkgs/tools/graphics/cfdg/default.nix | 48 | ||||
-rw-r--r-- | pkgs/tools/graphics/gifsicle/default.nix | 22 | ||||
-rw-r--r-- | pkgs/tools/graphics/qrdecode/default.nix | 41 | ||||
-rw-r--r-- | pkgs/tools/graphics/zbar/default.nix | 61 |
5 files changed, 83 insertions, 134 deletions
diff --git a/pkgs/tools/graphics/barcode/default.nix b/pkgs/tools/graphics/barcode/default.nix index 23a2e6dd78f..b35b929da40 100644 --- a/pkgs/tools/graphics/barcode/default.nix +++ b/pkgs/tools/graphics/barcode/default.nix @@ -1,42 +1,21 @@ -x@{builderDefsPackage - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - version = "0.99"; - baseName="barcode"; - name="${baseName}-${version}"; - url="mirror://gnu/${baseName}/${name}.tar.xz"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + version = "0.99"; + pname = "barcode"; + src = fetchurl { + url = "mirror://gnu/${pname}/${name}.tar.xz"; sha256 = "1indapql5fjz0bysyc88cmc54y8phqrbi7c76p71fgjp45jcyzp8"; }; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - meta = { + meta = with stdenv.lib; { description = "GNU barcode generator"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; allBut darwin; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; allBut darwin; downloadPage = "http://ftp.gnu.org/gnu/barcode/"; updateWalker = true; inherit version; + homepage = http://ftp.gnu.org/gnu/barcode/; }; -}) x - +} diff --git a/pkgs/tools/graphics/cfdg/default.nix b/pkgs/tools/graphics/cfdg/default.nix index 9376ad6a709..2b88ada21aa 100644 --- a/pkgs/tools/graphics/cfdg/default.nix +++ b/pkgs/tools/graphics/cfdg/default.nix @@ -1,38 +1,32 @@ -a @ {libpng, bison, flex, ffmpeg, fullDepEntry, ...} : -let - s = import ./src-for-default.nix; - buildInputs = with a; [ - libpng bison flex ffmpeg - ]; -in -rec { - src = a.fetchUrlFromSrcInfo s; +{ stdenv, fetchurl, libpng, bison, flex, ffmpeg }: - inherit (s) name; - inherit buildInputs; - configureFlags = []; +stdenv.mkDerivation rec { + name = "cfdg-${version}"; + version = "3.0.2"; + src = fetchurl { + sha256 = "1pd1hjippbhad8l4s4lsglykh22i24qfrgmnxrsx71bvcqbr356p"; + url = "http://www.contextfreeart.org/download/ContextFreeSource${version}.tgz"; + }; + + buildInputs = [ libpng bison flex ffmpeg ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["doFixInc" "doMake" "copyFiles"]; - - doFixInc = a.fullDepEntry '' + postPatch = '' sed -e "/YY_NO_UNISTD/a#include <stdio.h>" -i src-common/cfdg.l - '' ["doUnpack" "minInit"]; - - copyFiles = a.fullDepEntry '' + ''; + + installPhase = '' mkdir -p $out/bin cp cfdg $out/bin/ mkdir -p $out/share/doc/${name} cp *.txt $out/share/doc/${name} - '' ["defEnsureDir" "doMake"]; - - meta = { + ''; + + meta = with stdenv.lib; { description = "Context-free design grammar - a tool for graphics generation"; - maintainers = [ - a.lib.maintainers.raskin - ]; - platforms = with a.lib.platforms; - linux; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.linux; + homepage = http://contextfreeart.org/; + downloadPage = "http://contextfreeart.org/mediawiki/index.php/Download_page"; }; } diff --git a/pkgs/tools/graphics/gifsicle/default.nix b/pkgs/tools/graphics/gifsicle/default.nix index 0984d917e52..4404a8b6440 100644 --- a/pkgs/tools/graphics/gifsicle/default.nix +++ b/pkgs/tools/graphics/gifsicle/default.nix @@ -2,22 +2,32 @@ with stdenv.lib; -stdenv.mkDerivation { - name = "gifsicle-1.87"; +stdenv.mkDerivation rec { + name = "gifsicle-${version}"; + version = "1.88"; src = fetchurl { - url = http://www.lcdf.org/gifsicle/gifsicle-1.87.tar.gz; - sha256 = "078rih7gq86ixjqbnn5z1jsh11qlfisw6k8dxaccsh5amhybw2j7"; + url = "http://www.lcdf.org/gifsicle/${name}.tar.gz"; + sha256 = "4585d2e683d7f68eb8fcb15504732d71d7ede48ab5963e61915201f9e68305be"; }; buildInputs = optional gifview [ xproto libXt libX11 ]; + configureFlags = [] + ++ optional (!gifview) [ "--disable-gifview" ]; + LDFLAGS = optional static "-static"; + doCheck = true; + checkPhase = '' + ./src/gifsicle --info logo.gif + ''; + meta = { description = "Command-line tool for creating, editing, and getting information about GIF images and animations"; - homepage = http://www.lcdf.org/gifsicle/; + homepage = https://www.lcdf.org/gifsicle/; license = stdenv.lib.licenses.gpl2; - maintainers = with stdenv.lib.maintainers; [ fuuzetsu ]; + platforms = platforms.all; + maintainers = with stdenv.lib.maintainers; [ fuuzetsu zimbatm ]; }; } diff --git a/pkgs/tools/graphics/qrdecode/default.nix b/pkgs/tools/graphics/qrdecode/default.nix index f84780ab3c3..308183d7ae1 100644 --- a/pkgs/tools/graphics/qrdecode/default.nix +++ b/pkgs/tools/graphics/qrdecode/default.nix @@ -1,44 +1,29 @@ -args : -let - lib = args.lib; - fetchurl = args.fetchurl; - fullDepEntry = args.fullDepEntry; +{ stdenv, fetchurl, libpng, opencv }: + +stdenv.mkDerivation rec { + name = "libdecodeqr-${version}"; + version = "0.9.3"; - version = lib.attrByPath ["version"] "0.9.3" args; - buildInputs = with args; [ - libpng opencv - ]; -in -rec { src = fetchurl { url = "mirror://debian/pool/main/libd/libdecodeqr/libdecodeqr_${version}.orig.tar.gz"; sha256 = "1kmljwx69h7zq6zlp2j19bbpz11px45z1abw03acrxjyzz5f1f13"; }; - inherit buildInputs; - configureFlags = []; - - /* doConfigure should be specified separately */ - phaseNames = ["preConfigure" "doConfigure" "doMake" - "createDirs" "doMakeInstall" "postInstall"]; + buildInputs = [ libpng opencv ]; - preConfigure = fullDepEntry '' + preConfigure = '' cd src sed -e /LDCONFIG/d -i libdecodeqr/Makefile.in sed -e '/#include <cv.h>/a#include <ml.h>' -i libdecodeqr/imagereader.h - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${args.opencv}/include/opencv" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${opencv}/include/opencv" export NIX_LDFLAGS="$NIX_LDFLAGS -lcxcore" - '' ["doUnpack"]; - postInstall = fullDepEntry '' - cp sample/simple/simpletest $out/bin/qrdecode - cd .. - '' ["doMake"]; - createDirs = fullDepEntry '' - mkdir -p $out/bin $out/lib $out/include $out/share - '' ["defEnsureDir"]; + ''; + + preInstall = "mkdir -p $out/bin $out/lib $out/include $out/share"; + postInstall = "cp sample/simple/simpletest $out/bin/qrdecode"; - name = "libdecodeqr-" + version; meta = { description = "QR code decoder library"; + broken = true; }; } diff --git a/pkgs/tools/graphics/zbar/default.nix b/pkgs/tools/graphics/zbar/default.nix index 51dcc2a9c80..2f4e3f63374 100644 --- a/pkgs/tools/graphics/zbar/default.nix +++ b/pkgs/tools/graphics/zbar/default.nix @@ -1,39 +1,23 @@ -x@{builderDefsPackage - , imagemagickBig, pkgconfig, python, pygtk, perl, libX11, libv4l - , qt4, lzma, gtk2 - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, imagemagickBig, pkgconfig, python, pygtk, perl +, libX11, libv4l, qt4, lzma, gtk2 +}: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="zbar"; - version="0.10"; - name="${baseName}-${version}"; - pName="${baseName}"; - url="mirror://sourceforge/project/${pName}/${baseName}/${version}/${name}.tar.bz2"; - hash="1imdvf5k34g1x2zr6975basczkz3zdxg6xnci50yyp5yvcwznki3"; +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + pname = "zbar"; + version = "0.10"; + src = fetchurl { + url = "mirror://sourceforge/project/${pname}/${pname}/${version}/${name}.tar.bz2"; + sha256 = "1imdvf5k34g1x2zr6975basczkz3zdxg6xnci50yyp5yvcwznki3"; }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; - }; - - inherit (sourceInfo) name version; - inherit buildInputs; - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; + buildInputs = + [ imagemagickBig pkgconfig python pygtk perl libX11 + libv4l qt4 lzma gtk2 ]; configureFlags = ["--disable-video"]; - - meta = { + + meta = with stdenv.lib; { description = "Bar code reader"; longDescription = '' ZBar is an open source software suite for reading bar codes from various @@ -42,18 +26,15 @@ rec { EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. ''; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.lgpl21; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; linux; + license = licenses.lgpl21; + homepage = http://zbar.sourceforge.net/; }; + passthru = { updateInfo = { downloadPage = "http://zbar.sourceforge.net/"; }; }; -}) x - +} |