diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index b8c28a0e22e4..56ee6a56ccb8 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -9,7 +9,6 @@ args: with args; buildInputs =[(wxGTK null) libogg libvorbis libsndfile libmad pkgconfig gtk gettext glib]; } null); - with stringsWithDeps; let postInstall = FullDepEntry (" old_rpath=$(patchelf --print-rpath \$out/bin/audacity); diff --git a/pkgs/applications/audio/ladspa-plugins/default.nix b/pkgs/applications/audio/ladspa-plugins/default.nix index 12722356d85d..9a033a42b878 100644 --- a/pkgs/applications/audio/ladspa-plugins/default.nix +++ b/pkgs/applications/audio/ladspa-plugins/default.nix @@ -8,7 +8,6 @@ args: with args; buildInputs = [fftw ladspaH pkgconfig]; configureFlags = []; } null); - with stringsWithDeps; let postInstall = FullDepEntry (" ensureDir \$out/share/ladspa/ diff --git a/pkgs/applications/audio/ladspa-plugins/ladspah.nix b/pkgs/applications/audio/ladspa-plugins/ladspah.nix index 5ab77db3a2cf..b526e48b10ee 100644 --- a/pkgs/applications/audio/ladspa-plugins/ladspah.nix +++ b/pkgs/applications/audio/ladspa-plugins/ladspah.nix @@ -1,5 +1,4 @@ args: with args; - with stringsWithDeps; let src = fetchurl { diff --git a/pkgs/applications/audio/snd/default.nix b/pkgs/applications/audio/snd/default.nix index 142baf9dba36..9a650570a6d2 100644 --- a/pkgs/applications/audio/snd/default.nix +++ b/pkgs/applications/audio/snd/default.nix @@ -20,7 +20,6 @@ args : with args; ++ (lib.optional (args ? sndlib) "--with-midi" ) ; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; let preBuild = FullDepEntry (" cp config.log /tmp/snd-config.log ") [minInit doUnpack]; diff --git a/pkgs/applications/window-managers/compiz-fusion/bcop/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/bcop/0.6.0.nix index bc239b6dce25..ee6fd586dfe1 100644 --- a/pkgs/applications/window-managers/compiz-fusion/bcop/0.6.0.nix +++ b/pkgs/applications/window-managers/compiz-fusion/bcop/0.6.0.nix @@ -9,7 +9,6 @@ args : with args; propagatedBuildInputs = [getopt libxslt]; configureFlags = []; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; let fixPkgconfig = FullDepEntry (" ensureDir \$out/lib diff --git a/pkgs/applications/window-managers/compiz-fusion/ccsm/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/ccsm/0.6.0.nix index 019e371b759c..fba1c5d995f6 100644 --- a/pkgs/applications/window-managers/compiz-fusion/ccsm/0.6.0.nix +++ b/pkgs/applications/window-managers/compiz-fusion/ccsm/0.6.0.nix @@ -15,7 +15,6 @@ args : with args; "PYTHONPATH" "$(toPythonPath ${pygtk})/gtk-2.0" ]; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; stdenv.mkDerivation rec { name = "compizconfig-settings-"+args.version; builder = writeScript (name + "-builder") diff --git a/pkgs/applications/window-managers/compiz-fusion/compiz-manager/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/compiz-manager/0.6.0.nix index d0325db7c0c0..a38855074808 100644 --- a/pkgs/applications/window-managers/compiz-fusion/compiz-manager/0.6.0.nix +++ b/pkgs/applications/window-managers/compiz-fusion/compiz-manager/0.6.0.nix @@ -20,7 +20,6 @@ args : with args; "XORG_DRIVER_PATH" "/nix/store/.*" ]]; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; let install = FullDepEntry (" sed -e '/Checking for texture_from_pixmap:/areturn 0' -i compiz-manager diff --git a/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/0.6.0.nix index dcb0028b742a..73f1c653361c 100644 --- a/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/0.6.0.nix +++ b/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/0.6.0.nix @@ -9,7 +9,6 @@ args : with args; [libcompizconfig bcop python pyrex configBackendGConf]; configureFlags = []; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; stdenv.mkDerivation rec { name = "compizconfig-python-"+args.version; builder = writeScript (name + "-builder") diff --git a/pkgs/applications/window-managers/compiz-fusion/config-backend/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/config-backend/0.6.0.nix index 23a18b4d1d0e..3405ae0ce97a 100644 --- a/pkgs/applications/window-managers/compiz-fusion/config-backend/0.6.0.nix +++ b/pkgs/applications/window-managers/compiz-fusion/config-backend/0.6.0.nix @@ -10,7 +10,6 @@ args : with args; configureFlags = []; forceShare = ["man" "doc" "info" "lib/compizconfig"]; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; stdenv.mkDerivation rec { name = "compizconfig-backend-GConf-"+version; builder = writeScript (name + "-builder") diff --git a/pkgs/applications/window-managers/compiz-fusion/extra/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/extra/0.6.0.nix index 9fa90f260d18..e304eb9d6ae4 100644 --- a/pkgs/applications/window-managers/compiz-fusion/extra/0.6.0.nix +++ b/pkgs/applications/window-managers/compiz-fusion/extra/0.6.0.nix @@ -9,7 +9,6 @@ args : with args; [bcop libjpeg gettext pluginsMain]; configureFlags = []; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; let sharePlugins = FullDepEntry (" ensureDir \$out/share/compiz-plugins diff --git a/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/0.6.0.nix index b3f157abb4b8..8b5d729dc2dc 100644 --- a/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/0.6.0.nix +++ b/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/0.6.0.nix @@ -9,7 +9,6 @@ args : with args; [bcop]; configureFlags = []; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; stdenv.mkDerivation rec { name = "libcompizconfig-"+version; builder = writeScript (name + "-builder") diff --git a/pkgs/applications/window-managers/compiz-fusion/main/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/main/0.6.0.nix index 757fad07032a..40261da5cc4e 100644 --- a/pkgs/applications/window-managers/compiz-fusion/main/0.6.0.nix +++ b/pkgs/applications/window-managers/compiz-fusion/main/0.6.0.nix @@ -9,7 +9,6 @@ args : with args; [bcop libjpeg gettext]; configureFlags = []; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; let sharePlugins = FullDepEntry (" ensureDir \$out/share/compiz-plugins diff --git a/pkgs/applications/window-managers/compiz/0.6.2.nix b/pkgs/applications/window-managers/compiz/0.6.2.nix index 669e84858b2d..92f67ba6877d 100644 --- a/pkgs/applications/window-managers/compiz/0.6.2.nix +++ b/pkgs/applications/window-managers/compiz/0.6.2.nix @@ -21,7 +21,6 @@ args : with args; (if args ? extraConfigureFlags then args.extraConfigureFlags else []); patches = [ ./glx-patch-0.6.2.patch ]; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; let postAll = FullDepEntry (" for i in $out/bin/*; do diff --git a/pkgs/development/interpreters/pyrex/0.9.6.nix b/pkgs/development/interpreters/pyrex/0.9.6.nix index 581edf53d6e0..7053f949a430 100644 --- a/pkgs/development/interpreters/pyrex/0.9.6.nix +++ b/pkgs/development/interpreters/pyrex/0.9.6.nix @@ -8,7 +8,6 @@ args : with args; buildInputs = [python]; configureFlags = []; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; stdenv.mkDerivation rec { name = "Pyrex-"+version; builder = writeScript (name + "-builder") diff --git a/pkgs/development/libraries/fftw/default.nix b/pkgs/development/libraries/fftw/default.nix index 66c78b3a1c0a..3f7125443034 100644 --- a/pkgs/development/libraries/fftw/default.nix +++ b/pkgs/development/libraries/fftw/default.nix @@ -8,7 +8,6 @@ args : with args; buildInputs = []; configureFlags = ["--enable-float --enable-shared"]; } null; - with stringsWithDeps; stdenv.mkDerivation { name = "fftw-3.1.2"; builder = writeScript "fftw-3.1.2-builder" diff --git a/pkgs/development/tools/misc/intltool/0.36.2.nix b/pkgs/development/tools/misc/intltool/0.36.2.nix index f561813abc19..f42a6901dfa5 100644 --- a/pkgs/development/tools/misc/intltool/0.36.2.nix +++ b/pkgs/development/tools/misc/intltool/0.36.2.nix @@ -9,7 +9,6 @@ args : with args; buildInputs = [perl perlXMLParser]; configureFlags = []; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; stdenv.mkDerivation rec { name = "intltool-0.36.2"; builder = writeScript (name + "-builder") diff --git a/pkgs/development/tools/misc/ltrace/default.nix b/pkgs/development/tools/misc/ltrace/default.nix index 54ea940ed2f3..23b44bf3b5b7 100644 --- a/pkgs/development/tools/misc/ltrace/default.nix +++ b/pkgs/development/tools/misc/ltrace/default.nix @@ -12,7 +12,6 @@ args : with args; cd ltrace-*; "; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; let preConfigure = FullDepEntry (" sed -e 's@-o root -g root@@' -i Makefile.in; diff --git a/pkgs/games/fsg/alt-builder.nix b/pkgs/games/fsg/alt-builder.nix index e0e006df073a..8efd788789b4 100644 --- a/pkgs/games/fsg/alt-builder.nix +++ b/pkgs/games/fsg/alt-builder.nix @@ -8,7 +8,6 @@ args: with args; sha256 = "1756y01rkvd3f1pkj88jqh83fqcfl2fy0c48mcq53pjzln9ycv8c"; }; } null); - with stringsWithDeps; let preBuild = FullDepEntry " sed -e ' diff --git a/pkgs/lib/strings-with-deps.nix b/pkgs/lib/strings-with-deps.nix index 584afae9838d..78cded99ef71 100644 --- a/pkgs/lib/strings-with-deps.nix +++ b/pkgs/lib/strings-with-deps.nix @@ -42,6 +42,8 @@ rec { (uniqList {inputList = textClosureDupList arg;})); textClosure = arg: concatStringsSep "\n" (textClosureList arg); + textClosureMap = f: arg: concatStringsSep "\n" (map f (textClosureList arg)); + noDepEntry = text : {inherit text;deps = [];}; FullDepEntry = text : deps: {inherit text deps;}; PackEntry = deps: {inherit deps; text="";}; diff --git a/pkgs/misc/synaptics/default.nix b/pkgs/misc/synaptics/default.nix index dc80035e2d2f..66555e696712 100644 --- a/pkgs/misc/synaptics/default.nix +++ b/pkgs/misc/synaptics/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, libX11, pkgconfig, xorgserver, libXi, libXext}: +args: with args; stdenv.mkDerivation { name = "synaptics-0.14.6"; @@ -7,8 +7,9 @@ stdenv.mkDerivation { md5 = "1102cd575045640a064ab6f9b1e391af"; }; - makeFlags="DESTDIR=\${out} PREFIX=/"; - buildInputs = [libX11 pkgconfig xorgserver libXi libXext]; + preBuild = "export NIX_CFLAGS_COMPILE=\"\${NIX_CFLAGS_COMPILE} -I${pixman}/include/pixman-1\""; + makeFlags="DESTDIR=\${out} PREFIX=/ "; + buildInputs = [libX11 pkgconfig xorgserver libXi libXext pixman]; meta = { description = "Driver for synaptics touchpad."; diff --git a/pkgs/tools/admin/tightvnc/default.nix b/pkgs/tools/admin/tightvnc/default.nix index 779ee3452fd3..ad8fa50a299c 100644 --- a/pkgs/tools/admin/tightvnc/default.nix +++ b/pkgs/tools/admin/tightvnc/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, x11, zlib, libjpeg, imake, gccmakedep, libXmu, libXaw, libXpm, libXp , perl}: +{stdenv, fetchurl, x11, zlib, libjpeg, imake, gccmakedep, libXmu, libXaw, libXpm, libXp , perl, xauth}: stdenv.mkDerivation { name = "tightvnc-1.3.9"; @@ -9,5 +9,6 @@ stdenv.mkDerivation { url = mirror://sourceforge/vnc-tight/tightvnc-1.3.9_unixsrc.tar.bz2; sha256 = "0nij6kyzwxf7nblwd6riwqhzh8b8xwdffpj379zi5y9mcmiwmalr"; }; - buildInputs = [x11 zlib libjpeg imake gccmakedep libXmu libXaw libXpm libXp]; + buildInputs = [x11 zlib libjpeg imake gccmakedep libXmu libXaw libXpm libXp + xauth]; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1fb9334e8526..380f29a428ef 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -700,7 +700,7 @@ rec { tightvnc = import ../tools/admin/tightvnc { inherit fetchurl stdenv x11 zlib libjpeg perl; - inherit (xlibs) imake gccmakedep libXmu libXaw libXpm libXp; + inherit (xlibs) imake gccmakedep libXmu libXaw libXpm libXp xauth; }; time = import ../tools/misc/time { @@ -1218,6 +1218,14 @@ rec { version = "0.9.6"; } null; + QiFun = lib.sumArgs (import ../development/compilers/qi) { + inherit clisp stdenv fetchurl builderDefs unzip; + }; + + Qi = QiFun { + version = getConfig ["Qi" "version"] "9.1"; + } null; + realPerl = import ../development/interpreters/perl { inherit fetchurl stdenv; }; @@ -4487,7 +4495,7 @@ rec { synaptics = import ../misc/synaptics { inherit fetchurl stdenv pkgconfig; - inherit (xlibs) libX11 libXi libXext; + inherit (xlibs) libX11 libXi libXext pixman; inherit (xorg) xorgserver; }; diff --git a/pkgs/top-level/builder-defs.nix b/pkgs/top-level/builder-defs.nix index 8aef5f7846d4..3337d6dc8a23 100644 --- a/pkgs/top-level/builder-defs.nix +++ b/pkgs/top-level/builder-defs.nix @@ -9,6 +9,7 @@ rec (if hasSuffixHack ".tar" s then "tar" else if (hasSuffixHack ".tar.gz" s) || (hasSuffixHack ".tgz" s) then "tgz" else if (hasSuffixHack ".tar.bz2" s) || (hasSuffixHack ".tbz2" s) then "tbz2" + else if (hasSuffixHack ".zip" s) || (hasSuffixHack ".ZIP" s) then "zip" else (abort "unknown archive type : ${s}")); minInit = noDepEntry (" @@ -33,9 +34,39 @@ rec export TZ=UTC prefix=${if args ? prefix then (toString args.prefix) else "\$out"} + + + nestingLevel=0 + + startNest() { + nestingLevel=\$((\$nestingLevel + 1)) + echo -en \"\\e[\$1p\" + } + + stopNest() { + nestingLevel=\$((\$nestingLevel - 1)) + echo -en \"\\e[q\" + } + + header() { + startNest \"\$2\" + echo \"\$1\" + } + + # Make sure that even when we exit abnormally, the original nesting + # level is properly restored. + closeNest() { + while test \$nestingLevel -gt 0; do + stopNest + done + } + + trap \"closeNest\" EXIT + + " else "")); - + addInputs = FullDepEntry (" # Recursively find all build inputs. findInputs() @@ -53,8 +84,6 @@ rec echo \$pkg if test -f \$pkg/nix-support/setup-hook; then source \$pkg/nix-support/setup-hook - cat \$pkg/nix-support/setup-hook - echo $PATH; fi if test -f \$pkg/nix-support/propagated-build-inputs; then @@ -118,14 +147,18 @@ rec ") [minInit]; toSrcDir = s : FullDepEntry ((if (archiveType s) == "tar" then " - tar xvf ${s} - cd \"\$(tar tf ${s} | head -1 | sed -e 's@/.*@@' )\" + tar xvf '${s}' + cd \"\$(tar tf '${s}' | head -1 | sed -e 's@/.*@@' )\" " else if (archiveType s) == "tgz" then " - tar xvzf ${s} - cd \"\$(tar tzf ${s} | head -1 | sed -e 's@/.*@@' )\" + tar xvzf '${s}' + cd \"\$(tar tzf '${s}' | head -1 | sed -e 's@/.*@@' )\" " else if (archiveType s) == "tbz2" then " - tar xvjf ${s} - cd \"\$(tar tjf ${s} | head -1 | sed -e 's@/.*@@' )\" + tar xvjf '${s}' + cd \"\$(tar tjf '${s}' | head -1 | sed -e 's@/.*@@' )\" + " else if (archiveType s) == "zip" then " + unzip '${s}' + cd \"$( unzip -lqq '${s}' | tail -1 | + sed -e 's@^\\(\\s\\+[-0-9:]\\+\\)\\{3,3\\}\\s\\+\\([^/]\\+\\)/.*@\\2@' )\" " else (abort "unknown archive type : ${s}"))+ (if args ? goSrcDir then args.goSrcDir else "") ) [minInit]; @@ -210,4 +243,8 @@ rec replaceInScript = file: l: (concatStringsSep "\n" ((pairMap (replaceScriptVar file) l))); replaceScripts = l:(concatStringsSep "\n" (pairMap replaceInScript l)); doReplaceScripts = FullDepEntry (replaceScripts (getAttr ["shellReplacements"] [] args)) [minInit]; + makeNest = x:(if x==minInit.text then x else "startNest\n" + x + "\nstopNest\n"); + textClosure = textClosureMap makeNest; + + inherit noDepEntry FullDepEntry PackEntry; } diff --git a/pkgs/top-level/template-composing-builder.nix b/pkgs/top-level/template-composing-builder.nix index f2995f0c60d5..8117b156879b 100644 --- a/pkgs/top-level/template-composing-builder.nix +++ b/pkgs/top-level/template-composing-builder.nix @@ -5,7 +5,6 @@ args : with args; buildInputs = []; configureFlags = []; } null; /* null is a terminator for sumArgs */ - with stringsWithDeps; stdenv.mkDerivation rec { name = "${abort "Specify name"}"; builder = writeScript (name + "-builder")