From 93b2ffcf3844f0861adfc83614b80f6a7564a2f2 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Wed, 15 Apr 2009 14:34:02 +0000 Subject: [PATCH 01/38] Removed all earlier virtualbox attempts, since they are obsolete now svn path=/nixpkgs/trunk/; revision=15069 --- .../virtualization/virtualbox/1.5.2.nix | 23 --------- .../virtualization/virtualbox/2.1.2.nix | 47 ------------------- .../virtualbox/{2.2.0.nix => default.nix} | 0 pkgs/top-level/all-packages.nix | 11 +---- 4 files changed, 1 insertion(+), 80 deletions(-) delete mode 100644 pkgs/applications/virtualization/virtualbox/1.5.2.nix delete mode 100644 pkgs/applications/virtualization/virtualbox/2.1.2.nix rename pkgs/applications/virtualization/virtualbox/{2.2.0.nix => default.nix} (100%) diff --git a/pkgs/applications/virtualization/virtualbox/1.5.2.nix b/pkgs/applications/virtualization/virtualbox/1.5.2.nix deleted file mode 100644 index a0d4dc89b68..00000000000 --- a/pkgs/applications/virtualization/virtualbox/1.5.2.nix +++ /dev/null @@ -1,23 +0,0 @@ -args : with args; - let localDefs = builderDefs { - src = /* put a fetchurl here */ - fetchurl { - url = http://www.virtualbox.org/download/1.5.2/VirtualBox-1.5.2_OSE.tar.bz2; - sha256 = "1g9rvkqjcsfx36gwk6i9c0bml6053xx2mdn1sn7vyyy0sgwkwk53"; - }; - buildInputs = [libXcursor bridge_utils umlutilities kernelHeaders - wine jre libxslt libIDL SDL qt3 openssl zlib]; - configureFlags = []; - } null; /* null is a terminator for sumArgs */ - in with localDefs; -stdenv.mkDerivation rec { - name = "VirtualBox-"+version; - builder = writeScript (name + "-builder") - (textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]); - meta = { - description = " - Virtual Box is just software for running virtual machines. -"; - inherit src; - }; -} diff --git a/pkgs/applications/virtualization/virtualbox/2.1.2.nix b/pkgs/applications/virtualization/virtualbox/2.1.2.nix deleted file mode 100644 index b33c58455fa..00000000000 --- a/pkgs/applications/virtualization/virtualbox/2.1.2.nix +++ /dev/null @@ -1,47 +0,0 @@ -{stdenv, fetchurl, iasl, dev86, libxslt, libxml2, libX11, xproto, libXext, libXcursor, qt3, qt4, libIDL, SDL, hal, libcap, zlib, libpng, glib, kernel}: - -stdenv.mkDerivation { - name = "virtualbox-2.1.2"; - - src = fetchurl { - url = http://download.virtualbox.org/virtualbox/2.1.2/VirtualBox-2.1.2-OSE.tar.bz2; - sha256 = "d3c1ae8ed7594094aaf8496204c5415479e1943e5b5179c5baae8a66885362de"; - }; - - buildInputs = [iasl dev86 libxslt libxml2 xproto libX11 libXext libXcursor qt3 qt4 libIDL SDL hal libcap glib kernel]; - - patchPhase = " - set -x - MODULES_BUILD_DIR=`echo ${kernel}/lib/modules/*/build` - sed -e 's@/lib/modules/`uname -r`/build@'$MODULES_BUILD_DIR@ \\ - -i configure - ls kBuild/bin/linux.x86/k* tools/linux.x86/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 - export USER=nix - set +x - "; - - configurePhase = '' - # It wants the qt utils from qt3, and it takes them from QTDIR - export QTDIR=${qt3} - ./configure --with-qt-dir=${qt3} --with-qt4-dir=${qt4} --disable-python --disable-alsa --disable-pulse --disable-hardening - sed -e 's@PKG_CONFIG_PATH=.*@PKG_CONFIG_PATH=${libIDL}/lib/pkgconfig:${glib}/lib/pkgconfig ${libIDL}/bin/libIDL-config-2@' \ - -i AutoConfig.kmk - sed -e 's@arch/x86/@@' \ - -i Config.kmk - cat >> AutoConfig.kmk << END_PATHS - VBOX_PATH_APP_PRIVATE := $out - VBOX_PATH_APP_DOCS := $out/doc - END_PATHS - ''; - - buildPhase = " - source env.sh - kmk - "; - - - meta = { - description = "PC emulator"; - homepage = http://www.virtualbox.org/; - }; -} diff --git a/pkgs/applications/virtualization/virtualbox/2.2.0.nix b/pkgs/applications/virtualization/virtualbox/default.nix similarity index 100% rename from pkgs/applications/virtualization/virtualbox/2.2.0.nix rename to pkgs/applications/virtualization/virtualbox/default.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 95d92fe15a6..1bac56398d6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7261,7 +7261,7 @@ let inherit (gnome) gtk glib pango libglade; }; - virtualbox = import ../applications/virtualization/virtualbox/2.2.0.nix { + virtualbox = import ../applications/virtualization/virtualbox { stdenv = stdenv_32bit; inherit fetchurl iasl dev86 libxslt libxml2 qt3 qt4 SDL hal libcap libpng zlib kernel python which; @@ -9074,15 +9074,6 @@ let flags = [ "X11" ]; # only flag "X11" by now }; - /*virtualboxFun = lib.sumArgs (selectVersion ../applications/virtualization/virtualbox "1.5.2") { - inherit stdenv fetchurl builderDefs bridge_utils umlutilities kernelHeaders - wine jre libxslt SDL qt3 openssl zlib; - inherit (xorg) libXcursor; - inherit (gnome) libIDL; - }; - - virtualbox = virtualboxFun null;*/ - vlc = import ../applications/video/vlc { inherit fetchurl stdenv perl xlibs zlib a52dec libmad faad2 ffmpeg libdvdnav pkgconfig hal fribidi qt4 freefont_ttf; From 3569572ce4ee70af3e0cc305339dfb9cb1e3af79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 16 Apr 2009 07:19:31 +0000 Subject: [PATCH 02/38] Fixing the name of iasl. svn path=/nixpkgs/trunk/; revision=15072 --- pkgs/development/compilers/iasl/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/iasl/default.nix b/pkgs/development/compilers/iasl/default.nix index 383b8183cc7..ec6384d8cba 100644 --- a/pkgs/development/compilers/iasl/default.nix +++ b/pkgs/development/compilers/iasl/default.nix @@ -1,7 +1,7 @@ {stdenv, fetchurl, bison, flex}: stdenv.mkDerivation { - name = "iasl-20090123.tar.gz"; + name = "iasl-20090123"; src = fetchurl { url = http://www.acpica.org/download/acpica-unix-20090123.tar.gz; md5 = "4ca6484acbf16cf67fd4ba91d32fd0a0"; From 95749f29f02413375c6e7efb250b5506a7265bd9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 09:06:23 +0000 Subject: [PATCH 03/38] * Latest Nix unstable. svn path=/nixpkgs/trunk/; revision=15075 --- pkgs/tools/package-management/nix/unstable.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix index 23a5c138d92..30404864b2a 100644 --- a/pkgs/tools/package-management/nix/unstable.nix +++ b/pkgs/tools/package-management/nix/unstable.nix @@ -5,11 +5,11 @@ }: stdenv.mkDerivation { - name = "nix-0.13pre14722"; + name = "nix-0.13pre15047"; src = fetchurl { - url = http://hydra.nixos.org/build/6757/download/1/nix-0.13pre14722.tar.bz2; - sha256 = "1459dd526a7805dedee91033313da4da249bf2ef13eb89c8c2a64e326464f68b"; + url = http://hydra.nixos.org/build/13105/download/1/nix-0.13pre15047.tar.bz2; + sha256 = "1dce821bd14743169744da9514c08f6c3bba45f13d780e7c3e368e971d1281fb"; }; buildInputs = [perl curl openssl]; From 32c7cb7a1d40863e0651596e98bec3c454edb373 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 12:23:53 +0000 Subject: [PATCH 04/38] * sdparm: the previous URL was broken. svn path=/nixpkgs/trunk/; revision=15084 --- pkgs/os-specific/linux/sdparm/1.03.nix | 21 --------------------- pkgs/os-specific/linux/sdparm/default.nix | 16 ++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++-- 3 files changed, 18 insertions(+), 23 deletions(-) delete mode 100644 pkgs/os-specific/linux/sdparm/1.03.nix create mode 100644 pkgs/os-specific/linux/sdparm/default.nix diff --git a/pkgs/os-specific/linux/sdparm/1.03.nix b/pkgs/os-specific/linux/sdparm/1.03.nix deleted file mode 100644 index 9bc19954e03..00000000000 --- a/pkgs/os-specific/linux/sdparm/1.03.nix +++ /dev/null @@ -1,21 +0,0 @@ -args : with args; - let localDefs = builderDefs.passthru.function { - src = /* put a fetchurl here */ - fetchurl { - url = http://freshmeat.net/redir/sdparm/66844/url_bz2/sdparm-1.03.tar.bz2; - sha256 = "2066af4d55c60bba366b34a29e02f37264e8e1f0efc232d65beba5e317c20819"; - }; - - buildInputs = []; - configureFlags = []; - }; - in with localDefs; -stdenv.mkDerivation rec { - name = "sdparm-"+version; - builder = writeScript (name + "-builder") - (textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]); - meta = { - description = "Utility for setting parameters of SCSI devices"; - inherit src; - }; -} diff --git a/pkgs/os-specific/linux/sdparm/default.nix b/pkgs/os-specific/linux/sdparm/default.nix new file mode 100644 index 00000000000..8389728f22d --- /dev/null +++ b/pkgs/os-specific/linux/sdparm/default.nix @@ -0,0 +1,16 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "sdparm-1.03"; + + src = fetchurl { + url = http://sg.danny.cz/sg/p/sdparm-1.03.tgz; + sha256 = "067bdhq2qc7h7ykf1yv86s9x12zscpqnsdlnr636a0nv0di2wymq"; + }; + + meta = { + homepage = http://sg.danny.cz/sg/sdparm.html; + description = "A utility to access SCSI device parameters"; + license = "free"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1bac56398d6..daca449f727 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7467,8 +7467,8 @@ let inherit fetchurl stdenv; }; - sdparm = composedArgsAndFun (selectVersion ../os-specific/linux/sdparm "1.03") { - inherit fetchurl stdenv builderDefs; + sdparm = import ../os-specific/linux/sdparm { + inherit fetchurl stdenv; }; shadowutils = import ../os-specific/linux/shadow { From fb6ccb6355fa910e3a910597c5102889bcf19bad Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 13:44:06 +0000 Subject: [PATCH 05/38] * Include the kernel version number in the Virtualbox name attribute to disambiguate between the various Virtualbox builds. svn path=/nixpkgs/trunk/; revision=15087 --- .../virtualization/virtualbox/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index c2a75c1c173..fa1a0563339 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -1,9 +1,10 @@ -{stdenv, fetchurl, iasl, dev86, libxslt, libxml2, libX11, xproto, libXext, libXcursor, qt3, qt4, libIDL, SDL, hal, libcap, zlib, libpng, glib, kernel, python, which}: +{ stdenv, fetchurl, iasl, dev86, libxslt, libxml2, libX11, xproto, libXext +, libXcursor, qt3, qt4, libIDL, SDL, hal, libcap, zlib, libpng, glib, kernel +, python, which +}: -let vboxScript = ./VBox.sh; -in stdenv.mkDerivation { - name = "virtualbox-2.2.0"; + name = "virtualbox-2.2.0-${kernel.version}"; src = fetchurl { url = http://download.virtualbox.org/virtualbox/2.2.0/VirtualBox-2.2.0-OSE.tar.bz2; @@ -56,7 +57,7 @@ stdenv.mkDerivation { ensureDir $MODULE_DIR make install ensureDir $out/bin - cp -v ${vboxScript} $out/bin/VBox.sh + cp -v ${./VBox.sh} $out/bin/VBox.sh sed -i -e "s|@INSTALL_PATH@|$out/virtualbox|" \ -e "s|@QT4_PATH@|${qt4}/lib|" \ -e "s|which|${which}/bin/which|" \ From 49e5575268f564799a3ee386941541daab8da1d0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 18:08:09 +0000 Subject: [PATCH 06/38] * Started cleaning up the GHC support. svn path=/nixpkgs/trunk/; revision=15091 --- pkgs/development/compilers/ghc-6.6/builder.sh | 26 ---------- .../development/compilers/ghc-6.6/default.nix | 26 ---------- .../compilers/ghc-6.6/setup-hook.sh | 41 ---------------- pkgs/development/compilers/ghc-6.8/head.nix | 47 ------------------- pkgs/top-level/all-packages.nix | 24 +--------- 5 files changed, 1 insertion(+), 163 deletions(-) delete mode 100644 pkgs/development/compilers/ghc-6.6/builder.sh delete mode 100644 pkgs/development/compilers/ghc-6.6/default.nix delete mode 100644 pkgs/development/compilers/ghc-6.6/setup-hook.sh delete mode 100644 pkgs/development/compilers/ghc-6.8/head.nix diff --git a/pkgs/development/compilers/ghc-6.6/builder.sh b/pkgs/development/compilers/ghc-6.6/builder.sh deleted file mode 100644 index 4f4760d6917..00000000000 --- a/pkgs/development/compilers/ghc-6.6/builder.sh +++ /dev/null @@ -1,26 +0,0 @@ -source $stdenv/setup - -# Setup isolated package management -postInstall() -{ - ensureDir "$out/nix-support" - echo "# Path to the GHC compiler directory in the store" > $out/nix-support/setup-hook - echo "ghc=$out" >> $out/nix-support/setup-hook - echo "" >> $out/nix-support/setup-hook - cat $setupHook >> $out/nix-support/setup-hook -} -postInstall=postInstall - -configureFlags="--with-readline-libraries=\"$readline/lib\"" - -preConfigure() -{ - chmod u+x rts/gmp/configure - # add library paths for gmp, ncurses - sed -i "s|^\(library-dirs.*$\)|\1 \"$gmp/lib\"|" rts/package.conf.in - sed -i "s|^\(library-dirs.*$\)|\1 \"$ncurses/lib\"|" libraries/readline/package.conf.in -} -preConfigure=preConfigure - -# Standard configure/make/make install -genericBuild diff --git a/pkgs/development/compilers/ghc-6.6/default.nix b/pkgs/development/compilers/ghc-6.6/default.nix deleted file mode 100644 index f76547c89d7..00000000000 --- a/pkgs/development/compilers/ghc-6.6/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses}: - -stdenv.mkDerivation { - name = "ghc-6.6"; - - src = map fetchurl [ - { url = http://www.haskell.org/ghc/dist/6.6/ghc-6.6-src.tar.bz2; - md5 = "2427a8d7d14f86e0878df6b54938acf7"; - } - { url = http://www.haskell.org/ghc/dist/6.6/ghc-6.6-src-extralibs.tar.bz2; - md5 = "14b22fce36caffa509046361724bc119"; - } - ]; - - builder = ./builder.sh; - - buildInputs = [ghc readline perl m4]; - - setupHook = ./setup-hook.sh; - - meta = { - description = "The Glasgow Haskell Compiler v6.6"; - }; - - inherit readline gmp ncurses; -} diff --git a/pkgs/development/compilers/ghc-6.6/setup-hook.sh b/pkgs/development/compilers/ghc-6.6/setup-hook.sh deleted file mode 100644 index b8441abc98a..00000000000 --- a/pkgs/development/compilers/ghc-6.6/setup-hook.sh +++ /dev/null @@ -1,41 +0,0 @@ -# Support dir for isolating GHC -ghc_support=$TMPDIR/ghc-6.6-nix-support -mkdir -p $ghc_support - -# Create isolated package config -packages_db=$ghc_support/package.conf -cp $ghc/lib/ghc-*/package.conf $packages_db -chmod +w $packages_db - -# Generate wrappers for GHC that use the isolated package config -makeWrapper() { - wrapperName="$1" - wrapper="$ghc_support/$wrapperName" - shift #the other arguments are passed to the source app - echo '#!'"$SHELL" > "$wrapper" - echo "exec \"$ghc/bin/$wrapperName\" $@" '"$@"' >> "$wrapper" - chmod +x "$wrapper" -} - -makeWrapper "ghc" "-no-user-package-conf -package-conf $packages_db" -makeWrapper "ghci" "-no-user-package-conf -package-conf $packages_db" -makeWrapper "runghc" "-no-user-package-conf -package-conf $packages_db" -makeWrapper "runhaskell" "-no-user-package-conf -package-conf $packages_db" -makeWrapper "ghc-pkg" "--global-conf $packages_db" - -# Add wrappers to search path -export _PATH=$ghc_support:$_PATH - -# Env hook to add packages to the package config -addLibToPackageConf () -{ - local regscript=$1/nix-support/register-ghclib.sh - if test -f $regscript; then - local oldpath=$PATH - export PATH=$ghc_support:$PATH - sh $regscript $package_db - export PATH=$oldpath - fi -} - -envHooks=(${envHooks[@]} addLibToPackageConf) diff --git a/pkgs/development/compilers/ghc-6.8/head.nix b/pkgs/development/compilers/ghc-6.8/head.nix deleted file mode 100644 index e274070036a..00000000000 --- a/pkgs/development/compilers/ghc-6.8/head.nix +++ /dev/null @@ -1,47 +0,0 @@ -{stdenv, fetchurl, readline, ghc, happy, alex, perl, m4, gmp, ncurses, haskellEditline}: - -stdenv.mkDerivation (rec { - name = "ghc-6.9.20080719"; - homepage = "http://www.haskell.org/ghc"; - - src = map fetchurl [ - { url = "${homepage}/dist/current/dist/${name}-src.tar.bz2"; - sha256 = "ed2371c3632962fccab6ec60c04e9fc6a38f3ade3a30a464cea5d53784bc3a34"; - } - { url = "${homepage}/dist/current/dist/${name}-src-extralibs.tar.bz2"; - sha256 = "d3c7aa7d53befe268f92148cc8f3b0861dfdc84e9b21b039af0f5b230bfbf72b"; - } - ]; - - buildInputs = [ghc readline perl m4 gmp happy alex haskellEditline]; - - # The setup hook is executed by other packages building with ghc. - # It then looks for package configurations that are available and - # build a package database on the fly. - setupHook = ./setup-hook.sh; - - meta = { - description = "The Glasgow Haskell Compiler"; - }; - - configureFlags=[ - "--with-gmp-libraries=${gmp}/lib" - "--with-gmp-includes=${gmp}/include" - "--with-readline-libraries=${readline}/lib" - "--with-gcc=${gcc}/bin/gcc" - ]; - - preConfigure = '' - # should not be present in a clean distribution - rm utils/pwd/pwd - # fix bug in makefile - sed -i -e 's/:\\"//' -e 's/\\"//' mk/config.mk.in - ''; - - postInstall = '' - ln -s $out/lib/${name}/ghc $out/lib/${name}/${name} - ''; - - inherit (stdenv) gcc; - inherit readline gmp ncurses; -}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index daca449f727..c1897e99d42 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1831,11 +1831,6 @@ let inherit ghc; }; - # ghc66boot = import ../development/compilers/ghc-6.6-boot { - # inherit fetchurl stdenv perl readline; - # m4 = gnum4; - #}; - ghc = ghc683; ghc682 = import ../development/compilers/ghc-6.8/ghc-6.8.2.nix { @@ -1849,21 +1844,11 @@ let haddock = haddockboot; }; - ghc69snapshot = lowPrio (import ../development/compilers/ghc-6.8/head.nix { - inherit fetchurl stdenv readline perl gmp ncurses m4 happy alex haskellEditline; - ghc = ghc683; - }); - ghc661 = import ../development/compilers/ghc-6.6.1 { inherit fetchurl stdenv readline perl58 gmp ncurses m4; ghc = ghcboot; }; - ghc66 = import ../development/compilers/ghc-6.6 { - inherit fetchurl stdenv readline perl gmp ncurses m4; - ghc = ghcboot; - }; - ghc64 = import ../development/compilers/ghc { inherit fetchurl stdenv perl ncurses readline m4 gmp; gcc = stdenv.gcc; @@ -1881,13 +1866,6 @@ let # readline = if stdenv.system == "i686-linux" then readline4 else readline; perl = perl58; })); - /* - ghcWrapper = assert uulib.ghc == ghc; - import ../development/compilers/ghc-wrapper { - inherit stdenv ghc; - libraries = []; - }; - */ gprolog = import ../development/compilers/gprolog { inherit fetchurl stdenv; @@ -4212,7 +4190,7 @@ let inherit stdenv fetchurl; ghc = ghc682; }; - + cabal683 = import ../development/libraries/haskell/cabal/cabal.nix { inherit stdenv fetchurl; ghc = ghc683; From 27855da0d9e5b835848019f6af627470aa2f4137 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 18:12:59 +0000 Subject: [PATCH 07/38] * Put all the GHCs in one directory. svn path=/nixpkgs/trunk/; revision=15092 --- .../compilers/ghc-6.6.1/setup-hook.sh | 41 ------------------- .../compilers/ghc/{default.nix => 6.4.2.nix} | 0 .../{ghc-6.6.1/default.nix => ghc/6.6.1.nix} | 0 .../{ghc-6.8/ghc-6.8.2.nix => ghc/6.8.2.nix} | 0 .../{ghc-6.8/ghc-6.8.3.nix => ghc/6.8.3.nix} | 0 .../compilers/{ghc-6.8 => ghc}/setup-hook.sh | 0 pkgs/top-level/all-packages.nix | 8 ++-- 7 files changed, 4 insertions(+), 45 deletions(-) delete mode 100644 pkgs/development/compilers/ghc-6.6.1/setup-hook.sh rename pkgs/development/compilers/ghc/{default.nix => 6.4.2.nix} (100%) rename pkgs/development/compilers/{ghc-6.6.1/default.nix => ghc/6.6.1.nix} (100%) rename pkgs/development/compilers/{ghc-6.8/ghc-6.8.2.nix => ghc/6.8.2.nix} (100%) rename pkgs/development/compilers/{ghc-6.8/ghc-6.8.3.nix => ghc/6.8.3.nix} (100%) rename pkgs/development/compilers/{ghc-6.8 => ghc}/setup-hook.sh (100%) diff --git a/pkgs/development/compilers/ghc-6.6.1/setup-hook.sh b/pkgs/development/compilers/ghc-6.6.1/setup-hook.sh deleted file mode 100644 index 03057e82f4a..00000000000 --- a/pkgs/development/compilers/ghc-6.6.1/setup-hook.sh +++ /dev/null @@ -1,41 +0,0 @@ -# Support dir for isolating GHC -ghc_support=$TMPDIR/ghc-6.6-nix-support -mkdir -p $ghc_support - -# Create isolated package config -packages_db=$ghc_support/package.conf -cp @out@/lib/ghc-*/package.conf $packages_db -chmod +w $packages_db - -# Generate wrappers for GHC that use the isolated package config -makeWrapper() { - wrapperName="$1" - wrapper="$ghc_support/$wrapperName" - shift #the other arguments are passed to the source app - echo '#!'"$SHELL" > "$wrapper" - echo "exec \"@out@/bin/$wrapperName\" $@" '"$@"' >> "$wrapper" - chmod +x "$wrapper" -} - -makeWrapper "ghc" "-no-user-package-conf -package-conf $packages_db" -makeWrapper "ghci" "-no-user-package-conf -package-conf $packages_db" -makeWrapper "runghc" "-no-user-package-conf -package-conf $packages_db" -makeWrapper "runhaskell" "-no-user-package-conf -package-conf $packages_db" -makeWrapper "ghc-pkg" "--global-conf $packages_db" - -# Add wrappers to search path -export _PATH=$ghc_support:$_PATH - -# Env hook to add packages to the package config -addLibToPackageConf () -{ - local regscript=$1/nix-support/register-ghclib.sh - if test -f $regscript; then - local oldpath=$PATH - export PATH=$ghc_support:$PATH - sh $regscript $package_db - export PATH=$oldpath - fi -} - -envHooks=(${envHooks[@]} addLibToPackageConf) diff --git a/pkgs/development/compilers/ghc/default.nix b/pkgs/development/compilers/ghc/6.4.2.nix similarity index 100% rename from pkgs/development/compilers/ghc/default.nix rename to pkgs/development/compilers/ghc/6.4.2.nix diff --git a/pkgs/development/compilers/ghc-6.6.1/default.nix b/pkgs/development/compilers/ghc/6.6.1.nix similarity index 100% rename from pkgs/development/compilers/ghc-6.6.1/default.nix rename to pkgs/development/compilers/ghc/6.6.1.nix diff --git a/pkgs/development/compilers/ghc-6.8/ghc-6.8.2.nix b/pkgs/development/compilers/ghc/6.8.2.nix similarity index 100% rename from pkgs/development/compilers/ghc-6.8/ghc-6.8.2.nix rename to pkgs/development/compilers/ghc/6.8.2.nix diff --git a/pkgs/development/compilers/ghc-6.8/ghc-6.8.3.nix b/pkgs/development/compilers/ghc/6.8.3.nix similarity index 100% rename from pkgs/development/compilers/ghc-6.8/ghc-6.8.3.nix rename to pkgs/development/compilers/ghc/6.8.3.nix diff --git a/pkgs/development/compilers/ghc-6.8/setup-hook.sh b/pkgs/development/compilers/ghc/setup-hook.sh similarity index 100% rename from pkgs/development/compilers/ghc-6.8/setup-hook.sh rename to pkgs/development/compilers/ghc/setup-hook.sh diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c1897e99d42..25d7dc0c597 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1833,23 +1833,23 @@ let ghc = ghc683; - ghc682 = import ../development/compilers/ghc-6.8/ghc-6.8.2.nix { + ghc682 = import ../development/compilers/ghc/6.8.2.nix { inherit fetchurl stdenv readline perl gmp ncurses m4; ghc = ghcboot; }; - ghc683 = import ../development/compilers/ghc-6.8/ghc-6.8.3.nix { + ghc683 = import ../development/compilers/ghc/6.8.3.nix { inherit fetchurl stdenv readline perl gmp ncurses m4; ghc = ghcboot; haddock = haddockboot; }; - ghc661 = import ../development/compilers/ghc-6.6.1 { + ghc661 = import ../development/compilers/ghc/6.6.1.nix { inherit fetchurl stdenv readline perl58 gmp ncurses m4; ghc = ghcboot; }; - ghc64 = import ../development/compilers/ghc { + ghc64 = import ../development/compilers/ghc/6.4.2.nix { inherit fetchurl stdenv perl ncurses readline m4 gmp; gcc = stdenv.gcc; ghc = ghcboot; From 405f746280c791a9ddf7de40be8f983a5ec21356 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 18:21:03 +0000 Subject: [PATCH 08/38] * More GHC cleanup. svn path=/nixpkgs/trunk/; revision=15093 --- pkgs/development/compilers/ghc/6.4.2.nix | 16 +++++++++++++--- pkgs/development/compilers/ghc/builder.sh | 9 --------- pkgs/top-level/all-packages.nix | 1 - 3 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 pkgs/development/compilers/ghc/builder.sh diff --git a/pkgs/development/compilers/ghc/6.4.2.nix b/pkgs/development/compilers/ghc/6.4.2.nix index c175f242ff1..9fccf5307c5 100644 --- a/pkgs/development/compilers/ghc/6.4.2.nix +++ b/pkgs/development/compilers/ghc/6.4.2.nix @@ -1,15 +1,25 @@ -{stdenv, gcc, fetchurl, perl, ghc, m4, readline, ncurses, gmp}: +{stdenv, fetchurl, perl, ghc, m4, readline, ncurses, gmp}: stdenv.mkDerivation { name = "ghc-6.4.2"; + src = fetchurl { url = http://www.haskell.org/ghc/dist/6.4.2/ghc-6.4.2-src.tar.bz2; md5 = "a394bf14e94c3bca5507d568fcc03375"; }; + buildInputs = [perl ghc m4]; + propagatedBuildInputs = [readline ncurses gmp]; - builder = ./builder.sh; - inherit gcc; + + configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc"; + + preConfigure = + '' + # Don't you hate build processes that write in $HOME? :-( + export HOME=$(pwd)/fake-home + mkdir -p $HOME + ''; meta = { description = "The Glasgow Haskell Compiler"; diff --git a/pkgs/development/compilers/ghc/builder.sh b/pkgs/development/compilers/ghc/builder.sh deleted file mode 100644 index 5d05417a7e8..00000000000 --- a/pkgs/development/compilers/ghc/builder.sh +++ /dev/null @@ -1,9 +0,0 @@ -source $stdenv/setup - -configureFlags="--with-gcc=$gcc/bin/gcc" - -# Don't you hate build processes that write in $HOME? :-( -export HOME=$(pwd)/fake-home -mkdir -p $HOME - -genericBuild diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25d7dc0c597..7378f2741ae 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1851,7 +1851,6 @@ let ghc64 = import ../development/compilers/ghc/6.4.2.nix { inherit fetchurl stdenv perl ncurses readline m4 gmp; - gcc = stdenv.gcc; ghc = ghcboot; }; From d182df55264c14860f52b496f9ba820240c18a2a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 18:38:41 +0000 Subject: [PATCH 09/38] * Disable the GHC setup hook. It's kind of annoying to have to rebuild all of GHC every time the setup hook changes. Thus its better to factor it out. (After all, the setup hook doesn't have to be provided by the GHC package proper; it can also be provided by some helper package.) svn path=/nixpkgs/trunk/; revision=15094 --- pkgs/development/compilers/ghc/6.6.1.nix | 2 -- pkgs/development/compilers/ghc/6.8.2.nix | 5 ----- pkgs/development/compilers/ghc/6.8.3.nix | 5 ----- 3 files changed, 12 deletions(-) diff --git a/pkgs/development/compilers/ghc/6.6.1.nix b/pkgs/development/compilers/ghc/6.6.1.nix index 841306578eb..b8be216c8dc 100644 --- a/pkgs/development/compilers/ghc/6.6.1.nix +++ b/pkgs/development/compilers/ghc/6.6.1.nix @@ -14,8 +14,6 @@ stdenv.mkDerivation (rec { buildInputs = [ghc readline perl58 m4 gmp]; - setupHook = ./setup-hook.sh; - meta = { description = "The Glasgow Haskell Compiler"; }; diff --git a/pkgs/development/compilers/ghc/6.8.2.nix b/pkgs/development/compilers/ghc/6.8.2.nix index 9b78a979a96..2bcd88dc2fe 100644 --- a/pkgs/development/compilers/ghc/6.8.2.nix +++ b/pkgs/development/compilers/ghc/6.8.2.nix @@ -16,11 +16,6 @@ stdenv.mkDerivation (rec { buildInputs = [ghc readline perl m4 gmp]; - # The setup hook is executed by other packages building with ghc. - # It then looks for package configurations that are available and - # build a package database on the fly. - setupHook = ./setup-hook.sh; - meta = { description = "The Glasgow Haskell Compiler"; }; diff --git a/pkgs/development/compilers/ghc/6.8.3.nix b/pkgs/development/compilers/ghc/6.8.3.nix index 98ddca5b36d..07369ddc6f5 100644 --- a/pkgs/development/compilers/ghc/6.8.3.nix +++ b/pkgs/development/compilers/ghc/6.8.3.nix @@ -15,11 +15,6 @@ stdenv.mkDerivation (rec { buildInputs = [ghc readline perl m4 gmp haddock]; - # The setup hook is executed by other packages building with ghc. - # It then looks for package configurations that are available and - # build a package database on the fly. - setupHook = ./setup-hook.sh; - meta = { description = "The Glasgow Haskell Compiler"; }; From 79cb8d11a65b3318f8c5ece4fbdface72fe09129 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 19:25:22 +0000 Subject: [PATCH 10/38] * editline: renamed to libedit (which seems to be the proper name for the package). * Removed the old ghc-wrapper, which hasn't been used for a long time. * Renamed the "boot" GHC to "binary", which is more descriptive. (They *can* be used for other things than bootstrapping a GHC source build.) * Updated the GHC 6.10.1 binary to 6.10.2. svn path=/nixpkgs/trunk/; revision=15095 --- .../compilers/ghc-wrapper/builder.sh | 34 -------- .../compilers/ghc-wrapper/default.nix | 7 -- .../ghc/{boot610.nix => 6.10.2-binary.nix} | 84 +++++++++---------- .../ghc/{boot.nix => 6.4.2-binary.nix} | 15 ++-- pkgs/development/compilers/ghc/6.8.2.nix | 5 +- pkgs/development/compilers/ghc/6.8.3.nix | 5 +- pkgs/development/interpreters/io/default.nix | 2 +- .../libraries/editline/default.nix | 10 --- .../libraries/haskell/editline/default.nix | 4 +- .../development/libraries/libedit/default.nix | 17 ++++ pkgs/top-level/all-packages.nix | 54 ++++++------ 11 files changed, 98 insertions(+), 139 deletions(-) delete mode 100644 pkgs/development/compilers/ghc-wrapper/builder.sh delete mode 100644 pkgs/development/compilers/ghc-wrapper/default.nix rename pkgs/development/compilers/ghc/{boot610.nix => 6.10.2-binary.nix} (51%) rename pkgs/development/compilers/ghc/{boot.nix => 6.4.2-binary.nix} (78%) delete mode 100644 pkgs/development/libraries/editline/default.nix create mode 100644 pkgs/development/libraries/libedit/default.nix diff --git a/pkgs/development/compilers/ghc-wrapper/builder.sh b/pkgs/development/compilers/ghc-wrapper/builder.sh deleted file mode 100644 index 9851f9b2b1b..00000000000 --- a/pkgs/development/compilers/ghc-wrapper/builder.sh +++ /dev/null @@ -1,34 +0,0 @@ -source $stdenv/setup - -export HOME=$(pwd)/fake-home - -makeWrapper() { - wrapperBase="$1" - wrapperName="$2" - wrapper="$out/$wrapperName" - shift; shift #the other arguments are passed to the source app - echo '#!'"$SHELL" > "$wrapper" - echo "exec \"$wrapperBase/$wrapperName\" $@" '"$@"' > "$wrapper" - chmod +x "$wrapper" -} - -mkdir -p $out/nix-support $out/bin -packages_db=$out/nix-support/package.conf - -#create packages database (start with compiler base packages) -cp $ghc/lib/ghc-*/package.conf $packages_db -chmod +w $packages_db -for lib in $libraries; do - sh $lib/nix-support/register.sh $packages_db || exit 1 -done -rm -f $packages_db.old - -#create the wrappers -#NB: The double dash for ghc-pkg is not a typo! -makeWrapper $ghc "bin/ghc" "-package-conf" $packages_db -makeWrapper $ghc "bin/ghci" "-package-conf" $packages_db -makeWrapper $ghc "bin/runghc" "-package-conf" $packages_db -makeWrapper $ghc "bin/runhaskell" "-package-conf" $packages_db -makeWrapper $ghc "bin/ghc-pkg" "--global-conf" $packages_db - -# todo: link all other binaries of ghc diff --git a/pkgs/development/compilers/ghc-wrapper/default.nix b/pkgs/development/compilers/ghc-wrapper/default.nix deleted file mode 100644 index 8c35db926b6..00000000000 --- a/pkgs/development/compilers/ghc-wrapper/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{stdenv, ghc, libraries}: - -stdenv.mkDerivation { - inherit (ghc) name meta; - inherit ghc libraries; - builder = ./builder.sh; -} diff --git a/pkgs/development/compilers/ghc/boot610.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix similarity index 51% rename from pkgs/development/compilers/ghc/boot610.nix rename to pkgs/development/compilers/ghc/6.10.2-binary.nix index 7cfafaa13e8..0806c5b3dc9 100644 --- a/pkgs/development/compilers/ghc/boot610.nix +++ b/pkgs/development/compilers/ghc/6.10.2-binary.nix @@ -1,22 +1,22 @@ -{stdenv, fetchurl, perl, editline, ncurses, gmp, makeWrapper}: +{stdenv, fetchurl, perl, libedit, ncurses, gmp, makeWrapper}: stdenv.mkDerivation rec { - version = "6.10.1"; + version = "6.10.2-binary"; name = "ghc-${version}"; src = if stdenv.system == "i686-linux" then fetchurl { - # libedit .so.0 + # This binary requires libedit.so.0 (rather than libedit.so.2). url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2"; - sha256 = "18l0vwlf7y86s65klpdvz4ccp8kydvcmyh03c86hld8jvx16q7zz"; + sha256 = "1fw0zr2qshlpk8s0d16k27zcv5263nqdg2xds5ymw8ff6qz9rz9b"; } else if stdenv.system == "x86_64-linux" then fetchurl { - # libedit .so.0 + # Idem. url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2"; - sha256 = "14jvvn333i36wm7mmvi47jr93f5hxrw1h2dpjvqql0rp00svhzzg"; + sha256 = "1rd2j7lmcfsm2rdfb5g6q0l8dz3sxadk5m3d2f69d4a6g4p4h7jj"; } else if stdenv.system == "i686-darwin" then fetchurl { @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { (if stdenv.isLinux then '' find . -type f -perm +100 \ -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ - --set-rpath "${editline}/lib:${ncurses}/lib:${gmp}/lib" {} \; + --set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \; for prog in ld ar gcc strip ranlib; do find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \; done @@ -61,46 +61,46 @@ stdenv.mkDerivation rec { # No building is necessary, but calling make without flags ironically # calls install-strip ... - buildPhase = ":"; + buildPhase = "true"; # The binaries for Darwin use frameworks, so fake those frameworks, # and create some wrapper scripts that set DYLD_FRAMEWORK_PATH so # that the executables work with no special setup. - postInstall = (if stdenv.isDarwin then " + postInstall = + (if stdenv.isDarwin then + '' + ensureDir $out/frameworks/GMP.framework/Versions/A + ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/GMP + ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/Versions/A/GMP + # !!! fix this + ensureDir $out/frameworks/GNUeditline.framework/Versions/A + ln -s ${libedit}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/GNUeditline + ln -s ${libedit}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/Versions/A/GNUeditline - ensureDir $out/frameworks/GMP.framework/Versions/A - ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/GMP - ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/Versions/A/GMP - ensureDir $out/frameworks/GNUeditline.framework/Versions/A - ln -s ${editline}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/GNUeditline - ln -s ${editline}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/Versions/A/GNUeditline + mv $out/bin $out/bin-orig + mkdir $out/bin + for i in $(cd $out/bin-orig && ls); do + echo \"#! $SHELL -e\" >> $out/bin/$i + echo \"DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i -framework-path $out/frameworks \\\"\\$@\\\"\" >> $out/bin/$i + chmod +x $out/bin/$i + done + '' else "") + + + '' + # bah, the passing gmp doesn't work, so let's add it to the final package.conf in a quick but dirty way + sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp}/lib\",\2@" $out/lib/ghc-${version}/package.conf - mv $out/bin $out/bin-orig - mkdir $out/bin - for i in $(cd $out/bin-orig && ls); do - echo \"#! $SHELL -e\" >> $out/bin/$i - echo \"DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i -framework-path $out/frameworks \\\"\\$@\\\"\" >> $out/bin/$i - chmod +x $out/bin/$i - done - - " else "") - + - '' - # bah, the passing gmp doesn't work, so let's add it to the final package.conf in a quick but dirty way - sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp}/lib\",\2@" $out/lib/ghc-${version}/package.conf - - wrapProgram $out/bin/ghc --set LDPATH "${gmp}/lib" - # sanity check, can ghc create executables? - cd $TMP - mkdir test-ghc; cd test-ghc - cat > main.hs << EOF - module Main where - main = putStrLn "yes" - EOF - $out/bin/ghc --make main.hs - echo compilation ok - [ $(./main) == "yes" ] - '' - ; + wrapProgram $out/bin/ghc --set LDPATH "${gmp}/lib" + # sanity check, can ghc create executables? + cd $TMP + mkdir test-ghc; cd test-ghc + cat > main.hs << EOF + module Main where + main = putStrLn "yes" + EOF + $out/bin/ghc --make main.hs + echo compilation ok + [ $(./main) == "yes" ] + ''; } diff --git a/pkgs/development/compilers/ghc/boot.nix b/pkgs/development/compilers/ghc/6.4.2-binary.nix similarity index 78% rename from pkgs/development/compilers/ghc/boot.nix rename to pkgs/development/compilers/ghc/6.4.2-binary.nix index 60664374b8e..31777244521 100644 --- a/pkgs/development/compilers/ghc/boot.nix +++ b/pkgs/development/compilers/ghc/6.4.2-binary.nix @@ -1,7 +1,7 @@ {stdenv, fetchurl, perl, readline, ncurses, gmp}: stdenv.mkDerivation { - name = if stdenv.system == "i686-darwin" then "ghc-6.6.1" else "ghc-6.4.2"; + name = if stdenv.system == "i686-darwin" then "ghc-6.6.1-binary" else "ghc-6.4.2-binary"; src = if stdenv.system == "i686-linux" then @@ -15,6 +15,9 @@ stdenv.mkDerivation { md5 = "8f5fe48798f715cd05214a10987bf6d5"; } else if stdenv.system == "i686-darwin" then + /* Yes, this isn't GHC 6.4.2. But IIRC either there was no + 6.4.2 binary for Darwin, or it didn't work. In any case, in + Nixpkgs we just need this bootstrapping a "real" GHC. */ fetchurl { url = http://www.haskell.org/ghc/dist/6.6.1/ghc-6.6.1-i386-apple-darwin.tar.bz2; sha256 = "1drbsicanr6jlykvs4vs6gbi2q9ac1bcaxz2vzwh3pfv3lfibwia"; @@ -38,7 +41,7 @@ stdenv.mkDerivation { # The binaries for Darwin use frameworks, so fake those frameworks, # and create some wrapper scripts that set DYLD_FRAMEWORK_PATH so # that the executables work with no special setup. - postInstall = if stdenv.isDarwin then " + postInstall = if stdenv.isDarwin then '' ensureDir $out/frameworks/GMP.framework/Versions/A ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/GMP @@ -50,13 +53,13 @@ stdenv.mkDerivation { mkdir $out/bin-orig for i in $(cd $out/bin && ls *); do mv $out/bin/$i $out/bin-orig/$i - echo \"#! $SHELL -e\" >> $out/bin/$i + echo "#! $SHELL -e" >> $out/bin/$i extraFlag= - if test $i != ghc-pkg; then extraFlag=\"-framework-path $out/frameworks\"; fi - echo \"DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i $extraFlag \\\"\\$@\\\"\" >> $out/bin/$i + if test $i != ghc-pkg; then extraFlag="-framework-path $out/frameworks"; fi + echo "DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i $extraFlag \"\$@\"" >> $out/bin/$i chmod +x $out/bin/$i done - " else ""; + '' else ""; } diff --git a/pkgs/development/compilers/ghc/6.8.2.nix b/pkgs/development/compilers/ghc/6.8.2.nix index 2bcd88dc2fe..4015d364b27 100644 --- a/pkgs/development/compilers/ghc/6.8.2.nix +++ b/pkgs/development/compilers/ghc/6.8.2.nix @@ -24,14 +24,11 @@ stdenv.mkDerivation (rec { "--with-gmp-libraries=${gmp}/lib" "--with-gmp-includes=${gmp}/include" "--with-readline-libraries=${readline}/lib" - "--with-gcc=${gcc}/bin/gcc" + "--with-gcc=${stdenv.gcc}/bin/gcc" ]; preConfigure = " # still requires a hack for ncurses sed -i \"s|^\\\(ld-options.*$\\\)|\\\1 -L${ncurses}/lib|\" libraries/readline/readline.buildinfo.in "; - - inherit (stdenv) gcc; - inherit readline gmp ncurses; }) diff --git a/pkgs/development/compilers/ghc/6.8.3.nix b/pkgs/development/compilers/ghc/6.8.3.nix index 07369ddc6f5..d9f3c1760a1 100644 --- a/pkgs/development/compilers/ghc/6.8.3.nix +++ b/pkgs/development/compilers/ghc/6.8.3.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (rec { "--with-gmp-libraries=${gmp}/lib" "--with-gmp-includes=${gmp}/include" "--with-readline-libraries=${readline}/lib" - "--with-gcc=${gcc}/bin/gcc" + "--with-gcc=${stdenv.gcc}/bin/gcc" ]; preConfigure = '' @@ -34,7 +34,4 @@ stdenv.mkDerivation (rec { ''; installTargets = ["install" "install-docs"]; - - inherit (stdenv) gcc; - inherit readline gmp ncurses; }) diff --git a/pkgs/development/interpreters/io/default.nix b/pkgs/development/interpreters/io/default.nix index 4d737fe7065..2ba7c5fb697 100644 --- a/pkgs/development/interpreters/io/default.nix +++ b/pkgs/development/interpreters/io/default.nix @@ -9,7 +9,7 @@ let buildInputs = with args; [ zlib sqlite gmp libffi cairo ncurses freetype mesa libpng libtiff libjpeg readline libsndfile libxml2 - freeglut e2fsprogs libsamplerate pcre libevent editline + freeglut e2fsprogs libsamplerate pcre libevent libedit ]; in rec { diff --git a/pkgs/development/libraries/editline/default.nix b/pkgs/development/libraries/editline/default.nix deleted file mode 100644 index ef1ade22289..00000000000 --- a/pkgs/development/libraries/editline/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ stdenv, fetchurl, ncurses }: - -stdenv.mkDerivation { - name = "editline-2.11"; - src = fetchurl { - url = http://www.thrysoee.dk/editline/libedit-20080712-2.11.tar.gz; - sha256 = "6ff51a15d1ada16c44be0f32a539b492cd3b0286c3dfa413915525f55851d1e6"; - }; - propagatedBuildInputs = [ ncurses ]; -} diff --git a/pkgs/development/libraries/haskell/editline/default.nix b/pkgs/development/libraries/haskell/editline/default.nix index 58c700921aa..f3dfa9f6655 100644 --- a/pkgs/development/libraries/haskell/editline/default.nix +++ b/pkgs/development/libraries/haskell/editline/default.nix @@ -1,10 +1,10 @@ -{ cabal, editline } : +{ cabal, libedit } : cabal.mkDerivation (self : { pname = "editline"; version = "0.2"; sha256 = "6ee0b553cc8d7542c096730ceebabdcb9b2951d7b00a5a0ddbf47b5436a77ce4"; - propagatedBuildInputs = [ editline ]; + propagatedBuildInputs = [ libedit ]; patchLibFiles = [ "editline.buildinfo.in" ]; preConfigure = '' sed -i -e '/el_get/d' include/HsEditline.h diff --git a/pkgs/development/libraries/libedit/default.nix b/pkgs/development/libraries/libedit/default.nix new file mode 100644 index 00000000000..622d6e21c97 --- /dev/null +++ b/pkgs/development/libraries/libedit/default.nix @@ -0,0 +1,17 @@ +{ stdenv, fetchurl, ncurses }: + +stdenv.mkDerivation { + name = "libedit-20090405-3.0"; + + src = fetchurl { + url = http://www.thrysoee.dk/editline/libedit-20090405-3.0.tar.gz; + sha256 = "1il68apydk6nnm30v8gn61vbi23ii571bixp7662j96xsivy7z5l"; + }; + + propagatedBuildInputs = [ ncurses ]; + + meta = { + homepage = "http://www.thrysoee.dk/editline/"; + description = "A port of the NetBSD Editline library (libedit)"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7378f2741ae..2e0826fb62a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1705,7 +1705,8 @@ let ghcsAndLibs = assert builtins ? listToAttrs; recurseIntoAttrs (import ../development/compilers/ghcs { - inherit ghcboot fetchurl stdenv recurseIntoAttrs perl gnum4 gmp readline lib; + ghcboot = ghc642Binary; + inherit fetchurl stdenv recurseIntoAttrs perl gnum4 gmp readline lib; inherit ghcPkgUtil ctags autoconf automake getConfig; inherit (ghc68executables) hasktags; inherit (bleedingEdgeRepos) sourceByName; @@ -1835,36 +1836,42 @@ let ghc682 = import ../development/compilers/ghc/6.8.2.nix { inherit fetchurl stdenv readline perl gmp ncurses m4; - ghc = ghcboot; + ghc = ghc642Binary; }; ghc683 = import ../development/compilers/ghc/6.8.3.nix { inherit fetchurl stdenv readline perl gmp ncurses m4; - ghc = ghcboot; - haddock = haddockboot; + ghc = ghc642Binary; + haddock = import ../development/tools/documentation/haddock/boot.nix { + inherit gmp; + cabal = import ../development/libraries/haskell/cabal/cabal.nix { + inherit stdenv fetchurl; + ghc = ghc642Binary; + }; + }; }; ghc661 = import ../development/compilers/ghc/6.6.1.nix { inherit fetchurl stdenv readline perl58 gmp ncurses m4; - ghc = ghcboot; + ghc = ghc642Binary; }; - ghc64 = import ../development/compilers/ghc/6.4.2.nix { + ghc642 = import ../development/compilers/ghc/6.4.2.nix { inherit fetchurl stdenv perl ncurses readline m4 gmp; - ghc = ghcboot; + ghc = ghc642Binary; }; - ghcboot = lowPrio (appendToName "boot" (import ../development/compilers/ghc/boot.nix { + ghc642Binary = lowPrio (import ../development/compilers/ghc/6.4.2-binary.nix { inherit fetchurl stdenv ncurses gmp; readline = if stdenv.system == "i686-linux" then readline4 else readline; perl = perl58; - })); + }); - ghcboot610 = lowPrio (appendToName "boot" (import ../development/compilers/ghc/boot610.nix { - inherit fetchurl stdenv ncurses gmp editline makeWrapper; + ghc6103Binary = lowPrio (import ../development/compilers/ghc/6.10.2-binary.nix { + inherit fetchurl stdenv ncurses gmp libedit makeWrapper; # readline = if stdenv.system == "i686-linux" then readline4 else readline; perl = perl58; - })); + }); gprolog = import ../development/compilers/gprolog { inherit fetchurl stdenv; @@ -2103,7 +2110,7 @@ let io = builderDefsPackage (import ../development/interpreters/io) { inherit sqlite zlib gmp libffi cairo ncurses freetype mesa libpng libtiff libjpeg readline libsndfile libxml2 - freeglut e2fsprogs libsamplerate pcre libevent editline; + freeglut e2fsprogs libsamplerate pcre libevent libedit; }; kaffe = import ../development/interpreters/kaffe { @@ -2497,12 +2504,6 @@ let inherit fetchurl stdenv; }; - # used to bootstrap ghc with - haddockboot = lowPrio (appendToName "boot" (import ../development/tools/documentation/haddock/boot.nix { - inherit gmp; - cabal = cabalboot; - })); - # old version of haddock, still more stable than 2.0 haddock09 = import ../development/tools/documentation/haddock/haddock-0.9.nix { inherit cabal; @@ -2915,10 +2916,6 @@ let inherit fetchurl stdenv perl; }; - editline = import ../development/libraries/editline { - inherit fetchurl stdenv ncurses; - }; - enchant = selectVersion ../development/libraries/enchant "1.3.0" { inherit fetchurl stdenv aspell pkgconfig; inherit (gnome) glib; @@ -3396,6 +3393,10 @@ let inherit fetchurl stdenv libdvdcss; }; + libedit = import ../development/libraries/libedit { + inherit fetchurl stdenv ncurses; + }; + libevent = import ../development/libraries/libevent { inherit fetchurl stdenv; }; @@ -4195,11 +4196,6 @@ let ghc = ghc683; }; - cabalboot = import ../development/libraries/haskell/cabal/cabal.nix { - inherit stdenv fetchurl; - ghc = ghcboot; - }; - cabal = cabal683; Crypto = import ../development/libraries/haskell/Crypto { @@ -4224,7 +4220,7 @@ let }; haskellEditline = import ../development/libraries/haskell/editline { - inherit cabal editline; + inherit cabal libedit; }; HDBC = import ../development/libraries/haskell/HDBC/HDBC-1.1.4.nix { From 7bb9c71aee6bdf3e02c43fe8b9b4ba8dbce92edd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 19:27:14 +0000 Subject: [PATCH 11/38] * Doh. svn path=/nixpkgs/trunk/; revision=15096 --- pkgs/development/compilers/ghc/6.10.2-binary.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ghc/6.10.2-binary.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix index 0806c5b3dc9..a6d60d9953b 100644 --- a/pkgs/development/compilers/ghc/6.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/6.10.2-binary.nix @@ -1,9 +1,9 @@ {stdenv, fetchurl, perl, libedit, ncurses, gmp, makeWrapper}: stdenv.mkDerivation rec { - version = "6.10.2-binary"; + version = "6.10.2"; - name = "ghc-${version}"; + name = "ghc-${version}-binary"; src = if stdenv.system == "i686-linux" then From 69e566d98333458c96dd97649d37e714b95fdca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 16 Apr 2009 19:28:30 +0000 Subject: [PATCH 12/38] Fixing and updating openal, about rpaths and cmake. svn path=/nixpkgs/trunk/; revision=15097 --- pkgs/development/libraries/openal/default.nix | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/openal/default.nix b/pkgs/development/libraries/openal/default.nix index 170cb521047..40d9584742c 100644 --- a/pkgs/development/libraries/openal/default.nix +++ b/pkgs/development/libraries/openal/default.nix @@ -1,19 +1,35 @@ { stdenv, fetchurl, alsaLib, cmake }: -let version = "1.5.304"; in +let version = "1.7.411"; in stdenv.mkDerivation rec { name = "openal-${version}"; src = fetchurl { - url = "http://connect.creativelabs.com/openal/Downloads/openal-soft-${version}.tar.bz2"; - sha256 = "0k26ycprmpynvfkqkqsbaahl6avn033z2c03sp21vhpqbyms50ks"; + url = "http://connect.creativelabs.com/openal/Downloads/openal-soft-${version}.bz2"; + sha256 = "1nbqvg08hy5p2cxy2i2mmh2szmbpsg2dcvhr61iplyisw04rwc8i"; + name = "openal-soft-${version}.tar.bz2"; }; - # FIXME: The `$out/bin/openal-info' executable doesn't have the - # right RPATH, so it can't find `libopenal.so'. This must be fixed - # by tweaking the CMake crap. buildInputs = [ cmake alsaLib ]; + cmakeFlags = "-DCMAKE_SHARED_LINKER_FLAGS=\"-Wl,-rpath,$out/lib/\"" + + " -DCMAKE_EXE_LINKER_FLAGS=\"-Wl,-rpath,$out/lib\"" + + " -DCMAKE_SKIP_BUILD_RPATH=ON" + + " -DCMAKE_BUILD_TYPE=Release" + + " -DCMAKE_INSTALL_PREFIX=$out"; + + dontUseCmakeConfigure = true; + + # I rewrote the configure phase to get the $out references evaluated in + # cmakeFlags + configurePhase = '' + set -x + mkdir -p build; + cd build + eval -- "cmake .. $cmakeFlags" + set +x + ''; + meta = { description = "OpenAL, a cross-platform 3D audio API"; From 1ce494d81d9e49ae5bb8c7b798a62831a5702d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 16 Apr 2009 19:28:42 +0000 Subject: [PATCH 13/38] Adding elvis, although I can't see the characters in an xterm with black background svn path=/nixpkgs/trunk/; revision=15098 --- pkgs/applications/editors/elvis/default.nix | 40 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 44 insertions(+) create mode 100644 pkgs/applications/editors/elvis/default.nix diff --git a/pkgs/applications/editors/elvis/default.nix b/pkgs/applications/editors/elvis/default.nix new file mode 100644 index 00000000000..511e284ed39 --- /dev/null +++ b/pkgs/applications/editors/elvis/default.nix @@ -0,0 +1,40 @@ +{ fetchurl, stdenv, ncurses }: + +stdenv.mkDerivation rec { + name = "elvis-2.2_0"; + + src = fetchurl { + url = ftp://ftp.cs.pdx.edu/pub/elvis/elvis-2.2_0.tar.gz; + sha256 = "182fj9qzyq6cjq1r849gpam6nq9smwv9f9xwaq84961p56r6d14s"; + }; + + buildInputs = [ ncurses ]; + + patchPhase = '' + sed -i s/-lcurses/-lncurses/ configure + ''; + + preConfigure = '' + ensureDir $out/share/man/man1 + ''; + + installPhase = '' + ensureDir $out/bin $out/share/elvis $out/share/elvis/doc + cp elvis ref elvtags elvfmt $out/bin + cp -R data/* $out/share/elvis + cp doc/* $out/share/elvis/doc + + ensureDir $out/share/man/man1 + for a in doc/*.man; do + cp $a $out/share/man/man1/`basename $a .man`.1 + done + ''; + + configureFlags = "--ioctl=termios"; + + meta = { + homepage = http://elvis.vi-editor.org/; + description = "A vi clone for Unix and other operating systems"; + license = "free"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2e0826fb62a..89a932b398f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8124,6 +8124,10 @@ let guile bzip2; }; + elvis = import ../applications/editors/elvis { + inherit fetchurl stdenv ncurses; + }; + emacs = emacs22; emacs21 = import ../applications/editors/emacs-21 { From 4cb42e96476007c2b69181c75c84e4ba5653dc50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 16 Apr 2009 19:28:57 +0000 Subject: [PATCH 14/38] Adding nvi, another small vi clone. svn path=/nixpkgs/trunk/; revision=15099 --- pkgs/applications/editors/nvi/default.nix | 45 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 49 insertions(+) create mode 100644 pkgs/applications/editors/nvi/default.nix diff --git a/pkgs/applications/editors/nvi/default.nix b/pkgs/applications/editors/nvi/default.nix new file mode 100644 index 00000000000..d08e44699c4 --- /dev/null +++ b/pkgs/applications/editors/nvi/default.nix @@ -0,0 +1,45 @@ +{ fetchurl, stdenv, ncurses }: + +stdenv.mkDerivation rec { + name = "nvi-1.79"; + + src = fetchurl { + url = ftp://ftp.bostic.com/pub/nvi-1.79.tar.gz; + sha256 = "0cvf56rbylz7ksny6g2256sjg8yrsxrmbpk82r64rhi53sm8fnvm"; + }; + + buildInputs = [ ncurses ]; + + patchPhase = '' + sed -i s/-lcurses/-lncurses/ build/configure + ''; + + configurePhase = '' + mkdir mybuild + cd mybuild + ../build/configure --prefix=$out --disable-curses + ''; + + installPhase = '' + ensureDir $out/bin $out/share/vi/catalog + for a in dutch english french german ru_SU.KOI8-R spanish swedish; do + cp ../catalog/$a $out/share/vi/catalog + done + cp nvi $out/bin/nvi + ln -s $out/bin/nvi $out/bin/vi + ln -s $out/bin/nvi $out/bin/ex + ln -s $out/bin/nvi $out/bin/view + + ensureDir $out/share/man/man1 + cp ../docs/USD.doc/vi.man/vi.1 $out/share/man/man1/nvi.1 + ln -s $out/share/man/man1/nvi.1 $out/share/man/man1/vi + ln -s $out/share/man/man1/nvi.1 $out/share/man/man1/ex + ln -s $out/share/man/man1/nvi.1 $out/share/man/man1/view + ''; + + meta = { + homepage = http://www.bostic.com/vi/; + description = "The Berkeley Vi Editor"; + license = "free"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 89a932b398f..38c1a14b576 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8668,6 +8668,10 @@ let motif = lesstif; }; + nvi = import ../applications/editors/nvi { + inherit fetchurl stdenv ncurses; + }; + nxml = import ../applications/editors/emacs-modes/nxml { inherit fetchurl stdenv; }; From 902cf75ca6dfe20aca859b0bf354719de3e059b3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 19:48:11 +0000 Subject: [PATCH 15/38] * The wrapper to set LDPATH to $gmp/lib no longer seems necessary (but the package.conf fixup is). svn path=/nixpkgs/trunk/; revision=15100 --- pkgs/development/compilers/ghc/6.10.2-binary.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkgs/development/compilers/ghc/6.10.2-binary.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix index a6d60d9953b..8f3b6833fa1 100644 --- a/pkgs/development/compilers/ghc/6.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/6.10.2-binary.nix @@ -18,11 +18,6 @@ stdenv.mkDerivation rec { url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2"; sha256 = "1rd2j7lmcfsm2rdfb5g6q0l8dz3sxadk5m3d2f69d4a6g4p4h7jj"; } - else if stdenv.system == "i686-darwin" then - fetchurl { - # update - # untested - } else throw "cannot bootstrap GHC on this platform"; buildInputs = [perl makeWrapper]; @@ -90,8 +85,7 @@ stdenv.mkDerivation rec { # bah, the passing gmp doesn't work, so let's add it to the final package.conf in a quick but dirty way sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp}/lib\",\2@" $out/lib/ghc-${version}/package.conf - wrapProgram $out/bin/ghc --set LDPATH "${gmp}/lib" - # sanity check, can ghc create executables? + # Sanity check, can ghc create executables? cd $TMP mkdir test-ghc; cd test-ghc cat > main.hs << EOF From dae40d9c62becd77445349ef8b74d4ff0055e5ac Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 19:59:41 +0000 Subject: [PATCH 16/38] * GHC apparently works with Perl 5.10 now. svn path=/nixpkgs/trunk/; revision=15101 --- pkgs/development/compilers/ghc/6.10.2-binary.nix | 4 ++-- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/ghc/6.10.2-binary.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix index 8f3b6833fa1..e00702b8d84 100644 --- a/pkgs/development/compilers/ghc/6.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/6.10.2-binary.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, perl, libedit, ncurses, gmp, makeWrapper}: +{stdenv, fetchurl, perl, libedit, ncurses, gmp}: stdenv.mkDerivation rec { version = "6.10.2"; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { } else throw "cannot bootstrap GHC on this platform"; - buildInputs = [perl makeWrapper]; + buildInputs = [perl]; postUnpack = # Strip is harmful, see also below. It's important that this happens diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 38c1a14b576..8e32139cb42 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1868,9 +1868,7 @@ let }); ghc6103Binary = lowPrio (import ../development/compilers/ghc/6.10.2-binary.nix { - inherit fetchurl stdenv ncurses gmp libedit makeWrapper; - # readline = if stdenv.system == "i686-linux" then readline4 else readline; - perl = perl58; + inherit fetchurl stdenv perl ncurses gmp libedit; }); gprolog = import ../development/compilers/gprolog { From b211399689fd910f280b04bd7b98230251b33e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 16 Apr 2009 20:09:07 +0000 Subject: [PATCH 17/38] Making nvi avoid /var/tmp. svn path=/nixpkgs/trunk/; revision=15102 --- pkgs/applications/editors/nvi/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/nvi/default.nix b/pkgs/applications/editors/nvi/default.nix index d08e44699c4..6f33758ce4f 100644 --- a/pkgs/applications/editors/nvi/default.nix +++ b/pkgs/applications/editors/nvi/default.nix @@ -10,8 +10,12 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses ]; + # nvi tries to write to a usual tmp directory (/var/tmp), + # so we will force it to use /tmp. patchPhase = '' - sed -i s/-lcurses/-lncurses/ build/configure + sed -i -e s/-lcurses/-lncurses/ \ + -e s@vi_cv_path_preserve=no@vi_cv_path_preserve=/tmp/vi.recover@ \ + -e s@/var/tmp@@ build/configure ''; configurePhase = '' From 37c66308e479aa7452a0d7205cabaa08ddad8f22 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Thu, 16 Apr 2009 20:27:01 +0000 Subject: [PATCH 18/38] Upgraded arts to 1.5.10 svn path=/nixpkgs/trunk/; revision=15103 --- pkgs/development/libraries/arts/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/arts/default.nix b/pkgs/development/libraries/arts/default.nix index dd47f35a138..32b39711944 100644 --- a/pkgs/development/libraries/arts/default.nix +++ b/pkgs/development/libraries/arts/default.nix @@ -1,7 +1,7 @@ {stdenv, fetchurl, pkgconfig, glib, kdelibs, libX11, libXext, zlib, libjpeg, libpng, perl, qt}: stdenv.mkDerivation { - name = "arts-1.5.4"; + name = "arts-1.5.10"; KDEDIR = kdelibs; configureFlags = " @@ -11,8 +11,8 @@ stdenv.mkDerivation { --x-libraries=${libX11}/lib"; src = fetchurl { - url = http://nixos.org/tarballs/arts-1.5.4.tar.bz2; - md5 = "886ba4a13dc0da312d94c09f50c3ffe6"; + url = mirror://kde/stable/3.5.10/src/arts-1.5.10.tar.bz2; + md5 = "6da172aab2a4a44929b5fdfc30fa3efc"; }; buildInputs = [pkgconfig glib kdelibs libX11 libXext zlib libjpeg libpng perl qt]; From 59db4694f2d3bc508855eadcd7b242517033be7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 16 Apr 2009 21:48:36 +0000 Subject: [PATCH 19/38] Add Nevow, a webby Python thingie. svn path=/nixpkgs/trunk/; revision=15104 --- .../python-modules/nevow/default.nix | 80 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 + 2 files changed, 84 insertions(+) create mode 100644 pkgs/development/python-modules/nevow/default.nix diff --git a/pkgs/development/python-modules/nevow/default.nix b/pkgs/development/python-modules/nevow/default.nix new file mode 100644 index 00000000000..2c971b4a86a --- /dev/null +++ b/pkgs/development/python-modules/nevow/default.nix @@ -0,0 +1,80 @@ +{ fetchurl, stdenv, python, setuptools, twisted, makeWrapper, lib }: + +stdenv.mkDerivation rec { + name = "nevow-0.9.33"; + + src = fetchurl { + url = "http://divmod.org/trac/attachment/wiki/SoftwareReleases/Nevow-0.9.33.tar.gz?format=raw"; + sha256 = "1b6zhfxx247b60n1qi2hrawhiaah88v8igg37pf7rjkmvy2z1c6c"; + name = "${name}.tar.gz"; + }; + + buildInputs = [ python makeWrapper ]; + propagatedBuildInputs = [ setuptools twisted ]; + + doCheck = true; + + buildPhase = "python setup.py build --build-base $out"; + checkPhase = "python runtests"; + + installPhase = '' + ensureDir "$out/lib/python2.5/site-packages" + + PYTHONPATH="$out/lib/python2.5/site-packages:$PYTHONPATH" \ + python setup.py install --prefix="$out" + + ensureDir "$out/doc/${name}" + cp -rv "doc/"* "$out/doc/${name}" + + ${postInstall} + ''; + + /* FIXME: Wrapping programs like this is not enough: + + $ ./result/bin/nit --help + Traceback (most recent call last): + File "/nix/store/p5a9qbdjqcfzqmaya8absvm5279l9wd0-nevow-0.9.33/bin/.wrapped-nit", line 4, in + import pkg_resources + [...] + pkg_resources.DistributionNotFound: Nevow==0.9.33-r17222 + + Ideas welcome. */ + postInstall = '' + for i in "$out/bin/"* + do + wrapProgram "$i" \ + --prefix PYTHONPATH ":" \ + ${lib.concatStringsSep ":" + ([ "$out/lib/python2.5/site-packages/src" ] ++ + (map (path: path + "/lib/python2.5/site-packages") + (propagatedBuildInputs + ++ twisted.propagatedBuildInputs)))} + done + ''; + + meta = { + description = "Nevow, a web application construction kit for Python"; + + longDescription = '' + Nevow - Pronounced as the French "nouveau", or "noo-voh", Nevow + is a web application construction kit written in Python. It is + designed to allow the programmer to express as much of the view + logic as desired in Python, and includes a pure Python XML + expression syntax named stan to facilitate this. However it + also provides rich support for designer-edited templates, using + a very small XML attribute language to provide bi-directional + template manipulation capability. + + Nevow also includes formless, a declarative syntax for + specifying the types of method parameters and exposing these + methods to the web. Forms can be rendered automatically, and + form posts will be validated and input coerced, rendering error + pages if appropriate. Once a form post has validated + successfully, the method will be called with the coerced values. + ''; + + homepage = http://divmod.org/trac/wiki/DivmodNevow; + + license = "BSD-style"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8e32139cb42..73074ad6184 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6377,6 +6377,10 @@ let setuptools = setuptools.passthru.function {inherit python;}; }); + nevow = import ../development/python-modules/nevow { + inherit fetchurl stdenv python setuptools twisted makeWrapper lib; + }; + numeric = import ../development/python-modules/numeric { inherit fetchurl stdenv python; }; From 3e9cbbc1babb92ebf8736197fa851e1d5c8aa6ea Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 21:59:55 +0000 Subject: [PATCH 20/38] * Subversion 1.6.1. svn path=/nixpkgs/trunk/; revision=15105 --- pkgs/applications/version-management/subversion/1.6.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/subversion/1.6.nix b/pkgs/applications/version-management/subversion/1.6.nix index b2ee89232f1..b547c2dd502 100644 --- a/pkgs/applications/version-management/subversion/1.6.nix +++ b/pkgs/applications/version-management/subversion/1.6.nix @@ -20,13 +20,13 @@ assert compressionSupport -> neon.compressionSupport; stdenv.mkDerivation rec { - version = "1.6.0"; + version = "1.6.1"; name = "subversion-${version}"; src = fetchurl { url = "http://subversion.tigris.org/downloads/${name}.tar.bz2"; - sha256 = "d6fb8bf61638580a0ad661edb642c38fbffad2a4c273e3f8631c6cc0da14d0a2"; + sha256 = "1jp6i7vmz0vd1zf4y896f7jzabwv81x8brwzp5kpkrn6wajagm6d"; }; buildInputs = [zlib apr aprutil sqlite] From ad07109bbad859d9d92245ef1b43bb4b612934cd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 22:00:41 +0000 Subject: [PATCH 21/38] * Added GHC 6.10.2. svn path=/nixpkgs/trunk/; revision=15106 --- pkgs/development/compilers/ghc/6.10.2.nix | 28 +++++++++++++++++++++++ pkgs/development/compilers/ghc/6.8.3.nix | 6 ++--- pkgs/top-level/all-packages.nix | 7 +++++- 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/compilers/ghc/6.10.2.nix diff --git a/pkgs/development/compilers/ghc/6.10.2.nix b/pkgs/development/compilers/ghc/6.10.2.nix new file mode 100644 index 00000000000..9420e9fea4a --- /dev/null +++ b/pkgs/development/compilers/ghc/6.10.2.nix @@ -0,0 +1,28 @@ +{stdenv, fetchurl, libedit, ghc, perl, gmp, ncurses}: + +stdenv.mkDerivation rec { + version = "6.10.2"; + + name = "ghc-${version}"; + + homepage = "http://haskell.org/ghc"; + + src = fetchurl { + url = "${homepage}/dist/${version}/${name}-src.tar.bz2"; + sha256 = "0q3wgp8svfl54kpyp55a1kh63cni5vzz811hqjsps84jdg0lg56m"; + }; + + buildInputs = [ghc libedit perl gmp]; + + configureFlags=[ + "--with-gmp-libraries=${gmp}/lib" + "--with-gmp-includes=${gmp}/include" + #"--with-readline-libraries=${readline}/lib" + "--with-gcc=${stdenv.gcc}/bin/gcc" + ]; + + meta = { + inherit homepage; + description = "The Glasgow Haskell Compiler"; + }; +} diff --git a/pkgs/development/compilers/ghc/6.8.3.nix b/pkgs/development/compilers/ghc/6.8.3.nix index d9f3c1760a1..972ded49dc5 100644 --- a/pkgs/development/compilers/ghc/6.8.3.nix +++ b/pkgs/development/compilers/ghc/6.8.3.nix @@ -1,6 +1,6 @@ {stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses, haddock}: -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "ghc-6.8.3"; homepage = "http://www.haskell.org/ghc"; @@ -32,6 +32,4 @@ stdenv.mkDerivation (rec { # build haddock docs echo "HADDOCK_DOCS = YES" >> mk/build.mk ''; - - installTargets = ["install" "install-docs"]; -}) +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 73074ad6184..bf64a4a60ff 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1867,7 +1867,12 @@ let perl = perl58; }); - ghc6103Binary = lowPrio (import ../development/compilers/ghc/6.10.2-binary.nix { + ghc6102 = import ../development/compilers/ghc/6.10.2.nix { + inherit fetchurl stdenv perl ncurses gmp libedit; + ghc = ghc6102Binary; + }; + + ghc6102Binary = lowPrio (import ../development/compilers/ghc/6.10.2-binary.nix { inherit fetchurl stdenv perl ncurses gmp libedit; }); From 0df122b0acdc9cf446fff5d005a29b1a3c312571 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 22:06:33 +0000 Subject: [PATCH 22/38] * Build GHC 6.8 and 6.10 in Hydra. * Make GHC 6.10.2 the default. svn path=/nixpkgs/trunk/; revision=15107 --- pkgs/top-level/all-packages.nix | 34 ++++++++++++++++----------------- pkgs/top-level/release.nix | 3 ++- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bf64a4a60ff..51d128f63b3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1832,13 +1832,29 @@ let inherit ghc; }; - ghc = ghc683; + ghc = ghc6102; + + ghc642 = import ../development/compilers/ghc/6.4.2.nix { + inherit fetchurl stdenv perl ncurses readline m4 gmp; + ghc = ghc642Binary; + }; + + ghc642Binary = lowPrio (import ../development/compilers/ghc/6.4.2-binary.nix { + inherit fetchurl stdenv ncurses gmp; + readline = if stdenv.system == "i686-linux" then readline4 else readline; + perl = perl58; + }); ghc682 = import ../development/compilers/ghc/6.8.2.nix { inherit fetchurl stdenv readline perl gmp ncurses m4; ghc = ghc642Binary; }; + ghc661 = import ../development/compilers/ghc/6.6.1.nix { + inherit fetchurl stdenv readline perl58 gmp ncurses m4; + ghc = ghc642Binary; + }; + ghc683 = import ../development/compilers/ghc/6.8.3.nix { inherit fetchurl stdenv readline perl gmp ncurses m4; ghc = ghc642Binary; @@ -1851,22 +1867,6 @@ let }; }; - ghc661 = import ../development/compilers/ghc/6.6.1.nix { - inherit fetchurl stdenv readline perl58 gmp ncurses m4; - ghc = ghc642Binary; - }; - - ghc642 = import ../development/compilers/ghc/6.4.2.nix { - inherit fetchurl stdenv perl ncurses readline m4 gmp; - ghc = ghc642Binary; - }; - - ghc642Binary = lowPrio (import ../development/compilers/ghc/6.4.2-binary.nix { - inherit fetchurl stdenv ncurses gmp; - readline = if stdenv.system == "i686-linux" then readline4 else readline; - perl = perl58; - }); - ghc6102 = import ../development/compilers/ghc/6.10.2.nix { inherit fetchurl stdenv perl ncurses gmp libedit; ghc = ghc6102Binary; diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 3fae71484ce..3e0b1387d08 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -121,7 +121,8 @@ in { gcc34 = linux; gcc43multi = ["x86_64-linux"]; gdb = all; - ghc = ghcSupported; + ghc683 = ghcSupported; + ghc6102 = ghcSupported; ghostscript = linux; ghostscriptX = linux; gimp = linux; From a81a4cfd6e5709d452538e8fea2eb1766f38f7c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 16 Apr 2009 22:50:36 +0000 Subject: [PATCH 23/38] Added Scorched3D. svn path=/nixpkgs/trunk/; revision=15108 --- pkgs/games/scorched3d/default.nix | 33 +++++++++++ pkgs/games/scorched3d/file-existence.patch | 37 ++++++++++++ .../scorched3d/scorched3d-42.1-fixups.patch | 58 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 ++ 4 files changed, 133 insertions(+) create mode 100644 pkgs/games/scorched3d/default.nix create mode 100644 pkgs/games/scorched3d/file-existence.patch create mode 100644 pkgs/games/scorched3d/scorched3d-42.1-fixups.patch diff --git a/pkgs/games/scorched3d/default.nix b/pkgs/games/scorched3d/default.nix new file mode 100644 index 00000000000..18a86f2d85c --- /dev/null +++ b/pkgs/games/scorched3d/default.nix @@ -0,0 +1,33 @@ +{stdenv, fetchurl, mesa, openal, autoconf, automake, libtool, freealut, wxGTK, +freetype, fftw, SDL, SDL_net, zlib, libpng, libjpeg} : + +stdenv.mkDerivation { + name = "scorched3d-42.1"; + src = fetchurl { + url = mirror://sourceforge/scorched3d/Scorched3D-42.1-src.tar.gz; + sha256 = "0vhhi68ii5ldxbacsiqccsascrn3q033hnaa1ha8r9gxspzcqkl8"; + }; + + buildInputs = [ mesa openal autoconf automake libtool freealut wxGTK + freetype fftw SDL SDL_net zlib libpng libjpeg ]; + + unpackPhase = "tar xvzf $src ; cd scorched"; + + patches = [ ./scorched3d-42.1-fixups.patch ./file-existence.patch ]; + + preConfigure = '' + set +e + aclocal + libtoolize --copy --force + autoconf + automake + libtoolize + set -e + ''; + + meta = { + homepage = http://scorched3d.co.uk/; + description = "3D Clone of the classic Scorched Earth"; + license = "GPLv2+"; + }; +} diff --git a/pkgs/games/scorched3d/file-existence.patch b/pkgs/games/scorched3d/file-existence.patch new file mode 100644 index 00000000000..35eb63d0702 --- /dev/null +++ b/pkgs/games/scorched3d/file-existence.patch @@ -0,0 +1,37 @@ +diff --git a/src/common/common/DefinesFile.cpp b/src/common/common/DefinesFile.cpp +index 6ad803d..022797a 100644 +--- a/src/common/common/DefinesFile.cpp ++++ b/src/common/common/DefinesFile.cpp +@@ -36,6 +36,17 @@ + #include + #endif + ++namespace { ++ bool fileCanBeStated(const std::string &file) ++ { ++ struct stat buf; ++ memset(&buf, 0, sizeof(buf)); ++ int result = stat(file.c_str(), &buf ); ++ ++ return result == 0; ++ } ++} ++ + std::string S3D::getHomeDir() + { + #ifdef _WIN32 +@@ -74,12 +85,12 @@ bool S3D::dirMake(const std::string &file) + + bool S3D::fileExists(const std::string &file) + { +- return (S3D::fileModTime(file) != 0); ++ return fileCanBeStated(file); + } + + bool S3D::dirExists(const std::string &file) + { +- return (S3D::fileModTime(file) != 0); ++ return fileCanBeStated(file); + } + + time_t S3D::fileModTime(const std::string &file) diff --git a/pkgs/games/scorched3d/scorched3d-42.1-fixups.patch b/pkgs/games/scorched3d/scorched3d-42.1-fixups.patch new file mode 100644 index 00000000000..36a027cb60c --- /dev/null +++ b/pkgs/games/scorched3d/scorched3d-42.1-fixups.patch @@ -0,0 +1,58 @@ +diff -ru scorched.orig/configure-al.m4 scorched/configure-al.m4 +--- scorched.orig/configure-al.m4 2008-03-03 16:17:18.000000000 -0500 ++++ scorched/configure-al.m4 2009-02-15 20:43:35.000000000 -0500 +@@ -7,25 +7,9 @@ + [ --disable-openaltest Do not try to compile and run a test OpenAL program], + , enable_openaltest=yes) + AC_MSG_CHECKING(for OpenAL support) +-AC_PATH_PROG(OPENAL_CONFIG, openal-config, no) +-if test x$OPENAL_CONFIG = xno; then +- echo "*** The openal-config script installed by OpenAL could not be found" +- echo "*** Make sure openal-config is in your path, or set the OPENAL_CONFIG" +- echo "*** environment variable to the full path to openal-config." +- +- AC_MSG_ERROR([*** Can't find the openal library. Try: http://www.openal.org/]) +-else +- +- if test x"$use_static_openal" = x"yes"; then +- AL_LIBS="/usr/local/lib/libopenal.a" +- else +- AL_LIBS="`$OPENAL_CONFIG --libs`" +- fi +- +- AL_CFLAGS="`$OPENAL_CONFIG --cflags`" +- +- AC_MSG_RESULT(yes) +-fi ++AL_LIBS="-lopenal" ++AL_CFLAGS="-I/usr/include/AL" ++AC_MSG_RESULT(yes) + + AC_MSG_CHECKING(for Freealut support) + AC_PATH_PROG(FREEALUT_CONFIG, freealut-config, no) +diff -ru scorched.orig/configure.ac scorched/configure.ac +--- scorched.orig/configure.ac 2008-03-03 16:17:18.000000000 -0500 ++++ scorched/configure.ac 2009-02-15 20:40:30.000000000 -0500 +@@ -13,22 +13,6 @@ + AC_PROG_INSTALL + AC_PROG_RANLIB + +-LDFLAGS="-L/usr/X11R6/lib -L/usr/X11R6" +-CPPFLAGS="-I/usr/X11R6/include -I/usr/X11R6" +- +-if test `uname` == Darwin; then +-LDFLAGS="$LDFLAGS -lmx" +-CPPFLAGS="$CPPFLAGS -DFFTW_USE_DOUBLE -D__DARWIN__ -D__MACOSX__" +-else +-LDFLAGS="$LDFLAGS -L/usr/local/lib" +-CPPFLAGS="$CPPFLAGS -I/usr/local/include" +-fi +- +-AC_CHECK_LIB(fridge, beer, echo "Hmm?!",[ +- echo "Warning: No beer found in fridge!"; +- echo "We highly suggest that you rectify this situation immediately." +-]) +- + AC_ARG_ENABLE(serveronly, + [ --enable-serveronly Enable server only compilation], + , enable_serveronly=no, diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 51d128f63b3..6b6279fcd05 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9395,6 +9395,11 @@ let inherit fetchurl stdenv SDL zlib mpeg2dec; }; + scorched3d = import ../games/scorched3d { + inherit stdenv fetchurl mesa openal autoconf automake libtool freealut freetype fftw SDL SDL_net zlib libpng libjpeg; + wxGTK = wxGTK28; + }; + sgtpuzzles = builderDefsPackage (import ../games/sgt-puzzles) { inherit (gtkLibs) gtk glib; inherit pkgconfig; From 0d067c287bf381ac95d5b4784ffcd02f52076b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 16 Apr 2009 22:59:14 +0000 Subject: [PATCH 24/38] Add Foolscap, a distributed capability RPC protocol. svn path=/nixpkgs/trunk/; revision=15109 --- .../python-modules/foolscap/default.nix | 53 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/foolscap/default.nix diff --git a/pkgs/development/python-modules/foolscap/default.nix b/pkgs/development/python-modules/foolscap/default.nix new file mode 100644 index 00000000000..c52a9be538a --- /dev/null +++ b/pkgs/development/python-modules/foolscap/default.nix @@ -0,0 +1,53 @@ +{ fetchurl, stdenv, python, setuptools, twisted, pyopenssl }: + +stdenv.mkDerivation rec { + name = "foolscap-0.3.2"; + + src = fetchurl { + url = "http://foolscap.lothar.com/releases/${name}.tar.gz"; + sha256 = "1wkqgm6anlxvz8dnqx7ki008255nm1mlhak5n9xy6g1yf31fn3l0"; + }; + + buildInputs = [ python ]; + propagatedBuildInputs = [ setuptools twisted pyopenssl ]; + + doCheck = true; + + buildPhase = "python setup.py build --build-base $out"; + checkPhase = "python setup.py test"; + + # FIXME: `$out/bin/flogtool' can't find its friends: + # + # $ ./result/bin/flogtool --help + # Traceback (most recent call last): + # File "./result/bin/flogtool", line 4, in + # import pkg_resources + # ImportError: No module named pkg_resources + + installPhase = '' + ensureDir "$out/lib/python2.5/site-packages" + + PYTHONPATH="$out/lib/python2.5/site-packages:$PYTHONPATH" \ + python setup.py install --prefix="$out" + + ensureDir "$out/doc/${name}" + cp -rv "doc/"* "$out/doc/${name}" + ''; + + + meta = { + homepage = http://foolscap.lothar.com/; + + description = "Foolscap, an RPC protocol for Python that follows the distributed object-capability model"; + + longDescription = '' + "Foolscap" is the name for the next-generation RPC protocol, + intended to replace Perspective Broker (part of Twisted). + Foolscap is a protocol to implement a distributed + object-capabilities model in Python. + ''; + + # See http://foolscap.lothar.com/trac/browser/LICENSE. + license = "MIT"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6b6279fcd05..e91041ac4d8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6382,6 +6382,10 @@ let setuptools = setuptools.passthru.function {inherit python;}; }); + foolscap = import ../development/python-modules/foolscap { + inherit fetchurl stdenv python setuptools twisted pyopenssl; + }; + nevow = import ../development/python-modules/nevow { inherit fetchurl stdenv python setuptools twisted makeWrapper lib; }; From 5bed8bd9e1eab9638a1650409a92d6ccb71e27f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 17 Apr 2009 09:06:42 +0000 Subject: [PATCH 25/38] Add simplejson, a JSON encoded/decoded for Python. svn path=/nixpkgs/trunk/; revision=15110 --- .../python-modules/simplejson/default.nix | 45 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/simplejson/default.nix diff --git a/pkgs/development/python-modules/simplejson/default.nix b/pkgs/development/python-modules/simplejson/default.nix new file mode 100644 index 00000000000..9f53d9364f1 --- /dev/null +++ b/pkgs/development/python-modules/simplejson/default.nix @@ -0,0 +1,45 @@ +{ fetchsvn, stdenv, python, setuptools }: + +stdenv.mkDerivation rec { + name = "simplejson-2.0.9"; + + src = fetchsvn { + url = "http://simplejson.googlecode.com/svn/tags/${name}"; + sha256 = "a48d5256fdb4f258c33da3dda110ecf3c786f086dcb08a01309acde6d1ddb921"; + rev = "172"; # to be on the safe side + }; + + buildInputs = [ python ]; + propagatedBuildInputs = [ setuptools ]; + + doCheck = true; + + buildPhase = "python setup.py build --build-base $out"; + checkPhase = "python setup.py test"; + + installPhase = '' + ensureDir "$out/lib/python2.5/site-packages" + + PYTHONPATH="$out/lib/python2.5/site-packages:$PYTHONPATH" \ + python setup.py install --prefix="$out" + + # Remove irrelevant directories. + rm -rvf "$out/"lib.* "$out/"temp.* + ''; + + meta = { + description = "simplejson is a simple, fast, extensible JSON encoder/decoder for Python"; + + longDescription = '' + simplejson is compatible with Python 2.4 and later with no + external dependencies. It covers the full JSON specification + for both encoding and decoding, with unicode support. By + default, encoding is done in an encoding neutral fashion (plain + ASCII with \uXXXX escapes for unicode characters). + ''; + + homepage = http://code.google.com/p/simplejson/; + + license = "MIT"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e91041ac4d8..4cb1ab222fa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6482,6 +6482,10 @@ let inherit python; }; + simplejson = import ../development/python-modules/simplejson { + inherit fetchsvn stdenv python setuptools; + }; + wxPython = wxPython26; wxPython26 = import ../development/python-modules/wxPython/2.6.nix { From 2796d3a185433f80210a0edfcceec7a41f27c57f Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 17 Apr 2009 13:48:11 +0000 Subject: [PATCH 26/38] Updated fixCmakeFiles to handle file paths that contain whitespace. svn path=/nixpkgs/trunk/; revision=15113 --- pkgs/development/tools/build-managers/cmake/setup-hook.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index c289272d2a7..fe92e74db0c 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -11,13 +11,13 @@ fixCmakeFiles() echo "fixing cmake files" replaceArgs="-e -f -L -T /usr /FOO" replaceArgs="$replaceArgs -a NO_DEFAULT_PATH \"\" -a NO_SYSTEM_PATH \"\"" - find $1 -type f -name "*.cmake" | xargs replace-literal ${replaceArgs} + find $1 -type f -name "*.cmake" -print0 | xargs -0 replace-literal ${replaceArgs} } cmakeConfigurePhase() { eval "$preConfigure" - + if test -z "$dontFixCmake"; then fixCmakeFiles . fi @@ -33,9 +33,9 @@ cmakeConfigurePhase() fi echo "cmake flags: $cmakeFlags ${cmakeFlagsArray[@]}" - + cmake ${cmakeDir:-.} $cmakeFlags ${cmakeFlagsArray[@]} - + eval "$postConfigure" } From 047f6d20d5e6234662ed102e4ef2c6be800829f8 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 17 Apr 2009 13:48:22 +0000 Subject: [PATCH 27/38] Updated CMake to version 2.6.3. svn path=/nixpkgs/trunk/; revision=15114 --- .../tools/build-managers/cmake/2.6.3.nix | 31 ----------------- .../tools/build-managers/cmake/default.nix | 20 +++++------ pkgs/top-level/all-packages.nix | 34 ++++++++----------- 3 files changed, 25 insertions(+), 60 deletions(-) delete mode 100644 pkgs/development/tools/build-managers/cmake/2.6.3.nix diff --git a/pkgs/development/tools/build-managers/cmake/2.6.3.nix b/pkgs/development/tools/build-managers/cmake/2.6.3.nix deleted file mode 100644 index bb9c3b1485f..00000000000 --- a/pkgs/development/tools/build-managers/cmake/2.6.3.nix +++ /dev/null @@ -1,31 +0,0 @@ -{fetchurl, stdenv, replace, ncurses}: - -stdenv.mkDerivation rec { - name = "cmake-2.6.3-RC-15"; - - # We look for cmake modules in .../share/cmake-${majorVersion}/Modules. - majorVersion = "2.6"; - - setupHook = ./setup-hook.sh; - - meta = { - homepage = http://www.cmake.org/; - description = "Cross-Platform Makefile Generator"; - }; - - src = fetchurl { - url = "http://www.cmake.org/files/v2.6/${name}.tar.gz"; - sha256 = "476b6daca63c39bc46955f99f2566735d51159c43ccc716fa689ba2a2fa7e432"; - }; - - postUnpack = '' - dontUseCmakeConfigure=1 - source $setupHook - fixCmakeFiles $sourceRoot - echo 'SET (CMAKE_SYSTEM_PREFIX_PATH "'${ncurses}'" CACHE FILEPATH "Root for libs for cmake" FORCE)' > $sourceRoot/cmakeInit.txt - ''; - - configureFlags= [ " --init=cmakeInit.txt " ]; - - postInstall = "fixCmakeFiles $out/share"; -} diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index f46ba5ce9aa..6948215229b 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -1,31 +1,31 @@ {fetchurl, stdenv, replace, ncurses}: stdenv.mkDerivation rec { - name = "cmake-2.6.2"; + name = "cmake-2.6.3"; # We look for cmake modules in .../share/cmake-${majorVersion}/Modules. - majorVersion = "2.6"; - + majorVersion = "2.6"; + setupHook = ./setup-hook.sh; - + meta = { homepage = http://www.cmake.org/; description = "Cross-Platform Makefile Generator"; }; - + src = fetchurl { - url = "http://www.cmake.org/files/v2.6/${name}.tar.gz"; - sha256 = "b3f5a9dfa97fb82cb1b7d78a62d949f93c8d4317af36674f337d27066fa6b7e9"; + url = "http://www.cmake.org/files/v${majorVersion}/${name}.tar.gz"; + sha256 = "3c3af80526a32bc2afed616e8f486b847144f2fa3a8e441908bd39c38b146450"; }; - + postUnpack = '' dontUseCmakeConfigure=1 source $setupHook fixCmakeFiles $sourceRoot echo 'SET (CMAKE_SYSTEM_PREFIX_PATH "'${ncurses}'" CACHE FILEPATH "Root for libs for cmake" FORCE)' > $sourceRoot/cmakeInit.txt ''; - + configureFlags= [ " --init=cmakeInit.txt " ]; - + postInstall = "fixCmakeFiles $out/share"; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4cb1ab222fa..8ef6404d577 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1167,7 +1167,7 @@ let pythonSexy = builderDefsPackage (import ../development/python-modules/libsexy) { inherit python libsexy pkgconfig libxml2 pygtk; - inherit (gtkLibs) pango gtk glib; + inherit (gtkLibs) pango gtk glib; }; qhull = import ../development/libraries/qhull { @@ -1960,7 +1960,7 @@ let monotone = import ../applications/version-management/monotone { inherit stdenv fetchurl boost zlib botan libidn pcre - sqlite; + sqlite; lua = lua5; }; @@ -2043,7 +2043,7 @@ let metaBuildEnv = import ../development/compilers/meta-environment/meta-build-env { inherit fetchurl stdenv ; - }; + }; swiProlog = composedArgsAndFun (selectVersion ../development/compilers/swi-prolog "5.6.51") { inherit fetchurl stdenv; @@ -2410,10 +2410,6 @@ let inherit fetchurl stdenv replace ncurses; }; - cmakeUnstable = lowPrio (import ../development/tools/build-managers/cmake/2.6.3.nix { - inherit fetchurl stdenv replace ncurses; - }); - cproto = import ../development/tools/misc/cproto { inherit fetchurl stdenv flex bison; }; @@ -2797,7 +2793,7 @@ let boost_1_36_0 = import ../development/libraries/boost/1.36.0.nix { inherit fetchurl stdenv icu expat zlib bzip2 python; }; - + boost = makeOverridable (import ../development/libraries/boost/1.38.0.nix) { inherit fetchurl stdenv icu expat zlib bzip2 python; }; @@ -4193,7 +4189,7 @@ let inherit stdenv fetchurl; ghc = ghc682; }; - + cabal683 = import ../development/libraries/haskell/cabal/cabal.nix { inherit stdenv fetchurl; ghc = ghc683; @@ -6548,7 +6544,7 @@ let }; ejabberd = import ../servers/xmpp/ejabberd { - inherit fetchurl stdenv expat erlang zlib openssl + inherit fetchurl stdenv expat erlang zlib openssl pam; }; @@ -9543,7 +9539,7 @@ let inherit libxml2 guile perl intltool libtool pkgconfig; }; - + ### SCIENCE/BIOLOGY alliance = import ../applications/science/electronics/alliance { @@ -9588,7 +9584,7 @@ let inherit fetchurl stdenv perl paml; }; - + ### SCIENCE/MATH atlas = import ../development/libraries/science/math/atlas { @@ -9599,21 +9595,21 @@ let inherit fetchurl stdenv gfortran; }; */ - + ### SCIENCE/LOGIC coq = import ../applications/science/logic/coq { inherit fetchurl stdenv ocaml ncurses; }; - + ### SCIENCE / ELECTRONICS ngspice = import ../applications/science/electronics/ngspice { inherit fetchurl stdenv readline; }; - + ### SCIENCE / MATH maxima = import ../applications/science/math/maxima { @@ -9632,7 +9628,7 @@ let withX = true; }; - + ### MISC atari800 = import ../misc/emulators/atari800 { @@ -9676,11 +9672,11 @@ let gajim = builderDefsPackage (import ../applications/networking/instant-messengers/gajim) { inherit perl intltool pyGtkGlade gettext pkgconfig makeWrapper pygobject - pyopenssl gtkspell libsexy pycrypto aspell pythonDBus pythonSexy + pyopenssl gtkspell libsexy pycrypto aspell pythonDBus pythonSexy docutils; dbus = dbus.libs; inherit (gnome) gtk libglade; - inherit (xlibs) libXScrnSaver libXt xproto libXext xextproto libX11 + inherit (xlibs) libXScrnSaver libXt xproto libXext xextproto libX11 scrnsaverproto; python = pythonFull; }; @@ -9957,5 +9953,5 @@ let inherit (stdenv) mkDerivation; }; - + }; in pkgs From 006c5d51207b2f37ed2dc1e49e5c358f8e02897d Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Fri, 17 Apr 2009 14:58:26 +0000 Subject: [PATCH 28/38] Added iso-codes package svn path=/nixpkgs/trunk/; revision=15116 --- pkgs/top-level/all-packages.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8ef6404d577..62e8e1b78ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3274,6 +3274,10 @@ let perl perlXMLParser; }; + isocodes = import ../development/libraries/iso-codes { + inherit stdenv fetchurl gettext python; + }; + jasper = import ../development/libraries/jasper { inherit fetchurl stdenv unzip xlibs libjpeg; }; From dc192d36fe11245296460bf5ca4410a8e2ba3588 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Fri, 17 Apr 2009 15:08:14 +0000 Subject: [PATCH 29/38] Added iso-codes package svn path=/nixpkgs/trunk/; revision=15117 --- pkgs/development/libraries/iso-codes/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pkgs/development/libraries/iso-codes/default.nix diff --git a/pkgs/development/libraries/iso-codes/default.nix b/pkgs/development/libraries/iso-codes/default.nix new file mode 100644 index 00000000000..83683159476 --- /dev/null +++ b/pkgs/development/libraries/iso-codes/default.nix @@ -0,0 +1,16 @@ +{stdenv, fetchurl, gettext, python}: + +stdenv.mkDerivation { + name = "iso-codes-3.5"; + src = fetchurl { + url = ftp://pkg-isocodes.alioth.debian.org/pub/pkg-isocodes/iso-codes-3.5.tar.bz2; + sha256 = "2aac5f37a9ebb5af9c5d186ba1428f05ad779c7760e279cd8b86897a5d434807"; + }; + patchPhase = '' + for i in `find . -name \*.py` + do + sed -i -e "s|#!/usr/bin/env python|#!${python}/bin/python|" $i + done + ''; + buildInputs = [ gettext ]; +} From 77f10018021b391b2bf775354be4f40d42f965f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 17 Apr 2009 17:36:48 +0000 Subject: [PATCH 30/38] Build Hugin on Hydra. svn path=/nixpkgs/trunk/; revision=15118 --- pkgs/top-level/release.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 3e0b1387d08..9bfb1d65109 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -151,6 +151,7 @@ in { hal = linux; hello = all; host = linux; + hugin = linux; iana_etc = linux; icecat3Xul = [ "i686-linux" ]; idutils = all; From 6f2da398be861b58585755b8e8a7c0cafa6907c3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 17 Apr 2009 19:43:05 +0000 Subject: [PATCH 31/38] * Revert to GHC 6.10.1 binary for bootstrapping GHC 6.10.2 at Andres' suggestion. It's good to use an older GHC for bootstrapping because old versions can build newer versions but not vice versa. svn path=/nixpkgs/trunk/; revision=15120 --- .../compilers/ghc/6.10.1-binary.nix | 106 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 14 ++- 2 files changed, 115 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/compilers/ghc/6.10.1-binary.nix diff --git a/pkgs/development/compilers/ghc/6.10.1-binary.nix b/pkgs/development/compilers/ghc/6.10.1-binary.nix new file mode 100644 index 00000000000..a783e039269 --- /dev/null +++ b/pkgs/development/compilers/ghc/6.10.1-binary.nix @@ -0,0 +1,106 @@ +{stdenv, fetchurl, perl, libedit, ncurses, gmp}: + +stdenv.mkDerivation rec { + version = "6.10.1"; + + name = "ghc-${version}-binary"; + + src = + if stdenv.system == "i686-linux" then + fetchurl { + # This binary requires libedit.so.0 (rather than libedit.so.2). + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2"; + sha256 = "18l0vwlf7y86s65klpdvz4ccp8kydvcmyh03c86hld8jvx16q7zz"; + } + else if stdenv.system == "x86_64-linux" then + fetchurl { + # Idem. + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2"; + sha256 = "14jvvn333i36wm7mmvi47jr93f5hxrw1h2dpjvqql0rp00svhzzg"; + } + else if stdenv.system == "x86_64-linux" then + fetchurl { + # Idem. + url = "http://haskell.org/ghc/dist/${version}/maeder/ghc-${version}-i386-apple-darwin.tar.bz2"; + sha256 = "0lax61cfzxkrjb7an3magdax6c8fygsirpw9qfmc651k2sfby1mq"; + } + else throw "cannot bootstrap GHC on this platform"; + + buildInputs = [perl]; + + postUnpack = + # Strip is harmful, see also below. It's important that this happens + # first. The GHC Cabal build system makes use of strip by default and + # has hardcoded paths to /usr/bin/strip in many places. We replace + # those below, making them point to our dummy script. + '' + mkdir "$TMP/bin" + for i in strip; do + echo '#!/bin/sh' >> "$TMP/bin/$i" + chmod +x "$TMP/bin/$i" + PATH="$TMP/bin:$PATH" + done + '' + + # On Linux, use patchelf to modify the executables so that they can + # find editline/gmp. + (if stdenv.isLinux then '' + find . -type f -perm +100 \ + -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ + --set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \; + for prog in ld ar gcc strip ranlib; do + find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \; + done + '' else ""); + + configurePhase = '' + ./configure --prefix=$out --with-gmp-libraries=${gmp}/lib --with-gmp-includes=${gmp}/include + ''; + + # Stripping combined with patchelf breaks the executables (they die + # with a segfault or the kernel even refuses the execve). (NIXPKGS-85) + dontStrip = true; + + # No building is necessary, but calling make without flags ironically + # calls install-strip ... + buildPhase = "true"; + + # The binaries for Darwin use frameworks, so fake those frameworks, + # and create some wrapper scripts that set DYLD_FRAMEWORK_PATH so + # that the executables work with no special setup. + postInstall = + (if stdenv.isDarwin then + '' + ensureDir $out/frameworks/GMP.framework/Versions/A + ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/GMP + ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/Versions/A/GMP + # !!! fix this + ensureDir $out/frameworks/GNUeditline.framework/Versions/A + ln -s ${libedit}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/GNUeditline + ln -s ${libedit}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/Versions/A/GNUeditline + + mv $out/bin $out/bin-orig + mkdir $out/bin + for i in $(cd $out/bin-orig && ls); do + echo \"#! $SHELL -e\" >> $out/bin/$i + echo \"DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i -framework-path $out/frameworks \\\"\\$@\\\"\" >> $out/bin/$i + chmod +x $out/bin/$i + done + '' else "") + + + '' + # bah, the passing gmp doesn't work, so let's add it to the final package.conf in a quick but dirty way + sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp}/lib\",\2@" $out/lib/ghc-${version}/package.conf + + # Sanity check, can ghc create executables? + cd $TMP + mkdir test-ghc; cd test-ghc + cat > main.hs << EOF + module Main where + main = putStrLn "yes" + EOF + $out/bin/ghc --make main.hs + echo compilation ok + [ $(./main) == "yes" ] + ''; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 62e8e1b78ec..b5df409b5a6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1845,13 +1845,13 @@ let perl = perl58; }); - ghc682 = import ../development/compilers/ghc/6.8.2.nix { - inherit fetchurl stdenv readline perl gmp ncurses m4; + ghc661 = import ../development/compilers/ghc/6.6.1.nix { + inherit fetchurl stdenv readline perl58 gmp ncurses m4; ghc = ghc642Binary; }; - ghc661 = import ../development/compilers/ghc/6.6.1.nix { - inherit fetchurl stdenv readline perl58 gmp ncurses m4; + ghc682 = import ../development/compilers/ghc/6.8.2.nix { + inherit fetchurl stdenv readline perl gmp ncurses m4; ghc = ghc642Binary; }; @@ -1867,9 +1867,13 @@ let }; }; + ghc6101Binary = lowPrio (import ../development/compilers/ghc/6.10.1-binary.nix { + inherit fetchurl stdenv perl ncurses gmp libedit; + }); + ghc6102 = import ../development/compilers/ghc/6.10.2.nix { inherit fetchurl stdenv perl ncurses gmp libedit; - ghc = ghc6102Binary; + ghc = ghc6101Binary; }; ghc6102Binary = lowPrio (import ../development/compilers/ghc/6.10.2-binary.nix { From 95a472cd55a8628210bb4d64ec4321b435e8b47d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 17 Apr 2009 19:46:28 +0000 Subject: [PATCH 32/38] * Doh. svn path=/nixpkgs/trunk/; revision=15121 --- pkgs/development/compilers/ghc/6.10.1-binary.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ghc/6.10.1-binary.nix b/pkgs/development/compilers/ghc/6.10.1-binary.nix index a783e039269..0c288f22fea 100644 --- a/pkgs/development/compilers/ghc/6.10.1-binary.nix +++ b/pkgs/development/compilers/ghc/6.10.1-binary.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2"; sha256 = "14jvvn333i36wm7mmvi47jr93f5hxrw1h2dpjvqql0rp00svhzzg"; } - else if stdenv.system == "x86_64-linux" then + else if stdenv.system == "i686-darwin" then fetchurl { # Idem. url = "http://haskell.org/ghc/dist/${version}/maeder/ghc-${version}-i386-apple-darwin.tar.bz2"; From 98f6f77709e091bab4b7b772553da7f3f81446f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Fri, 17 Apr 2009 20:36:54 +0000 Subject: [PATCH 33/38] Adding a folding-at-home client. svn path=/nixpkgs/trunk/; revision=15122 --- pkgs/misc/foldingathome/default.nix | 37 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/misc/foldingathome/default.nix diff --git a/pkgs/misc/foldingathome/default.nix b/pkgs/misc/foldingathome/default.nix new file mode 100644 index 00000000000..ca4fe2657bf --- /dev/null +++ b/pkgs/misc/foldingathome/default.nix @@ -0,0 +1,37 @@ +{stdenv, fetchurl}: + +assert stdenv.system == "i686-linux"; + +stdenv.mkDerivation { + name = "folding-at-home-6.02"; + + src = fetchurl { + url = http://www.stanford.edu/group/pandegroup/folding/release/FAH6.02-Linux.tgz; + sha256 = "01nwi0lb4vv0xg4k04i2fbf5v5qgabl70jm5cgvw1ibgqjz03910"; + }; + + unpackPhase = "tar xvzf $src"; + + # Otherwise it doesn't work at all, even ldd thinks it's not a dynamic executable + dontStrip = true; + + # This program, to run with '-smp', wants to execute the program mpiexec + # as "./mpiexec", although it also expects to write the data files into "." + # I suggest, if someone wants to run it, in the data directory set a link + # to the store for 'mpiexec', so './mpiexec' will work. That link better + # be considered a gcroot. + installPhase = '' + BINFILES="fah6 mpiexec"; + for a in $BINFILES; do + patchelf --set-interpreter $(cat $NIX_GCC/nix-support/dynamic-linker) $a + done + ensureDir $out/bin + cp $BINFILES $out/bin + ''; + + meta = { + homepage = http://folding.stanford.edu/; + description = "Folding@home distributed computing client"; + license = "unfree"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b5df409b5a6..1a93b94a192 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9671,6 +9671,10 @@ let inherit fetchurl stdenv perl zlib bzip2; }; + foldingathome = import ../misc/foldingathome { + inherit fetchurl stdenv; + }; + freestyle = import ../misc/freestyle { inherit fetchurl freeglut qt4 libpng lib3ds libQGLViewer swig; inherit (xlibs) libXi; From 034248f57a17c2db02f8bc2656c8d5ba446e4537 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 18 Apr 2009 11:09:24 +0000 Subject: [PATCH 34/38] * Document the generic Perl builder. svn path=/nixpkgs/trunk/; revision=15124 --- doc/language-support.xml | 166 +++++++++++++++++++++++++++++++++++++++ doc/manual.xml | 36 +-------- 2 files changed, 167 insertions(+), 35 deletions(-) create mode 100644 doc/language-support.xml diff --git a/doc/language-support.xml b/doc/language-support.xml new file mode 100644 index 00000000000..f5e7e74c123 --- /dev/null +++ b/doc/language-support.xml @@ -0,0 +1,166 @@ + + +Support for specific programming languages + +The standard build +environment makes it easy to build typical Autotools-based +packages with very little code. Any other kind of package can be +accomodated by overriding the appropriate phases of +stdenv. However, there are specialised functions +in Nixpkgs to easily build packages for other programming languages, +such as Perl or Haskell. These are described in this chapter. + + +
Perl + +Nixpkgs provides a function buildPerlPackage, +a generic package builder function for any Perl package that has a +standard Makefile.PL. It’s implemented in pkgs/development/perl-modules/generic. + +Most Perl packages from CPAN are so straight-forward to build +that they are defined in pkgs/all-packages.nix +itself. Here is an example: + + +perlClassC3 = buildPerlPackage rec { + name = "Class-C3-0.21"; + src = fetchurl { + url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz"; + sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz"; + }; +}; + + +Note the use of mirror://cpan/, and the +${name} in the URL definition to ensure that the +name attribute is consistent with the source that we’re actually +downloading. As usual, you can test this package as follows: + + +$ nix-build -A perlClassC3 + + +buildPerlPackage adds perl- to +the start of the name attribute, so the package above is actually +called perl-Class-C3-0.21. So to install it, you +can say: + + +$ nix-env -i perl-Class-C3 + + +(Of course you can also install using the attribute name: +nix-env -i -A perlClassC3.) + +So what does buildPerlPackage do? It does +the following: + + + + In the configure phase, it calls perl + Makefile.PL to generate a Makefile. You can set the + variable makeMakerFlags to pass flags to + Makefile.PL + + It adds the contents of the PERL5LIB + environment variable to #! .../bin/perl line of + Perl scripts as -Idir + flags. This ensures that a script can find its + dependencies. + + In the fixup phase, it writes the propagated build + inputs (propagatedBuildInputs) to the file + $out/nix-support/propagated-user-env-packages. + nix-env recursively installs all packages listed + in this file when you install a package that has it. This ensures + that a Perl package can find its dependencies. + + + + + +buildPerlPackage is built on top of +stdenv, so everything can be customised in the +usual way. For instance, the BerkeleyDB module has +a preConfigure hook to generate a configuration +file used by Makefile.PL: + + +{buildPerlPackage, fetchurl, db4}: + +buildPerlPackage rec { + name = "BerkeleyDB-0.36"; + + src = fetchurl { + url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz"; + sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1"; + }; + + preConfigure = '' + echo "LIB = ${db4}/lib" > config.in + echo "INCLUDE = ${db4}/include" >> config.in + ''; +} + + + + +Dependencies on other Perl packages can be specified in the +buildInputs and +propagatedBuildInputs attributes. If something is +exclusively a build-time dependency, use +buildInputs; if it’s (also) a runtime dependency, +use propagatedBuildInputs. For instance, this +builds a Perl module that has runtime dependencies on a bunch of other +modules: + + +perlClassC3Componentised = buildPerlPackage rec { + name = "Class-C3-Componentised-1.0004"; + src = fetchurl { + url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz"; + sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1"; + }; + propagatedBuildInputs = [ + perlClassC3 perlClassInspector perlTestException perlMROCompat + ]; +}; + + + + +
+ + +
Python + +TODO + +
+ + +
Haskell + +TODO + +
+ + +
Java + +TODO; Java support needs lots of improvement + +
+ + +
TeX / LaTeX + +* Special support for building TeX documents + +
+ + +
\ No newline at end of file diff --git a/doc/manual.xml b/doc/manual.xml index a16b783af31..9eb81ee2e59 100644 --- a/doc/manual.xml +++ b/doc/manual.xml @@ -32,41 +32,7 @@ - - - - - - Language Support - -
- Perl - * Generic Perl builder -
- -
- Python - * Wrapper generation -
- -
- Haskell - TODO -
- -
- Java - TODO; Java support needs lots of improvement -
- -
- TeX / LaTeX - * Special support for building TeX documents -
- -
- - + From cee387e84503f01988099759be5cd0da0406ca78 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 18 Apr 2009 12:47:11 +0000 Subject: [PATCH 35/38] * Move the composition of Haskell packages out of all-packages.nix into haskell-packages.nix, which depends on an instance of GHC. This allows a consistent set of packages to be built with the same GHC. For instance, $ nix-build -A haskellPackages_ghc683.xmonad builds xmonad and all its dependencies with GHC 6.8.3, while $ nix-build -A haskellPackages_ghc6102.xmonad does the same with GHC 6.10.2. This is the same technique used with kernelPackages. It also means that we don't need things like "cabal682" and "cabal683" anymore. * The setup hook is now in a separate wrapper package so that we don't have to recompile all of GHC every time we want to make a small change. * cinelerra: this package appears to have an accidental dependency on the "X11" Haskell package. svn path=/nixpkgs/trunk/; revision=15125 --- pkgs/applications/video/cinelerra/default.nix | 2 +- pkgs/development/compilers/ghc/setup-hook.sh | 4 +- pkgs/development/compilers/ghc/wrapper.nix | 14 ++ .../libraries/haskell/editline/default.nix | 2 +- .../tools/parsing/happy/default.nix | 10 - pkgs/top-level/all-packages.nix | 171 ++---------------- pkgs/top-level/haskell-packages.nix | 160 ++++++++++++++++ 7 files changed, 194 insertions(+), 169 deletions(-) create mode 100644 pkgs/development/compilers/ghc/wrapper.nix delete mode 100644 pkgs/development/tools/parsing/happy/default.nix create mode 100644 pkgs/top-level/haskell-packages.nix diff --git a/pkgs/applications/video/cinelerra/default.nix b/pkgs/applications/video/cinelerra/default.nix index 501c7c33df1..2029c98037f 100644 --- a/pkgs/applications/video/cinelerra/default.nix +++ b/pkgs/applications/video/cinelerra/default.nix @@ -14,7 +14,7 @@ args.stdenv.mkDerivation { buildInputs =(with args; [ automake autoconf libtool pkgconfig - X11 faad2 faac + faad2 faac a52dec alsaLib fftw lame libavc1394 libiec61883 libraw1394 libsndfile libvorbis libogg libjpeg libtiff freetype mjpegtools x264 gettext openexr esound diff --git a/pkgs/development/compilers/ghc/setup-hook.sh b/pkgs/development/compilers/ghc/setup-hook.sh index 263f46f52d4..a73ddada026 100644 --- a/pkgs/development/compilers/ghc/setup-hook.sh +++ b/pkgs/development/compilers/ghc/setup-hook.sh @@ -4,7 +4,7 @@ ensureDir $ghc_support # Create isolated package config packages_db=$ghc_support/package.conf -cp @out@/lib/ghc-*/package.conf $packages_db +cp @ghc@/lib/ghc-*/package.conf $packages_db chmod +w $packages_db # Generate wrappers for GHC that use the isolated package config @@ -13,7 +13,7 @@ makeWrapper() { wrapper="$ghc_support/$wrapperName" shift #the other arguments are passed to the source app echo '#!'"$SHELL" > "$wrapper" - echo "exec \"@out@/bin/$wrapperName\" $@" '"$@"' >> "$wrapper" + echo "exec \"@ghc@/bin/$wrapperName\" $@" '"$@"' >> "$wrapper" chmod +x "$wrapper" } diff --git a/pkgs/development/compilers/ghc/wrapper.nix b/pkgs/development/compilers/ghc/wrapper.nix new file mode 100644 index 00000000000..020363d20a9 --- /dev/null +++ b/pkgs/development/compilers/ghc/wrapper.nix @@ -0,0 +1,14 @@ +{stdenv, ghc}: + +stdenv.mkDerivation { + name = "${ghc.name}-wrapper"; + + propagatedBuildInputs = [ghc]; + + unpackPhase = "true"; + installPhase = "true"; + + setupHook = ./setup-hook.sh; + + inherit ghc; +} diff --git a/pkgs/development/libraries/haskell/editline/default.nix b/pkgs/development/libraries/haskell/editline/default.nix index f3dfa9f6655..daf223b23fb 100644 --- a/pkgs/development/libraries/haskell/editline/default.nix +++ b/pkgs/development/libraries/haskell/editline/default.nix @@ -4,7 +4,7 @@ cabal.mkDerivation (self : { pname = "editline"; version = "0.2"; sha256 = "6ee0b553cc8d7542c096730ceebabdcb9b2951d7b00a5a0ddbf47b5436a77ce4"; - propagatedBuildInputs = [ libedit ]; + buildInputs = [ libedit ]; patchLibFiles = [ "editline.buildinfo.in" ]; preConfigure = '' sed -i -e '/el_get/d' include/HsEditline.h diff --git a/pkgs/development/tools/parsing/happy/default.nix b/pkgs/development/tools/parsing/happy/default.nix deleted file mode 100644 index ac3fb088bba..00000000000 --- a/pkgs/development/tools/parsing/happy/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{stdenv, fetchurl, perl, ghc}: - -stdenv.mkDerivation { - name = "happy-1.14"; - src = fetchurl { - url = http://www.haskell.org/happy/dist/1.14/happy-1.14-src.tar.gz; - md5 = "501b5b63533b2e2838de18085e8c4492"; - }; - buildInputs = [ghc perl]; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1a93b94a192..aa9399e429e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1550,11 +1550,6 @@ let }; }; - # Essential Haskell Compiler -- nix expression is work in progress - ehc = import ../development/compilers/ehc { - inherit fetchsvn stdenv coreutils m4 libtool ghc uulib uuagc llvm; - }; - adobeFlexSDK33 = import ../development/compilers/adobe-flex-sdk { inherit fetchurl stdenv unzip jre; }; @@ -1804,7 +1799,7 @@ let # Executables compiled by this ghc68 - I'm too lazy to add them all as additional file in here ghc68executables = recurseIntoAttrs (import ../misc/ghc68executables { inherit ghcCabalExecutableFun fetchurl lib bleedingEdgeRepos autoconf zlib getConfig; - inherit X11; + #inherit X11; inherit (xlibs) xmessage; inherit pkgs; # passing pkgs to add the possibility for the user to add his own executables. pkgs is passed. }); @@ -1880,6 +1875,18 @@ let inherit fetchurl stdenv perl ncurses gmp libedit; }); + haskellPackages = haskellPackages_ghc6102; + + haskellPackages_ghc6102 = import ./haskell-packages.nix { + inherit pkgs; + ghc = ghc6102; + }; + + haskellPackages_ghc683 = import ./haskell-packages.nix { + inherit pkgs; + ghc = ghc683; + }; + gprolog = import ../development/compilers/gprolog { inherit fetchurl stdenv; }; @@ -2321,10 +2328,6 @@ let ### DEVELOPMENT / TOOLS - alex = import ../development/tools/parsing/alex { - inherit cabal perl; - }; - antlr = import ../development/tools/parsing/antlr/2.7.7.nix { inherit fetchurl stdenv jdk python; }; @@ -2507,21 +2510,13 @@ let inherit fetchurl stdenv; }; - # old version of haddock, still more stable than 2.0 - haddock09 = import ../development/tools/documentation/haddock/haddock-0.9.nix { - inherit cabal; - }; - - # does not compile with ghc-6.8.3 - haddock210 = lowPrio (import ../development/tools/documentation/haddock/haddock-2.1.0.nix { - cabal = cabal682; - }); - + /* hsc2hs = import ../development/tools/misc/hsc2hs { inherit bleedingEdgeRepos stdenv; ghc = ghcsAndLibs.ghc68.ghc; libs = with (ghc68extraLibs ghcsAndLibs.ghc68 // ghcsAndLibs.ghc68.core_libs); [ base directory process cabal_darcs ]; }; + */ guileLint = import ../development/tools/guile/guile-lint { inherit fetchurl stdenv guile; @@ -2532,16 +2527,6 @@ let inherit (gtkLibs) glib; }; - /* - happy = import ../development/tools/parsing/happy { - inherit fetchurl stdenv perl ghc; - }; - */ - - happy = import ../development/tools/parsing/happy/happy-1.17.nix { - inherit cabal perl; - }; - help2man = import ../development/tools/misc/help2man { inherit fetchurl stdenv perl gettext perlLocaleGettext; }; @@ -2680,10 +2665,6 @@ let inherit fetchurl stdenv; }; - uuagc = import ../development/tools/haskell/uuagc { - inherit cabal uulib; - }; - gdb = import ../development/tools/misc/gdb { inherit fetchurl stdenv ncurses readline gmp mpfr texinfo; }; @@ -4177,113 +4158,6 @@ let }; - ### DEVELOPMENT / LIBRARIES / HASKELL - - benchpress = import ../development/libraries/haskell/benchpress { - inherit cabal; - }; - - maybench = import ../development/libraries/haskell/maybench { - inherit cabal benchpress; - }; - - binary = import ../development/libraries/haskell/binary { - inherit cabal; - }; - - # cabal is a utility function to build cabal-based - # Haskell packages - cabal682 = import ../development/libraries/haskell/cabal/cabal.nix { - inherit stdenv fetchurl; - ghc = ghc682; - }; - - cabal683 = import ../development/libraries/haskell/cabal/cabal.nix { - inherit stdenv fetchurl; - ghc = ghc683; - }; - - cabal = cabal683; - - Crypto = import ../development/libraries/haskell/Crypto { - inherit cabal; - }; - - gtk2hs = import ../development/libraries/haskell/gtk2hs { - inherit pkgconfig stdenv fetchurl cairo ghc; - inherit (gnome) gtk glib GConf libglade libgtkhtml gtkhtml; - }; - - haxr = import ../development/libraries/haskell/haxr { - inherit cabal HaXml HTTP; - }; - - haxr_th = import ../development/libraries/haskell/haxr-th { - inherit cabal haxr HaXml HTTP; - }; - - HaXml = import ../development/libraries/haskell/HaXml { - inherit cabal; - }; - - haskellEditline = import ../development/libraries/haskell/editline { - inherit cabal libedit; - }; - - HDBC = import ../development/libraries/haskell/HDBC/HDBC-1.1.4.nix { - inherit cabal; - }; - - HDBCPostgresql = import ../development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix { - inherit cabal HDBC postgresql; - }; - - HDBCSqlite = import ../development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix { - inherit cabal HDBC sqlite; - }; - - HTTP = import ../development/libraries/haskell/HTTP { - inherit cabal; - }; - - monadlab = import ../development/libraries/haskell/monadlab { - inherit cabal; - }; - - pcreLight = import ../development/libraries/haskell/pcre-light { - inherit cabal pcre; - }; - - uulib = import ../development/libraries/haskell/uulib { - inherit cabal; - }; - - wxHaskell = import ../development/libraries/haskell/wxHaskell { - inherit stdenv fetchurl unzip wxGTK ghc; - }; - - /* - wxHaskell68 = lowPrio (appendToName "ghc68" (import ../development/libraries/haskell/wxHaskell { - inherit stdenv fetchurl unzip wxGTK; - ghc = ghc68; - })); - */ - - X11 = import ../development/libraries/haskell/X11 { - inherit cabal; - inherit (xlibs) libX11 libXinerama libXext; - xineramaSupport = true; - }; - - vty = import ../development/libraries/haskell/vty { - inherit cabal; - }; - - zlibHaskell = import ../development/libraries/haskell/zlib { - inherit cabal zlib; - }; - - ### DEVELOPMENT / PERL MODULES buildPerlPackage = import ../development/perl-modules/generic perl; @@ -7932,7 +7806,7 @@ let automake autoconf libtool a52dec alsaLib lame libavc1394 libiec61883 libraw1394 libsndfile libvorbis libogg libjpeg libtiff freetype mjpegtools x264 - gettext X11 faad2 faac libtheora libpng libdv perl nasm e2fsprogs + gettext faad2 faac libtheora libpng libdv perl nasm e2fsprogs pkgconfig; openexr = openexr_1_6_1; fftw = fftwSinglePrec; @@ -9190,19 +9064,6 @@ let stdenv = overrideGCC stdenv gcc34; # due to problems with gcc 4.x }; - xmobar = import ../applications/misc/xmobar { - inherit cabal X11; - }; - - xmonad = import ../applications/window-managers/xmonad { - inherit cabal X11; - inherit (xlibs) xmessage; - }; - - xmonadContrib = import ../applications/window-managers/xmonad/xmonad-contrib.nix { - inherit cabal xmonad X11; - }; - xneur = import ../applications/misc/xneur { inherit fetchurl stdenv pkgconfig pcre libxml2 aspell imlib2 xosd; GStreamer=gst_all.gstreamer; diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix new file mode 100644 index 00000000000..7e599a5acde --- /dev/null +++ b/pkgs/top-level/haskell-packages.nix @@ -0,0 +1,160 @@ +{pkgs, ghc}: + +let ghcOrig = ghc; in + +rec { + + ghc = import ../development/compilers/ghc/wrapper.nix { + inherit (pkgs) stdenv; + ghc = ghcOrig; + }; + + cabal = import ../development/libraries/haskell/cabal/cabal.nix { + inherit (pkgs) stdenv fetchurl; + inherit ghc; + }; + + + # Haskell libraries. + + benchpress = import ../development/libraries/haskell/benchpress { + inherit cabal; + }; + + maybench = import ../development/libraries/haskell/maybench { + inherit cabal benchpress; + }; + + binary = import ../development/libraries/haskell/binary { + inherit cabal; + }; + + Crypto = import ../development/libraries/haskell/Crypto { + inherit cabal; + }; + + editline = import ../development/libraries/haskell/editline { + inherit (pkgs) libedit; + inherit cabal; + }; + + gtk2hs = import ../development/libraries/haskell/gtk2hs { + inherit (pkgs) pkgconfig stdenv fetchurl cairo ghc; + inherit (pkgs.gnome) gtk glib GConf libglade libgtkhtml gtkhtml; + }; + + HTTP = import ../development/libraries/haskell/HTTP { + inherit cabal; + }; + + haxr = import ../development/libraries/haskell/haxr { + inherit cabal HaXml HTTP; + }; + + haxr_th = import ../development/libraries/haskell/haxr-th { + inherit cabal haxr HaXml HTTP; + }; + + HaXml = import ../development/libraries/haskell/HaXml { + inherit cabal; + }; + + HDBC = import ../development/libraries/haskell/HDBC/HDBC-1.1.4.nix { + inherit cabal; + }; + + HDBCPostgresql = import ../development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix { + inherit cabal HDBC; + inherit (pkgs) postgresql; + }; + + HDBCSqlite = import ../development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix { + inherit cabal HDBC; + inherit (pkgs) sqlite; + }; + + monadlab = import ../development/libraries/haskell/monadlab { + inherit cabal; + }; + + pcreLight = import ../development/libraries/haskell/pcre-light { + inherit cabal; + inherit (pkgs) pcre; + }; + + uuagc = import ../development/tools/haskell/uuagc { + inherit cabal uulib; + }; + + uulib = import ../development/libraries/haskell/uulib { + inherit cabal; + }; + + wxHaskell = import ../development/libraries/haskell/wxHaskell { + inherit ghc; + inherit (pkgs) stdenv fetchurl unzip wxGTK; + }; + + X11 = import ../development/libraries/haskell/X11 { + inherit cabal; + inherit (pkgs.xlibs) libX11 libXinerama libXext; + xineramaSupport = true; + }; + + vty = import ../development/libraries/haskell/vty { + inherit cabal; + }; + + zlib = import ../development/libraries/haskell/zlib { + inherit cabal zlib; + }; + + + # Compilers. + + ehc = import ../development/compilers/ehc { + inherit ghc; + inherit (pkgs) fetchsvn stdenv coreutils m4 libtool uulib uuagc llvm; + }; + + + # Development tools. + + alex = import ../development/tools/parsing/alex { + inherit cabal; + inherit (pkgs) perl; + }; + + # old version of haddock, still more stable than 2.0 + haddock09 = import ../development/tools/documentation/haddock/haddock-0.9.nix { + inherit cabal; + }; + + # does not compile with ghc-6.8.3 + haddock210 = pkgs.stdenv.lib.lowPrio (import ../development/tools/documentation/haddock/haddock-2.1.0.nix { + inherit cabal; + }); + + happy = import ../development/tools/parsing/happy/happy-1.17.nix { + inherit cabal; + inherit (pkgs) perl; + }; + + + # Applications. + + xmobar = import ../applications/misc/xmobar { + inherit cabal; + inherit (pkgs) X11; + }; + + xmonad = import ../applications/window-managers/xmonad { + inherit cabal X11; + inherit (pkgs.xlibs) xmessage; + }; + + xmonadContrib = import ../applications/window-managers/xmonad/xmonad-contrib.nix { + inherit cabal xmonad X11; + }; + +} From 9c509e25835fb29cb29c72ef1bea7722c96c07fa Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 18 Apr 2009 14:11:35 +0000 Subject: [PATCH 36/38] * Build wget with support for https. svn path=/nixpkgs/trunk/; revision=15126 --- pkgs/tools/networking/wget/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/wget/default.nix b/pkgs/tools/networking/wget/default.nix index 9ab6fbb8133..a4618a53452 100644 --- a/pkgs/tools/networking/wget/default.nix +++ b/pkgs/tools/networking/wget/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, gettext}: +{stdenv, fetchurl, gettext, openssl ? null}: stdenv.mkDerivation rec { name = "wget-1.11.4"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1yr7w182n7lvkajvq07wnw65sw2vmxjkc3611kpc728vhvi54zwb"; }; - buildInputs = [gettext]; + buildInputs = [gettext openssl]; meta = { description = "A console downloading program. Has some features for mirroring sites."; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aa9399e429e..c8f3110055a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1416,7 +1416,7 @@ let }; wget = import ../tools/networking/wget { - inherit fetchurl stdenv gettext; + inherit fetchurl stdenv gettext openssl; }; which = import ../tools/system/which { From baad5d7cb4ee715fe0743a6b160096f1515641fe Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 18 Apr 2009 15:23:00 +0000 Subject: [PATCH 37/38] * GHC setup hook: don't generate wrappers around ghc etc., instead set GHC_PACKAGE_PATH. * Let Cabal generate a package configuration file ($out/nix-support/ghc-package.conf) instead of a registration script. svn path=/nixpkgs/trunk/; revision=15127 --- pkgs/development/compilers/ghc/setup-hook.sh | 39 ++++--------------- .../libraries/haskell/cabal/cabal.nix | 12 ++---- pkgs/top-level/haskell-packages.nix | 4 +- pkgs/top-level/release.nix | 1 - 4 files changed, 12 insertions(+), 44 deletions(-) diff --git a/pkgs/development/compilers/ghc/setup-hook.sh b/pkgs/development/compilers/ghc/setup-hook.sh index a73ddada026..dc7066f31b6 100644 --- a/pkgs/development/compilers/ghc/setup-hook.sh +++ b/pkgs/development/compilers/ghc/setup-hook.sh @@ -1,40 +1,15 @@ -# Support dir for isolating GHC -ghc_support=$TMPDIR/ghc-6.8-nix-support -ensureDir $ghc_support - # Create isolated package config -packages_db=$ghc_support/package.conf +packages_db=$TMPDIR/.package.conf cp @ghc@/lib/ghc-*/package.conf $packages_db -chmod +w $packages_db +chmod u+w $packages_db -# Generate wrappers for GHC that use the isolated package config -makeWrapper() { - wrapperName="$1" - wrapper="$ghc_support/$wrapperName" - shift #the other arguments are passed to the source app - echo '#!'"$SHELL" > "$wrapper" - echo "exec \"@ghc@/bin/$wrapperName\" $@" '"$@"' >> "$wrapper" - chmod +x "$wrapper" -} - -makeWrapper "ghc" "-no-user-package-conf -package-conf $packages_db" -makeWrapper "ghci" "-no-user-package-conf -package-conf $packages_db" -makeWrapper "runghc" "-no-user-package-conf -package-conf $packages_db" -makeWrapper "runhaskell" "-no-user-package-conf -package-conf $packages_db" -makeWrapper "ghc-pkg" "--global-conf $packages_db" - -# Add wrappers to search path -export _PATH=$ghc_support:$_PATH +export GHC_PACKAGE_PATH=$packages_db # Env hook to add packages to the package config -addLibToPackageConf () -{ - local regscript=$1/nix-support/register-ghclib.sh - if test -f $regscript; then - local oldpath=$PATH - export PATH=$ghc_support:$PATH - sh $regscript $package_db - export PATH=$oldpath +addLibToPackageConf () { + local confFile=$1/nix-support/ghc-package.conf + if test -f $confFile; then + @ghc@/bin/ghc-pkg register $confFile fi } diff --git a/pkgs/development/libraries/haskell/cabal/cabal.nix b/pkgs/development/libraries/haskell/cabal/cabal.nix index bafcedced63..d46787b8630 100644 --- a/pkgs/development/libraries/haskell/cabal/cabal.nix +++ b/pkgs/development/libraries/haskell/cabal/cabal.nix @@ -78,16 +78,10 @@ attrs : eval "$preInstall" ./Setup copy - ./Setup register --gen-script - mkdir -p $out/nix-support - if test -f register.sh; then - sed -i 's/|.*\(ghc-pkg update\)/| \1/' register.sh - cp register.sh $out/nix-support/register-ghclib.sh - sed -i 's/\(ghc-pkg update\)/\1 --user/' register.sh - mkdir -p $out/bin - cp register.sh $out/bin/register-${self.name}.sh - fi + ensureDir $out/nix-support + ./Setup register --gen-pkg-config=$out/nix-support/ghc-package.conf + eval "$postInstall" ''; }; diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 7e599a5acde..31200d6bd8b 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -113,8 +113,8 @@ rec { # Compilers. ehc = import ../development/compilers/ehc { - inherit ghc; - inherit (pkgs) fetchsvn stdenv coreutils m4 libtool uulib uuagc llvm; + inherit ghc uulib uuagc; + inherit (pkgs) fetchsvn stdenv coreutils m4 libtool llvm; }; diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 9bfb1d65109..a2601c14ce0 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -293,7 +293,6 @@ in { wget = all; wine = ["i686-linux"]; wirelesstools = linux; - wxHaskell = linux; x11_ssh_askpass = linux; xchm = linux; xfig = x11Supported; From 37f707fd9292ba434d4b53b02ae5ba8d4722310a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 18 Apr 2009 15:42:59 +0000 Subject: [PATCH 38/38] * Removed Darcs 1.x. * Updated Darcs to 2.2.1 and switched to the Cabal builder. However, there are some dependencies missing that Andres will add :-) svn path=/nixpkgs/trunk/; revision=15128 --- .../version-management/darcs/darcs-2.nix | 19 ++++++++-------- .../version-management/darcs/default.nix | 22 ------------------- pkgs/top-level/all-packages.nix | 19 ++-------------- pkgs/top-level/haskell-packages.nix | 4 ++++ 4 files changed, 15 insertions(+), 49 deletions(-) delete mode 100644 pkgs/applications/version-management/darcs/default.nix diff --git a/pkgs/applications/version-management/darcs/darcs-2.nix b/pkgs/applications/version-management/darcs/darcs-2.nix index be68791cd2d..3de6bbfeea7 100644 --- a/pkgs/applications/version-management/darcs/darcs-2.nix +++ b/pkgs/applications/version-management/darcs/darcs-2.nix @@ -1,19 +1,18 @@ -{stdenv, fetchurl, ghc, zlib, ncurses, curl, perl}: +{cabal /* , ghc, zlib, ncurses, curl, perl */}: -stdenv.mkDerivation { - name = "darcs-2.1.0"; - src = fetchurl { - url = http://www.darcs.net/darcs-2.1.0.tar.gz; - sha256 = "d5a63e62bceb45905163d508c6b25158dab6aca367015566d8c539ec37107ab4"; - }; +cabal.mkDerivation (self : { + pname = "darcs"; + version = "2.2.1"; + sha256 = "0iy4d4qls6yhwmgv87pz4kmr5jh4bwigz1wfwzns71b68csynnsp"; - buildInputs = [ghc zlib ncurses curl perl]; + #buildInputs = [ghc zlib ncurses curl perl]; - NIX_LDFLAGS = "-lz"; + #NIX_LDFLAGS = "-lz"; meta = { + homepage = http://darcs.net/; description = "Patch-based version management system"; }; patches = ./bash-completion.patch; # I didn't have "have" -} +}) diff --git a/pkgs/applications/version-management/darcs/default.nix b/pkgs/applications/version-management/darcs/default.nix deleted file mode 100644 index 336d37ad2c8..00000000000 --- a/pkgs/applications/version-management/darcs/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{stdenv, fetchurl, ghc, zlib, ncurses, curl, getConfig}: - -# you really should consider using darcs2 and updating your darcs-1 repos .. -# many performance improvements have been made if you use the darcs-2 or hashed format -# (darcs-2 is default now when runnig darcs 2.1.0) -# lookup darcs convert and make sure you understand the one way conversion.. -assert getConfig ["darcs" "IreallyWantDarcsOne"] false; - -stdenv.mkDerivation { - name = "darcs-1.0.9"; - src = fetchurl { - url = http://www.darcs.net/darcs-1.0.9.tar.gz; - sha256 = "a5fe4d5a743d8052d6cbfcea480a44593f821afd8a42e6d6d4ae37d40ed23cd8"; - }; - buildInputs = [ghc zlib ncurses curl]; - - NIX_LDFLAGS = "-lz"; - - meta = { - description = "Patch-based version management system"; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c8f3110055a..8783db0b82a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -250,13 +250,6 @@ let inherit stdenv darcs nix; }; - # only temporarely / don't know yet wether it's save to switch - # but I have trouble getting HAppS repos - fetchdarcs2 = import ../build-support/fetchdarcs { - inherit stdenv nix; - darcs = darcs2; - }; - fetchsvn = import ../build-support/fetchsvn { inherit stdenv subversion openssh; sshSupport = true; @@ -2305,7 +2298,7 @@ let */ bleedingEdgeRepos = import ../development/misc/bleeding-edge-repos { - inherit getConfig fetchdarcs2 fetchurl lib; + inherit getConfig fetchurl lib; }; ecj = import ../development/eclipse/ecj { @@ -7932,15 +7925,7 @@ let inherit (gtkLibs) gtk glib; }; - darcs = import ../applications/version-management/darcs { - inherit fetchurl stdenv zlib ncurses curl getConfig; - ghc = ghc661; - }; - - # some speed bottle necks are resolved in this version I think .. perhaps you like to try it? - darcs2 = import ../applications/version-management/darcs/darcs-2.nix { - inherit fetchurl stdenv zlib ncurses curl ghc perl; - }; + darcs = haskellPackages.darcs; dia = import ../applications/graphics/dia { inherit stdenv fetchurl pkgconfig perl perlXMLParser diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 31200d6bd8b..5bb225e52ef 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -143,6 +143,10 @@ rec { # Applications. + darcs = import ../applications/version-management/darcs/darcs-2.nix { + inherit cabal; + }; + xmobar = import ../applications/misc/xmobar { inherit cabal; inherit (pkgs) X11;