From c48824ba385c1b480d41bdd9f9e8b5b72a4fba74 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sun, 24 Jan 2016 15:50:54 +0000 Subject: cuneiform: use mkDerivation --- pkgs/tools/graphics/cuneiform/default.nix | 37 ++++++------------------------- 1 file changed, 7 insertions(+), 30 deletions(-) (limited to 'pkgs/tools/graphics') diff --git a/pkgs/tools/graphics/cuneiform/default.nix b/pkgs/tools/graphics/cuneiform/default.nix index 138ae58da064..c357c96fac8d 100644 --- a/pkgs/tools/graphics/cuneiform/default.nix +++ b/pkgs/tools/graphics/cuneiform/default.nix @@ -1,42 +1,19 @@ -a @ { cmake, patchelf, imagemagick, ... } : -let - fetchurl = a.fetchurl; +{ stdenv, fetchurl, cmake, patchelf, imagemagick }: +stdenv.mkDerivation rec { + name = "cuneiform-${version}"; version = "1.1.0"; - buildInputs = with a; [ - cmake imagemagick patchelf - ]; -in -rec { + src = fetchurl { url = "https://launchpad.net/cuneiform-linux/1.1/1.1/+download/cuneiform-linux-1.1.0.tar.bz2"; sha256 = "1bdvppyfx2184zmzcylskd87cxv56d8f32jf7g1qc8779l2hszjp"; }; - inherit buildInputs; - configureFlags = []; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doCmake" "doMakeInstall" "postInstall"]; - - libc = if a.stdenv ? glibc then a.stdenv.glibc else ""; - - doCmake = a.fullDepEntry('' - mkdir -p $PWD/builddir - cd builddir - export NIX_LDFLAGS="$NIX_LDFLAGS -ldl -L$out/lib" - cmake .. -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=$out -DDL_LIB=${libc}/lib - '') ["minInit" "addInputs" "doUnpack" "defEnsureDir"]; - - needLib64 = a.stdenv.system == "x86_64-linux"; - - postInstall = a.fullDepEntry('' - patchelf --set-rpath $out/lib${if needLib64 then "64" else ""}${if a.stdenv.cc.cc != null then ":${a.stdenv.cc.cc}/lib" else ""}${if a.stdenv.cc.cc != null && needLib64 then ":${a.stdenv.cc.cc}/lib64" else ""}:${a.imagemagick}/lib $out/bin/cuneiform - '') ["minInit" "addInputs" "doMakeInstall"]; + buildInputs = [ + cmake imagemagick + ]; - name = "cuneiform-" + version; meta = { - inherit version; description = "Multi-language OCR system"; }; } -- cgit 1.4.1 From 5e189bd207c78b5d3dd7161640bdca756dff04cb Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Tue, 26 Jan 2016 16:34:33 +0000 Subject: welkin: use mkDerivation and fix build --- pkgs/tools/graphics/welkin/default.nix | 68 ++++++++++++---------------------- 1 file changed, 23 insertions(+), 45 deletions(-) (limited to 'pkgs/tools/graphics') diff --git a/pkgs/tools/graphics/welkin/default.nix b/pkgs/tools/graphics/welkin/default.nix index 3d1a2aa5bdc0..6e268ef5941d 100644 --- a/pkgs/tools/graphics/welkin/default.nix +++ b/pkgs/tools/graphics/welkin/default.nix @@ -1,57 +1,35 @@ -x@{builderDefsPackage - , jre - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - ["jre"]; +{ stdenv, fetchsvn, jre, makeWrapper }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="welkin"; - version="1.1"; - name="${baseName}-${version}"; - url="http://simile.mit.edu/dist/welkin/${name}.tar.gz"; - hash="0hr2xvfz887fdf2ysiqydv6m13gbdl5x0fh4960i655d5imvd5x0"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; - }; +stdenv.mkDerivation rec { + name = "welkin-${version}"; + version = "1.1"; - inherit (sourceInfo) name version; - inherit buildInputs; + src = fetchsvn { + url = "http://simile.mit.edu/repository/welkin"; + rev = "9638"; + sha256 = "1bqh3vam7y805xrmdw7k0ckcfwjg88wypxgv3njkkwyn7kxnfnqp"; + }; - /* doConfigure should be removed if not needed */ - phaseNames = ["doDeploy" "createBin"]; + sourceRoot = "welkin-r9638/tags/${version}"; - doDeploy = a.simplyShare "welkin"; + buildInputs = [ jre makeWrapper ]; - createBin = a.fullDepEntry '' - mkdir -p "$out/bin" - echo "#! ${a.stdenv.shell}" > "$out/bin/welkin" - echo "export JAVA_HOME=${jre}" >> "$out/bin/welkin" - echo "\"$out/share/welkin/welkin.sh\" \"\$@\"" >> "$out/bin/welkin" - sed -e 's@[.]/lib/welkin[.]jar@"'"$out"'/share/welkin/lib/welkin.jar"@' -i "$out/share/welkin/welkin.sh" - chmod a+x "$out/bin/welkin" - '' ["minInit" "defEnsureDir"]; + installPhase = '' + mkdir -p $out/{bin,share} + cp -R . $out/share + cp $out/share/welkin.sh $out/bin/welkin + sed -e 's@\./lib/welkin\.jar@'"$out"'/share/lib/welkin.jar@' -i $out/bin/welkin + wrapProgram $out/bin/welkin \ + --set JAVA_HOME ${jre} + chmod a+x $out/bin/welkin + ''; meta = { description = "An RDF visualizer"; - maintainers = with a.lib.maintainers; - [ + maintainers = with stdenv.lib.maintainers; [ raskin ]; hydraPlatforms = []; - license = a.lib.licenses.free; - }; - passthru = { - updateInfo = { - downloadPage = "http://simile.mit.edu/dist/welkin/"; - }; + license = stdenv.lib.licenses.free; }; -}) x +} -- cgit 1.4.1 From 3101275527e55bfbdc74e7093be95a41384b6ab4 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sun, 31 Jan 2016 17:44:35 +0100 Subject: vips: 8.1.1 -> 8.2.2 cc @kovirobi --- pkgs/tools/graphics/vips/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/tools/graphics') diff --git a/pkgs/tools/graphics/vips/default.nix b/pkgs/tools/graphics/vips/default.nix index 153611e05874..7b0cbc16e11a 100644 --- a/pkgs/tools/graphics/vips/default.nix +++ b/pkgs/tools/graphics/vips/default.nix @@ -4,11 +4,11 @@ }: stdenv.mkDerivation rec { - name = "vips-8.1.1"; + name = "vips-8.2.2"; src = fetchurl { url = "http://www.vips.ecs.soton.ac.uk/supported/current/${name}.tar.gz"; - sha256 = "014sgpqj832vl5k212jv25sjakrsifnspjfclywpmn7cwaqwjlvx"; + sha256 = "12b319aicr129cpi5sixwd3q91y97vwwva6b044zy54px4s8ls0g"; }; buildInputs = -- cgit 1.4.1 From 4222b8c20c7b012c1a341e7ffdeb142d1bb92385 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 2 Feb 2016 16:53:49 +0300 Subject: asymptote: enable parallel building --- pkgs/tools/graphics/asymptote/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkgs/tools/graphics') diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix index 7a15b00b365f..e4242f8efabe 100644 --- a/pkgs/tools/graphics/asymptote/default.nix +++ b/pkgs/tools/graphics/asymptote/default.nix @@ -22,9 +22,11 @@ in stdenv.mkDerivation { inherit (s) name version; inherit buildInputs; + src = fetchurl { inherit (s) url sha256; }; + preConfigure = '' export HOME="$PWD" patchShebangs . @@ -33,12 +35,16 @@ stdenv.mkDerivation { cp texinfo-*/doc/texinfo.tex doc/ export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${boehmgc}/include/gc" ''; + postInstall = '' mv -v "$out/share/info/asymptote/"*.info $out/share/info/ sed -i -e 's|(asymptote/asymptote)|(asymptote)|' $out/share/info/asymptote.info rmdir $out/share/info/asymptote rm $out/share/info/dir ''; + + enableParallelBuilding = true; + meta = { inherit (s) version; description = "A tool for programming graphics intended to replace Metapost"; -- cgit 1.4.1 From 3ab8f9720124b4b305f6552d3c746a80c58d0dec Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 2 Feb 2016 17:18:41 +0300 Subject: asymptote: enforce no bundled libraries, install tex files, offscreen rendering support --- pkgs/tools/graphics/asymptote/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pkgs/tools/graphics') diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix index e4242f8efabe..9199d6a038f0 100644 --- a/pkgs/tools/graphics/asymptote/default.nix +++ b/pkgs/tools/graphics/asymptote/default.nix @@ -1,6 +1,6 @@ {stdenv, fetchurl , freeglut, ghostscriptX, imagemagick, fftw - , boehmgc, mesa, ncurses, readline, gsl, libsigsegv + , boehmgc, mesa_glu, mesa_noglu, ncurses, readline, gsl, libsigsegv , python, zlib, perl, texLive, texinfo, xz }: let @@ -15,7 +15,7 @@ let }; buildInputs = [ freeglut ghostscriptX imagemagick fftw - boehmgc mesa ncurses readline gsl libsigsegv + boehmgc mesa_glu mesa_noglu mesa_noglu.osmesa ncurses readline gsl libsigsegv python zlib perl texLive texinfo xz ]; in @@ -33,9 +33,12 @@ stdenv.mkDerivation { sed -e 's@epswrite@eps2write@g' -i runlabel.in xz -d < ${texinfo.src} | tar --wildcards -x texinfo-'*'/doc/texinfo.tex cp texinfo-*/doc/texinfo.tex doc/ - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${boehmgc}/include/gc" + rm *.tar.gz + configureFlags="$configureFlags --with-latex=$out/share/texmf/tex/latex --with-context=$out/share/texmf/tex/context/third" ''; + NIX_CFLAGS_COMPILE = [ "-I${boehmgc}/include/gc" ]; + postInstall = '' mv -v "$out/share/info/asymptote/"*.info $out/share/info/ sed -i -e 's|(asymptote/asymptote)|(asymptote)|' $out/share/info/asymptote.info -- cgit 1.4.1 From b8d488ab938ee7c2b32c84e72e46573e85c1223b Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Fri, 5 Feb 2016 19:09:01 +0100 Subject: asymptote: fix tarball by asserting isLinux We have no osmesa on darwin, which caused an evaluation error. --- pkgs/tools/graphics/asymptote/default.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkgs/tools/graphics') diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix index 9199d6a038f0..c28349a31ccf 100644 --- a/pkgs/tools/graphics/asymptote/default.nix +++ b/pkgs/tools/graphics/asymptote/default.nix @@ -3,6 +3,9 @@ , boehmgc, mesa_glu, mesa_noglu, ncurses, readline, gsl, libsigsegv , python, zlib, perl, texLive, texinfo, xz }: + +assert stdenv.isLinux; + let s = # Generated upstream information rec { -- cgit 1.4.1