From ff8e06d4ccfbb6913ddd6406e5e3ec42651f5862 Mon Sep 17 00:00:00 2001 From: Rok Garbas Date: Sat, 26 Oct 2013 19:15:57 +0200 Subject: [PATCH 1/9] redshift: update to 1.8 and fix redshift-gtk script --- pkgs/applications/misc/redshift/default.nix | 36 +++++++++++++++------ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/misc/redshift/default.nix b/pkgs/applications/misc/redshift/default.nix index e9fe255aea83..ce7506672a5d 100644 --- a/pkgs/applications/misc/redshift/default.nix +++ b/pkgs/applications/misc/redshift/default.nix @@ -1,18 +1,34 @@ -{ fetchurl, stdenv, - libX11, libXrandr, libXxf86vm, libxcb, pkgconfig, python, - randrproto, xcbutil, xf86vidmodeproto }: +{ fetchurl, stdenv, libX11, libXrandr, libXxf86vm, libxcb, pkgconfig, python +, randrproto, xcbutil, xf86vidmodeproto, autoconf, automake, gettext, glib +, GConf, dbus, dbus_glib, makeWrapper, gtk, pygtk, pyxdg }: stdenv.mkDerivation rec { - pname = "redshift"; - version = "1.7"; - name = "${pname}-${version}"; + version = "1.8"; + name = "redshift-${version}"; src = fetchurl { - url = "http://launchpad.net/${pname}/trunk/${version}/+download/${pname}-${version}.tar.bz2"; - sha256 = "1j0hs0vnlic90cf4bryn11n4ani1x2s5l8z6ll3fmrlw98ykrylv"; + url = "https://github.com/jonls/redshift/archive/v${version}.tar.gz"; + sha256 = "1srj2dwy32h71iqikb4ysv5ipclym80i9lys2ns8vjmclg7hj3vi"; }; - buildInputs = [ libX11 libXrandr libXxf86vm libxcb pkgconfig python - randrproto xcbutil xf86vidmodeproto ]; + buildInputs = [ + libX11 libXrandr libXxf86vm libxcb pkgconfig python randrproto xcbutil + xf86vidmodeproto autoconf automake gettext glib GConf dbus dbus_glib + makeWrapper gtk pygtk pyxdg + # TODO: + # geoclue + ]; + + preConfigure = '' + ./bootstrap + ''; + + preInstall = '' + substituteInPlace src/redshift-gtk/redshift-gtk python --replace "/usr/bin/env python" "${python}/bin/${python.executable}" + ''; + + postInstall = '' + wrapProgram "$out/bin/redshift-gtk" --prefix PYTHONPATH : $PYTHONPATH:${pygtk}/lib/${python.libPrefix}/site-packages/gtk-2.0:${pyxdg}/lib/${python.libPrefix}/site-packages/pyxdg:$out/lib/${python.libPrefix}/site-packages + ''; meta = { description = "changes the color temperature of your screen gradually"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 312657d466e5..7c887799c32e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9603,6 +9603,8 @@ let redshift = callPackage ../applications/misc/redshift { inherit (xorg) libX11 libXrandr libxcb randrproto libXxf86vm xf86vidmodeproto; + inherit (gnome) GConf; + inherit (pythonPackages) pyxdg; }; oxygen_gtk = callPackage ../misc/themes/gtk2/oxygen-gtk { }; From f17ba15f418d0fc3e9adcb9c05acb510f9fad57c Mon Sep 17 00:00:00 2001 From: Evgeny Egorochkin Date: Sun, 27 Oct 2013 06:24:25 +0200 Subject: [PATCH 2/9] microcode-intel: update to 20130906 --- pkgs/os-specific/linux/microcode/intel.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/microcode/intel.nix b/pkgs/os-specific/linux/microcode/intel.nix index ad7cea180846..d96a49436251 100644 --- a/pkgs/os-specific/linux/microcode/intel.nix +++ b/pkgs/os-specific/linux/microcode/intel.nix @@ -1,13 +1,13 @@ { stdenv, fetchurl, microcode2ucode }: -let version = "20130808"; in +let version = "20130906"; in stdenv.mkDerivation { name = "microcode-intel-${version}"; src = fetchurl { - url = "http://downloadmirror.intel.com/23082/eng/microcode-${version}.tgz"; - sha256 = "19v0059v6dxv7ly57wgqy9nkjjnmprgwz4s94khdf213k5vikpfm"; + url = "http://downloadmirror.intel.com/23166/eng/microcode-${version}.tgz"; + sha256 = "11k327icvijadq2zkgkc3sqwzraip9cviqm25566g09523ds0svv"; }; buildInputs = [ microcode2ucode ]; From e329bb7877bb9b477eccba46da2f815400d41502 Mon Sep 17 00:00:00 2001 From: Vladimir Still Date: Sat, 26 Oct 2013 23:12:07 +0200 Subject: [PATCH 3/9] maintainers: add vlstill. --- lib/maintainers.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 06c71b2b7ac8..7f84e11e561c 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -59,6 +59,7 @@ vcunat = "Vladimír Čunát "; viric = "Lluís Batlle i Rossell "; vizanto = "Danny Wilson "; + vlstill = "Vladimír Štill "; winden = "Antonio Vargas Gonzalez "; z77z = "Marco Maggesi "; zef = "Zef Hemel "; From 2dfe8e7a7d5c5255949e163cfea6632e8d1fedd6 Mon Sep 17 00:00:00 2001 From: "Jason \\\"Don\\\" O'Conal" Date: Sat, 26 Oct 2013 22:25:42 +0000 Subject: [PATCH 4/9] gpicview: add expression 0.2.4 close #1123. --- .../graphics/gpicview/default.nix | 21 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/applications/graphics/gpicview/default.nix diff --git a/pkgs/applications/graphics/gpicview/default.nix b/pkgs/applications/graphics/gpicview/default.nix new file mode 100644 index 000000000000..4d01bbd126b3 --- /dev/null +++ b/pkgs/applications/graphics/gpicview/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, intltool, pkgconfig, gtk2 }: + +stdenv.mkDerivation { + name = "gpicview-0.2.4"; + + src = fetchurl { + url = "mirror://sourceforge/lxde/gpicview-0.2.4.tar.gz"; + sha256 = "1svcy1c8bgk0pl12yhyv16h2fl52x5vzzcv57z6qdcv5czgvgglr"; + }; + + meta = with stdenv.lib; { + description = "A simple and fast image viewer for X"; + homepage = http://lxde.sourceforge.net/gpicview/; + repositories.git = git://lxde.git.sourceforge.net/gitroot/lxde/gpicview; + license = licenses.gpl2; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.unix; + }; + + buildInputs = [ intltool pkgconfig gtk2 ]; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7c887799c32e..13dd923c96a0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7775,6 +7775,8 @@ let goldendict = callPackage ../applications/misc/goldendict { }; + gpicview = callPackage ../applications/graphics/gpicview { }; + grass = import ../applications/misc/grass { inherit (xlibs) libXmu libXext libXp libX11 libXt libSM libICE libXpm libXaw libXrender; From 6dcca9e096c16e031de7f45e6e99d4db4a0a2fd8 Mon Sep 17 00:00:00 2001 From: "Jason \\\"Don\\\" O'Conal" Date: Sat, 26 Oct 2013 11:22:32 +0000 Subject: [PATCH 5/9] perlPackages.FileMimeInfo: add expression. Close #1124. --- pkgs/top-level/perl-packages.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 6f1ddd226e1d..90058aec2426 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -3396,6 +3396,15 @@ rec { propagatedBuildInputs = [ HTTPDate ]; }; + FileMimeInfo = buildPerlPackage { + name = "File-MimeInfo-0.20"; + src = fetchurl { + url = "http://search.cpan.org/CPAN/authors/id/M/MI/MICHIELB/File-MimeInfo-0.20.tar.gz"; + sha256 = "1738yi3a0xcbvffqymjb6cyh999q4pryalfwbkmdbjdks2y0bxz0"; + }; + propagatedBuildInputs = [ FileBaseDir FileDesktopEntry ]; + }; + FileModified = buildPerlPackage { name = "File-Modified-0.07"; src = fetchurl { From 9cb699f587c8e3940aa3d014edd970a933b0027d Mon Sep 17 00:00:00 2001 From: Evgeny Egorochkin Date: Sun, 27 Oct 2013 08:39:32 +0200 Subject: [PATCH 6/9] nixos manual: replace /etc/nixos/nixos which no longer exists with more generic and more correct /path/to/nixpkgs/nixos --- nixos/doc/manual/development.xml | 20 ++++++++++---------- nixos/doc/manual/man-nixos-option.xml | 8 ++++---- nixos/doc/manual/man-nixos-rebuild.xml | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/nixos/doc/manual/development.xml b/nixos/doc/manual/development.xml index 7b4e6df5f878..dbaa2c4213d9 100644 --- a/nixos/doc/manual/development.xml +++ b/nixos/doc/manual/development.xml @@ -250,7 +250,7 @@ let in { - imports = [ /etc/nixos/nixos/modules/services/scheduling/cron.nix ]; + imports = [ /path/to/nixpkgs/nixos/modules/services/scheduling/cron.nix ]; options = { services.locate = { @@ -307,10 +307,10 @@ in -$ nix-build /etc/nixos/nixos -A attr +$ nix-build /path/to/nixpkgs/nixos -A attr where attr is an attribute in -/etc/nixos/nixos/default.nix. Attributes of interest include: +/path/to/nixpkgs/nixos/default.nix. Attributes of interest include: @@ -344,7 +344,7 @@ Most parts of NixOS can be built through the config attribute set. This attribute set allows you to have a view of the merged option definitions and all its derivations. Important derivations are store inside the option and can be listed with the -command nix-instantiate --xml --eval-only /etc/nixos/nixos -A +command nix-instantiate --xml --eval-only /path/to/nixpkgs/nixos -A config.system.build @@ -368,8 +368,8 @@ you have to set NIXOS_CONFIG before running nix-build to build the ISO. -$ export NIXOS_CONFIG=/etc/nixos/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix -$ nix-build /etc/nixos/nixos -A config.system.build.isoImage +$ export NIXOS_CONFIG=/path/to/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix +$ nix-build /path/to/nixpkgs/nixos -A config.system.build.isoImage @@ -413,8 +413,8 @@ tedious, so here is a quick way to see if the installer works properly: -$ export NIXOS_CONFIG=/etc/nixos/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix -$ nix-build /etc/nixos/nixos -A config.system.build.nixos-install +$ export NIXOS_CONFIG=/path/to/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix +$ nix-build /path/to/nixpkgs/nixos -A config.system.build.nixos-install $ dd if=/dev/zero of=diskimage seek=2G count=0 bs=1 $ yes | mke2fs -j diskimage $ mount -o loop diskimage /mnt @@ -437,8 +437,8 @@ boot correctly is to use QEMU’s and options: -$ nix-build /etc/nixos/nixos -A config.system.build.initialRamdisk -o initrd -$ nix-build /etc/nixos/nixos -A config.system.build.kernel -o kernel +$ nix-build /path/to/nixpkgs/nixos -A config.system.build.initialRamdisk -o initrd +$ nix-build /path/to/nixpkgs/nixos -A config.system.build.kernel -o kernel $ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/null diff --git a/nixos/doc/manual/man-nixos-option.xml b/nixos/doc/manual/man-nixos-option.xml index bd180363e70d..7952847d4db5 100644 --- a/nixos/doc/manual/man-nixos-option.xml +++ b/nixos/doc/manual/man-nixos-option.xml @@ -120,10 +120,10 @@ Declared by: /mnt/data/nix-sources/nixos/modules/services/hardware/udev.nix Defined by: - /etc/nixos/nixos/modules/system/boot/kernel.nix - /etc/nixos/nixos/modules/hardware/network/rt73.nix - /etc/nixos/nixos/modules/hardware/network/intel-3945abg.nix - /etc/nixos/nixos/modules/hardware/network/intel-2200bg.nix + /path/to/nixpkgs/nixos/modules/system/boot/kernel.nix + /path/to/nixpkgs/nixos/modules/hardware/network/rt73.nix + /path/to/nixpkgs/nixos/modules/hardware/network/intel-3945abg.nix + /path/to/nixpkgs/nixos/modules/hardware/network/intel-2200bg.nix diff --git a/nixos/doc/manual/man-nixos-rebuild.xml b/nixos/doc/manual/man-nixos-rebuild.xml index e08153c723d9..afc159dbd5d7 100644 --- a/nixos/doc/manual/man-nixos-rebuild.xml +++ b/nixos/doc/manual/man-nixos-rebuild.xml @@ -106,7 +106,7 @@ desired operation. It must be one of the following: points to the output of the top-level “system” derivation. This is essentially the same as doing -$ nix-build /etc/nixos/nixos -A system +$ nix-build /path/to/nixpkgs/nixos -A system Note that you do not need to be root to run nixos-rebuild build. From 5580abd60a4b7f0ee7d4354ceb5a7281dd6ab305 Mon Sep 17 00:00:00 2001 From: Evgeny Egorochkin Date: Sun, 27 Oct 2013 08:53:47 +0200 Subject: [PATCH 7/9] nixos manual: fix references to obsolete nixos repository --- nixos/doc/manual/development.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nixos/doc/manual/development.xml b/nixos/doc/manual/development.xml index dbaa2c4213d9..775143cc8351 100644 --- a/nixos/doc/manual/development.xml +++ b/nixos/doc/manual/development.xml @@ -30,12 +30,11 @@ or $ mkdir -p /my/sources $ cd /my/sources $ nix-env -i git -$ git clone git://github.com/NixOS/nixos.git $ git clone git://github.com/NixOS/nixpkgs.git This will check out the latest NixOS sources to -/my/sources/nixos and +/my/sources/nixpkgs/nixos and the Nixpkgs sources to /my/sources/nixpkgs. If you want to rebuild your system using your (modified) sources, you @@ -43,7 +42,7 @@ need to tell nixos-rebuild about them using the flag: -$ nixos-rebuild switch -I /my/sources +$ nixos-rebuild switch -I /my/sources/nixpkgs From d64917ad17277b8e16893ee31533ec2e33446fa7 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sat, 26 Oct 2013 18:33:09 +0200 Subject: [PATCH 8/9] Back-port Haskell-related improvements from stdenv-updates. * There now is full support for building Haskell packages as shared libraries for GHC versions 7.4.2 or later. The Cabal builder recognizes the following attributes: - enableSharedLibraries configures Cabal to build of shared libraries in addition to static ones. This option requires that all dependencies of the package have been compiled for use in shared libraries, too. - enableSharedExecutables configures Cabal to prefer shared libraries when linking executables. The default values for these attributes are arguments to the haskellPackages expression. * Haskell builds now run in a LANG="en_US.UTF-8" environment to avoid plenty of build and test suite errors. Without this setting, GHC seems unable to deal with the UTF-8 character encoding that's generally considered standard in the Haskell world. * The Cabal builder supports a new attribute 'testTarget' to specify the exact set of tests to be run during the check phase. * The ghc-wrapper attribute ghcVersion has been removed. Instead, we use the ghc.version attribute, which exists in unwrapped GHC derivations, too. --- pkgs/build-support/cabal/default.nix | 93 ++++++++---- .../compilers/ghc/6.10.1-binary.nix | 4 +- .../compilers/ghc/6.10.2-binary.nix | 4 +- .../compilers/ghc/6.12.1-binary.nix | 4 +- .../compilers/ghc/7.0.4-binary.nix | 4 +- .../compilers/ghc/7.4.2-binary.nix | 4 +- pkgs/development/compilers/ghc/7.4.2.nix | 1 + pkgs/development/compilers/ghc/7.6.3.nix | 5 +- pkgs/development/compilers/ghc/head.nix | 1 + .../compilers/ghc/with-packages.nix | 141 ++++-------------- pkgs/development/compilers/ghc/wrapper.nix | 96 +++++++----- pkgs/development/compilers/uhc/default.nix | 2 +- .../haskell/bytestring-progress/default.nix | 1 - .../libraries/haskell/dns/default.nix | 2 +- .../libraries/haskell/ghc-mod/default.nix | 2 +- .../haskell/modular-arithmetic/default.nix | 1 - .../libraries/haskell/multirec/default.nix | 1 - .../libraries/haskell/wxHaskell/wxc.nix | 1 - .../tools/documentation/haddock/2.7.2.nix | 2 +- .../tools/documentation/haddock/2.9.2.nix | 2 +- pkgs/top-level/haskell-packages.nix | 24 ++- 21 files changed, 184 insertions(+), 211 deletions(-) diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix index ca985181a532..9b6d8c4e80ed 100644 --- a/pkgs/build-support/cabal/default.nix +++ b/pkgs/build-support/cabal/default.nix @@ -1,12 +1,29 @@ # generic builder for Cabal packages -{ stdenv, fetchurl, lib, pkgconfig, ghc, Cabal, jailbreakCabal +{ stdenv, fetchurl, lib, pkgconfig, ghc, Cabal, jailbreakCabal, glibcLocales , enableLibraryProfiling ? false -, enableCheckPhase ? true +, enableSharedLibraries ? false +, enableSharedExecutables ? false +, enableCheckPhase ? stdenv.lib.versionOlder "7.4" ghc.version }: -# The Cabal library shipped with GHC versions older than 7.x doesn't accept the --enable-tests configure flag. -assert enableCheckPhase -> stdenv.lib.versionOlder "7" ghc.ghcVersion; +let + enableFeature = stdenv.lib.enableFeature; + versionOlder = stdenv.lib.versionOlder; + optional = stdenv.lib.optional; + optionals = stdenv.lib.optionals; + optionalString = stdenv.lib.optionalString; + filter = stdenv.lib.filter; +in + +# Cabal shipped with GHC 6.12.4 or earlier doesn't know the "--enable-tests configure" flag. +assert enableCheckPhase -> versionOlder "7" ghc.version; + +# GHC prior to 7.4.x doesn't know the "--enable-executable-dynamic" flag. +assert enableSharedExecutables -> versionOlder "7.4" ghc.version; + +# Our GHC 6.10.x builds do not provide sharable versions of their core libraries. +assert enableSharedLibraries -> versionOlder "6.12" ghc.version; { mkDerivation = @@ -23,8 +40,8 @@ assert enableCheckPhase -> stdenv.lib.versionOlder "7" ghc.ghcVersion; # in the interest of keeping hashes stable. postprocess = x : (removeAttrs x internalAttrs) // { - buildInputs = stdenv.lib.filter (y : ! (y == null)) x.buildInputs; - propagatedBuildInputs = stdenv.lib.filter (y : ! (y == null)) x.propagatedBuildInputs; + buildInputs = filter (y : ! (y == null)) x.buildInputs; + propagatedBuildInputs = filter (y : ! (y == null)) x.propagatedBuildInputs; doCheck = enableCheckPhase && x.doCheck; }; @@ -42,8 +59,12 @@ assert enableCheckPhase -> stdenv.lib.versionOlder "7" ghc.ghcVersion; # if that is not desired (for applications), name can be set to # fname. name = if self.isLibrary then - if enableLibraryProfiling then + if enableLibraryProfiling && self.enableSharedLibraries then + "haskell-${self.pname}-ghc${ghc.ghc.version}-${self.version}-profiling-shared" + else if enableLibraryProfiling && !self.enableSharedLibraries then "haskell-${self.pname}-ghc${ghc.ghc.version}-${self.version}-profiling" + else if !enableLibraryProfiling && self.enableSharedLibraries then + "haskell-${self.pname}-ghc${ghc.ghc.version}-${self.version}-shared" else "haskell-${self.pname}-ghc${ghc.ghc.version}-${self.version}" else @@ -63,7 +84,7 @@ assert enableCheckPhase -> stdenv.lib.versionOlder "7" ghc.ghcVersion; # but often propagatedBuildInputs is preferable anyway buildInputs = [ghc Cabal] ++ self.extraBuildInputs; extraBuildInputs = self.buildTools ++ - (stdenv.lib.optionals self.doCheck self.testDepends) ++ + (optionals self.doCheck self.testDepends) ++ (if self.pkgconfigDepends == [] then [] else [pkgconfig]) ++ (if self.isLibrary then [] else self.buildDepends ++ self.extraLibraries ++ self.pkgconfigDepends); @@ -80,6 +101,9 @@ assert enableCheckPhase -> stdenv.lib.versionOlder "7" ghc.ghcVersion; # build-depends Cabal fields stated in test-suite stanzas testDepends = []; + # target(s) passed to the cabal test phase as an argument + testTarget = ""; + # build-tools Cabal field buildTools = []; @@ -96,42 +120,61 @@ assert enableCheckPhase -> stdenv.lib.versionOlder "7" ghc.ghcVersion; jailbreak = false; # pass the '--enable-split-objs' flag to cabal in the configure stage - enableSplitObjs = !( stdenv.isDarwin # http://hackage.haskell.org/trac/ghc/ticket/4013 - || stdenv.lib.versionOlder "7.6.99" ghc.ghcVersion # -fsplit-ojbs is broken in 7.7 snapshot + enableSplitObjs = !( stdenv.isDarwin # http://hackage.haskell.org/trac/ghc/ticket/4013 + || versionOlder "7.6.99" ghc.version # -fsplit-ojbs is broken in 7.7 snapshot ); # pass the '--enable-tests' flag to cabal in the configure stage # and run any regression test suites the package might have doCheck = enableCheckPhase; + # pass the '--enable-shared' flag to cabal in the configure + # stage to enable building shared libraries + inherit enableSharedLibraries; + + # pass the '--enable-executable-dynamic' flag to cabal in + # the configure stage to enable linking shared libraries + inherit enableSharedExecutables; + extraConfigureFlags = [ - (stdenv.lib.enableFeature enableLibraryProfiling "library-profiling") - (stdenv.lib.enableFeature self.enableSplitObjs "split-objs") - ] ++ stdenv.lib.optional (stdenv.lib.versionOlder "7" ghc.ghcVersion) (stdenv.lib.enableFeature self.doCheck "tests"); + (enableFeature self.enableSplitObjs "split-objs") + (enableFeature enableLibraryProfiling "library-profiling") + (enableFeature self.enableSharedLibraries "shared") + (optional (versionOlder "7.4" ghc.version) (enableFeature self.enableSharedExecutables "executable-dynamic")) + (optional (versionOlder "7" ghc.version) (enableFeature self.doCheck "tests")) + ]; + + # GHC needs the locale configured during the Haddock phase. + LANG = "en_US.UTF-8"; + LOCALE_ARCHIVE = optionalString stdenv.isLinux "${glibcLocales}/lib/locale/locale-archive"; # compiles Setup and configures configurePhase = '' eval "$preConfigure" - ${lib.optionalString self.jailbreak "${jailbreakCabal}/bin/jailbreak-cabal ${self.pname}.cabal"} + ${optionalString self.jailbreak "${jailbreakCabal}/bin/jailbreak-cabal ${self.pname}.cabal"} for i in Setup.hs Setup.lhs; do test -f $i && ghc --make $i done for p in $extraBuildInputs $propagatedNativeBuildInputs; do + if [ -d "$p/lib/ghc-${ghc.ghc.version}/package.conf.d" ]; then + # Haskell packages don't need any extra configuration. + continue; + fi if [ -d "$p/include" ]; then - extraConfigureFlags+=" --extra-include-dir=$p/include" + extraConfigureFlags+=" --extra-include-dirs=$p/include" fi for d in lib{,64}; do if [ -d "$p/$d" ]; then - extraConfigureFlags+=" --extra-lib-dir=$p/$d" + extraConfigureFlags+=" --extra-lib-dirs=$p/$d" fi done done echo "configure flags: $extraConfigureFlags $configureFlags" - ./Setup configure --verbose --prefix="$out" $extraConfigureFlags $configureFlags + ./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' --libsubdir='$pkgid' $extraConfigureFlags $configureFlags eval "$postConfigure" ''; @@ -142,16 +185,16 @@ assert enableCheckPhase -> stdenv.lib.versionOlder "7" ghc.ghcVersion; ./Setup build - export GHC_PACKAGE_PATH=$(ghc-packages) - [ -n "$noHaddock" ] || ./Setup haddock + export GHC_PACKAGE_PATH=$(${ghc.GHCPackages}) + test -n "$noHaddock" || ./Setup haddock eval "$postBuild" ''; - checkPhase = stdenv.lib.optional self.doCheck '' + checkPhase = optional self.doCheck '' eval "$preCheck" - ./Setup test + ./Setup test ${self.testTarget} eval "$postCheck" ''; @@ -166,7 +209,7 @@ assert enableCheckPhase -> stdenv.lib.versionOlder "7" ghc.ghcVersion; ensureDir $out/bin # necessary to get it added to PATH - local confDir=$out/lib/ghc-pkgs/ghc-${ghc.ghc.version} + local confDir=$out/lib/ghc-${ghc.ghc.version}/package.conf.d local installedPkgConf=$confDir/${self.fname}.installedconf local pkgConf=$confDir/${self.fname}.conf ensureDir $confDir @@ -176,13 +219,11 @@ assert enableCheckPhase -> stdenv.lib.versionOlder "7" ghc.ghcVersion; GHC_PACKAGE_PATH=$installedPkgConf ghc-pkg --global register $pkgConf --force fi - eval "$postInstall" - ''; - - postFixup = '' if test -f $out/nix-support/propagated-native-build-inputs; then ln -s $out/nix-support/propagated-native-build-inputs $out/nix-support/propagated-user-env-packages fi + + eval "$postInstall" ''; # We inherit stdenv and ghc so that they can be used diff --git a/pkgs/development/compilers/ghc/6.10.1-binary.nix b/pkgs/development/compilers/ghc/6.10.1-binary.nix index dd79ef9c8e75..e7d4d3c1946f 100644 --- a/pkgs/development/compilers/ghc/6.10.1-binary.nix +++ b/pkgs/development/compilers/ghc/6.10.1-binary.nix @@ -36,10 +36,10 @@ stdenv.mkDerivation rec { '' mkdir "$TMP/bin" for i in strip; do - echo '#!/bin/sh' >> "$TMP/bin/$i" + echo '#! ${stdenv.shell}' > "$TMP/bin/$i" chmod +x "$TMP/bin/$i" - PATH="$TMP/bin:$PATH" done + PATH="$TMP/bin:$PATH" '' + # On Linux, use patchelf to modify the executables so that they can # find editline/gmp. diff --git a/pkgs/development/compilers/ghc/6.10.2-binary.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix index 7effff83c69a..5af89e38c21f 100644 --- a/pkgs/development/compilers/ghc/6.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/6.10.2-binary.nix @@ -30,10 +30,10 @@ stdenv.mkDerivation rec { '' mkdir "$TMP/bin" for i in strip; do - echo '#!/bin/sh' >> "$TMP/bin/$i" + echo '#! ${stdenv.shell}' > "$TMP/bin/$i" chmod +x "$TMP/bin/$i" - PATH="$TMP/bin:$PATH" done + PATH="$TMP/bin:$PATH" '' + # On Linux, use patchelf to modify the executables so that they can # find editline/gmp. diff --git a/pkgs/development/compilers/ghc/6.12.1-binary.nix b/pkgs/development/compilers/ghc/6.12.1-binary.nix index 6f3411da4af6..da4658c3829e 100644 --- a/pkgs/development/compilers/ghc/6.12.1-binary.nix +++ b/pkgs/development/compilers/ghc/6.12.1-binary.nix @@ -28,10 +28,10 @@ stdenv.mkDerivation rec { '' mkdir "$TMP/bin" for i in strip; do - echo '#!/bin/sh' >> "$TMP/bin/$i" + echo '#! ${stdenv.shell}' > "$TMP/bin/$i" chmod +x "$TMP/bin/$i" - PATH="$TMP/bin:$PATH" done + PATH="$TMP/bin:$PATH" '' + # We have to patch the GMP paths for the integer-gmp package. '' diff --git a/pkgs/development/compilers/ghc/7.0.4-binary.nix b/pkgs/development/compilers/ghc/7.0.4-binary.nix index 455d552b91ac..2c9b11f2b654 100644 --- a/pkgs/development/compilers/ghc/7.0.4-binary.nix +++ b/pkgs/development/compilers/ghc/7.0.4-binary.nix @@ -38,10 +38,10 @@ stdenv.mkDerivation rec { '' mkdir "$TMP/bin" for i in strip; do - echo '#!/bin/sh' >> "$TMP/bin/$i" + echo '#! ${stdenv.shell}' > "$TMP/bin/$i" chmod +x "$TMP/bin/$i" - PATH="$TMP/bin:$PATH" done + PATH="$TMP/bin:$PATH" '' + # We have to patch the GMP paths for the integer-gmp package. '' diff --git a/pkgs/development/compilers/ghc/7.4.2-binary.nix b/pkgs/development/compilers/ghc/7.4.2-binary.nix index 59eb957a45f4..7000081e5dbe 100644 --- a/pkgs/development/compilers/ghc/7.4.2-binary.nix +++ b/pkgs/development/compilers/ghc/7.4.2-binary.nix @@ -38,10 +38,10 @@ stdenv.mkDerivation rec { '' mkdir "$TMP/bin" for i in strip; do - echo '#!/bin/sh' >> "$TMP/bin/$i" + echo '#! ${stdenv.shell}' > "$TMP/bin/$i" chmod +x "$TMP/bin/$i" - PATH="$TMP/bin:$PATH" done + PATH="$TMP/bin:$PATH" '' + # We have to patch the GMP paths for the integer-gmp package. '' diff --git a/pkgs/development/compilers/ghc/7.4.2.nix b/pkgs/development/compilers/ghc/7.4.2.nix index 51f3f7f9df4b..0bc2a8553069 100644 --- a/pkgs/development/compilers/ghc/7.4.2.nix +++ b/pkgs/development/compilers/ghc/7.4.2.nix @@ -22,6 +22,7 @@ stdenv.mkDerivation rec { preConfigure = '' echo "${buildMK}" > mk/build.mk sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure + export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}" ''; configureFlags=[ diff --git a/pkgs/development/compilers/ghc/7.6.3.nix b/pkgs/development/compilers/ghc/7.6.3.nix index dc3a912a34ac..427d21660b89 100644 --- a/pkgs/development/compilers/ghc/7.6.3.nix +++ b/pkgs/development/compilers/ghc/7.6.3.nix @@ -22,11 +22,10 @@ stdenv.mkDerivation rec { preConfigure = '' echo "${buildMK}" > mk/build.mk sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure + export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}" ''; - configureFlags = [ - "--with-gcc=${stdenv.gcc}/bin/gcc" - ]; + configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc"; # required, because otherwise all symbols from HSffi.o are stripped, and # that in turn causes GHCi to abort diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index c9cd71fc2b51..37bcde172324 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -22,6 +22,7 @@ stdenv.mkDerivation rec { preConfigure = '' echo "${buildMK}" > mk/build.mk sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure + export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}" ''; configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc"; diff --git a/pkgs/development/compilers/ghc/with-packages.nix b/pkgs/development/compilers/ghc/with-packages.nix index e3cc71bbccfd..979b24805868 100644 --- a/pkgs/development/compilers/ghc/with-packages.nix +++ b/pkgs/development/compilers/ghc/with-packages.nix @@ -1,127 +1,42 @@ -{stdenv, ghc, packages ? [], makeWrapper}: +{ stdenv, ghc, packages, buildEnv, makeWrapper }: -stdenv.mkDerivation rec { +assert packages != []; + +let + ghc761OrLater = stdenv.lib.versionOlder "7.6.1" ghc.version; + packageDBFlag = if ghc761OrLater then "--package-db" else "--package-conf"; + libDir = "$out/lib/ghc-${ghc.version}"; + packageCfgDir = "${libDir}/package.conf.d"; +in +buildEnv { name = "haskell-env-${ghc.name}"; - - allPackages = stdenv.lib.closePropagation packages; - buildInputs = allPackages ++ [makeWrapper]; - propagatedBuildInputs = packages; - - unpackPhase = "true"; - - installPhase = '' - numversion=$(${ghc}/bin/ghc --numeric-version) - majorversion=''${numversion%%.*} - minorversion=''${numversion#*.} - minorversion=''${minorversion%%.*} - - if [[ $majorversion -gt 6 ]] && [[ $minorversion -gt 4 ]]; then - globalConf="--global-package-db" - else - globalConf="--global-conf" - fi - - originalTopDir="${ghc}/lib/ghc-${ghc.version}" - originalPkgDir="$originalTopDir/package.conf.d" - linkedTopDir="$out/lib" - linkedPkgDir="$linkedTopDir/package.conf.d" - - mkdir -p $out/bin - mkdir -p $linkedTopDir - mkdir -p $linkedPkgDir - - echo "Linking GHC core libraries:" - - echo -n "Linking $originalTopDir " - for f in "$originalTopDir/"*; do - if test -f $f; then - ln -s $f $linkedTopDir - echo -n . - fi - done - echo - - echo -n "Linking $originalPkgDir " - for f in "$originalPkgDir/"*.conf; do - ln -s $f $linkedPkgDir - echo -n . - done - echo - - echo "Linking selected packages and dependencies:" - - for currentPath in ${stdenv.lib.concatStringsSep " " allPackages}; do - currentPkgDir="$currentPath/lib/ghc-pkgs/ghc-${ghc.version}" - # Check if current path is a Cabal package for the current GHC - if test -d $currentPkgDir; then - echo -n "Linking $currentPath " - for f in "$currentPath/bin/"*; do - ln -s $f $out/bin - echo -n . - done - for f in "$currentPath/etc/bash_completion.d/"*; do - mkdir -p $out/etc/bash_completion.d - ln -s $f $out/etc/bash_completion.d/ - echo -n . - done - for s in 1 2 3 4 5 6 7 8 9; do - for f in "$currentPath/share/man/man$s/"*; do - mkdir -p $out/share/man/man$s - ln -sv $f $out/share/man/man$s/ - echo -n . - done - done - for f in "$currentPath/share/emacs/site-lisp/"*; do - mkdir -p $out/share/emacs/site-lisp - ln -s $f $out/share/emacs/site-lisp/ - echo -n . - done - for f in "$currentPath/share/ghci/"*; do - mkdir -p $out/share/ghci - ln -s $f $out/share/ghci/ - echo -n . - done - for f in "$currentPkgDir/"*.conf; do - ln -s $f $linkedPkgDir - echo -n . - done - echo - fi - done - - echo -n "Generating package cache " - ${ghc}/bin/ghc-pkg $globalConf $linkedPkgDir recache - echo . - - echo -n "Generating wrappers " + paths = stdenv.lib.filter (x: x ? ghc) (stdenv.lib.closePropagation (packages ++ [ghc])); + postBuild = '' + . ${makeWrapper}/nix-support/setup-hook for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version}; do - # The NIX env-vars are picked up by our patched version of ghc-paths. - makeWrapper ${ghc}/bin/$prg $out/bin/$prg \ - --add-flags "-B$linkedTopDir" \ - --set "NIX_GHC" "$out/bin/ghc" \ - --set "NIX_GHCPKG" "$out/bin/ghc-pkg" \ - --set "NIX_GHC_LIBDIR" "$linkedTopDir" - echo -n . + rm -f $out/bin/$prg + makeWrapper ${ghc}/bin/$prg $out/bin/$prg \ + --add-flags '"-B$NIX_GHC_LIBDIR"' \ + --set "NIX_GHC" "$out/bin/ghc" \ + --set "NIX_GHCPKG" "$out/bin/ghc-pkg" \ + --set "NIX_GHC_LIBDIR" "${libDir}" done for prg in runghc runhaskell; do - makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "-f $out/bin/ghc" - echo -n . + rm -f $out/bin/$prg + makeWrapper ${ghc}/bin/$prg $out/bin/$prg \ + --add-flags "-f $out/bin/ghc" \ + --set "NIX_GHC" "$out/bin/ghc" \ + --set "NIX_GHCPKG" "$out/bin/ghc-pkg" \ + --set "NIX_GHC_LIBDIR" "${libDir}" done for prg in ghc-pkg ghc-pkg-${ghc.version}; do - makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "$globalConf $linkedPkgDir" - echo -n . + rm -f $out/bin/$prg + makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag} ${packageCfgDir}" done - for prg in hp2ps hpc hasktags hsc2hs haddock haddock-${ghc.version}; do - if test -x ${ghc}/bin/$prg -a ! -x $out/bin/$prg; then - ln -s ${ghc}/bin/$prg $out/bin/$prg && echo -n . - fi - done - echo + $out/bin/ghc-pkg recache ''; - - meta = ghc.meta; } diff --git a/pkgs/development/compilers/ghc/wrapper.nix b/pkgs/development/compilers/ghc/wrapper.nix index 55fd16be5edb..bcfbd49b98a0 100644 --- a/pkgs/development/compilers/ghc/wrapper.nix +++ b/pkgs/development/compilers/ghc/wrapper.nix @@ -1,10 +1,53 @@ -{ stdenv, ghc, makeWrapper, coreutils, forUserEnv ? false }: +{ stdenv, ghc, makeWrapper, coreutils, writeScript }: let ghc761OrLater = !stdenv.lib.versionOlder ghc.version "7.6.1"; packageDBFlag = if ghc761OrLater then "-package-db" else "-package-conf"; + + GHCGetPackages = writeScript "ghc-get-packages.sh" '' + #! ${stdenv.shell} + # Usage: + # $1: version of GHC + # $2: invocation path of GHC + # $3: prefix + version="$1" + if test -z "$3"; then + prefix="${packageDBFlag} " + else + prefix="$3" + fi + PATH="$2:$PATH" + IFS=":" + for p in $PATH; do + PkgDir="$p/../lib/ghc-$version/package.conf.d" + for i in "$PkgDir/"*.installedconf; do + # output takes place here + test -f $i && echo -n " $prefix$i" + done + done + test -f "$2/../lib/ghc-$version/package.conf" && echo -n " $prefix$2/../lib/ghc-$version/package.conf" + ''; + + GHCPackages = writeScript "ghc-packages.sh" '' + #! ${stdenv.shell} -e + declare -A GHC_PACKAGES_HASH # using bash4 hashs to get uniq paths + + for arg in $(${GHCGetPackages} ${ghc.version} "$(dirname $0)"); do + case "$arg" in + ${packageDBFlag}) ;; + *) + CANONICALIZED="$(${coreutils}/bin/readlink -f -- "$arg")" + GHC_PACKAGES_HASH["$CANONICALIZED"]= ;; + esac + done + + for path in ''${!GHC_PACKAGES_HASH[@]}; do + echo -n "$path:" + done + ''; + in -stdenv.mkDerivation ({ +stdenv.mkDerivation { name = "ghc-${ghc.version}-wrapper"; buildInputs = [makeWrapper]; @@ -12,53 +55,32 @@ stdenv.mkDerivation ({ unpackPhase = "true"; installPhase = '' + runHook preInstall + mkdir -p $out/bin - cp $GHCGetPackages $out/bin/ghc-get-packages.sh - chmod 755 $out/bin/ghc-get-packages.sh for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version}; do - makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$($out/bin/ghc-get-packages.sh ${ghc.version} \"\$(dirname \$0)\")" + makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$(${GHCGetPackages} ${ghc.version} \"\$(dirname \$0)\")" done for prg in runghc runhaskell; do - makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$($out/bin/ghc-get-packages.sh ${ghc.version} \"\$(dirname \$0)\" \" ${packageDBFlag} --ghc-arg=\")" + makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$(${GHCGetPackages} ${ghc.version} \"\$(dirname \$0)\" \" ${packageDBFlag} --ghc-arg=\")" done for prg in ghc-pkg ghc-pkg-${ghc.version}; do - makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$($out/bin/ghc-get-packages.sh ${ghc.version} \"\$(dirname \$0)\" -${packageDBFlag}=)" + makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$(${GHCGetPackages} ${ghc.version} \"\$(dirname \$0)\" -${packageDBFlag}=)" done for prg in hp2ps hpc hasktags hsc2hs; do test -x $ghc/bin/$prg && ln -s $ghc/bin/$prg $out/bin/$prg done - cat >> $out/bin/ghc-packages << EOF - #! /bin/bash -e - declare -A GHC_PACKAGES_HASH # using bash4 hashs to get uniq paths - for arg in \$($out/bin/ghc-get-packages.sh ${ghc.version} \"\$(dirname \$0)\"); do - case "\$arg" in - ${packageDBFlag}) ;; - *) - CANONICALIZED="\$(${stdenv.lib.optionalString stdenv.isDarwin "${coreutils}/bin/"}readlink -f "\$arg")" - GHC_PACKAGES_HASH["\$CANONICALIZED"]= ;; - esac - done - - for path in \''${!GHC_PACKAGES_HASH[@]}; do - echo -n "\$path:" - done - EOF - chmod +x $out/bin/ghc-packages mkdir -p $out/nix-support ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages + + mkdir -p $out/share/doc + ln -s $ghc/lib $out/lib + ln -s $ghc/share/doc/ghc $out/share/doc/ghc-${ghc.version} + + runHook postInstall ''; - GHCGetPackages = ./ghc-get-packages.sh; - - inherit ghc; - inherit (ghc) meta; - ghcVersion = ghc.version; -} // (stdenv.lib.optionalAttrs ghc761OrLater { preFixup = "sed -i -e 's|-package-conf|${packageDBFlag}|' $out/bin/ghc-get-packages.sh"; }) - // (stdenv.lib.optionalAttrs forUserEnv { - postFixup= '' - ln -s $ghc/lib $out/lib; - mkdir -p $out/share/doc - ln -s $ghc/share/doc/ghc $out/share/doc/ghc-${ghc.version} - ''; - })) + inherit ghc GHCGetPackages GHCPackages; + inherit (ghc) meta version; +} diff --git a/pkgs/development/compilers/uhc/default.nix b/pkgs/development/compilers/uhc/default.nix index fa66306721d7..31f45086ba0a 100644 --- a/pkgs/development/compilers/uhc/default.nix +++ b/pkgs/development/compilers/uhc/default.nix @@ -4,7 +4,7 @@ # this check won't be needed anymore after ghc-wrapper is fixed # to show ghc-builtin packages in "ghc-pkg list" output. -let binaryIsBuiltIn = builtins.compareVersions "7.2.1" ghc.ghcVersion != 1; +let binaryIsBuiltIn = builtins.compareVersions "7.2.1" ghc.version != 1; in stdenv.mkDerivation { name = "uhc-svn-git20120502"; diff --git a/pkgs/development/libraries/haskell/bytestring-progress/default.nix b/pkgs/development/libraries/haskell/bytestring-progress/default.nix index e9bb268b9fce..c73932b3760a 100644 --- a/pkgs/development/libraries/haskell/bytestring-progress/default.nix +++ b/pkgs/development/libraries/haskell/bytestring-progress/default.nix @@ -5,7 +5,6 @@ cabal.mkDerivation (self: { version = "1.0.3"; sha256 = "1v9cl7d4fcchbdrpbgjj4ilg79cj241vzijiifdsgkq30ikv2yxs"; buildDepends = [ terminalProgressBar time ]; - noHaddock = true; meta = { homepage = "http://github.com/acw/bytestring-progress"; description = "A library for tracking the consumption of a lazy ByteString"; diff --git a/pkgs/development/libraries/haskell/dns/default.nix b/pkgs/development/libraries/haskell/dns/default.nix index 8625aec86b3d..9dd35804f430 100644 --- a/pkgs/development/libraries/haskell/dns/default.nix +++ b/pkgs/development/libraries/haskell/dns/default.nix @@ -15,7 +15,7 @@ cabal.mkDerivation (self: { attoparsec attoparsecConduit binary blazeBuilder conduit doctest hspec iproute mtl network networkConduit random ]; - doCheck = false; + testTarget = "spec"; meta = { description = "DNS library in Haskell"; license = self.stdenv.lib.licenses.bsd3; diff --git a/pkgs/development/libraries/haskell/ghc-mod/default.nix b/pkgs/development/libraries/haskell/ghc-mod/default.nix index 977a15d28e06..accce6f5c86a 100644 --- a/pkgs/development/libraries/haskell/ghc-mod/default.nix +++ b/pkgs/development/libraries/haskell/ghc-mod/default.nix @@ -30,7 +30,7 @@ cabal.mkDerivation (self: { #!/bin/sh COMMAND=\$1 shift - eval exec $out/ghc-mod \$COMMAND \$( ${self.ghc.GHCGetPackages} ${self.ghc.ghcVersion} | tr " " "\n" | tail -n +2 | paste -d " " - - | sed 's/.*/-g "&"/' | tr "\n" " ") "\$@" + eval exec $out/ghc-mod \$COMMAND \$( ${self.ghc.GHCGetPackages} ${self.ghc.version} | tr " " "\n" | tail -n +2 | paste -d " " - - | sed 's/.*/-g "&"/' | tr "\n" " ") "\$@" EOF chmod +x $out/bin/ghc-mod ''; diff --git a/pkgs/development/libraries/haskell/modular-arithmetic/default.nix b/pkgs/development/libraries/haskell/modular-arithmetic/default.nix index 7d53d81f7bb6..c4a77630e6ae 100644 --- a/pkgs/development/libraries/haskell/modular-arithmetic/default.nix +++ b/pkgs/development/libraries/haskell/modular-arithmetic/default.nix @@ -4,7 +4,6 @@ cabal.mkDerivation (self: { pname = "modular-arithmetic"; version = "1.0.1.1"; sha256 = "14n83kjmz8mqjivjhwxk1zckms5z3gn77yq2hsw2yybzff2vkdkd"; - noHaddock = true; meta = { description = "A type for integers modulo some constant"; license = self.stdenv.lib.licenses.bsd3; diff --git a/pkgs/development/libraries/haskell/multirec/default.nix b/pkgs/development/libraries/haskell/multirec/default.nix index a7d7459b4558..61de0cace5b5 100644 --- a/pkgs/development/libraries/haskell/multirec/default.nix +++ b/pkgs/development/libraries/haskell/multirec/default.nix @@ -4,7 +4,6 @@ cabal.mkDerivation (self: { pname = "multirec"; version = "0.7.3"; sha256 = "0k1wbjsvkl08nwjikflc8yyalk654mf8bvi1rhm28i4na52myi5y"; - noHaddock = true; meta = { homepage = "http://www.cs.uu.nl/wiki/GenericProgramming/Multirec"; description = "Generic programming for families of recursive datatypes"; diff --git a/pkgs/development/libraries/haskell/wxHaskell/wxc.nix b/pkgs/development/libraries/haskell/wxHaskell/wxc.nix index 74ca4f91d70f..b89b39acb50a 100644 --- a/pkgs/development/libraries/haskell/wxHaskell/wxc.nix +++ b/pkgs/development/libraries/haskell/wxHaskell/wxc.nix @@ -6,7 +6,6 @@ cabal.mkDerivation (self: { sha256 = "1bh20i1rb8ng0ni1v98nm8qv5wni19dvxwf5i3ijxhrxqdq4i7p6"; buildDepends = [ wxdirect ]; extraLibraries = [ libX11 mesa wxGTK ]; - noHaddock = true; postInstall = '' cp -v dist/build/libwxc.so.${self.version} $out/lib/libwxc.so ''; diff --git a/pkgs/development/tools/documentation/haddock/2.7.2.nix b/pkgs/development/tools/documentation/haddock/2.7.2.nix index 8dd3460b6f8f..fd31a96b2913 100644 --- a/pkgs/development/tools/documentation/haddock/2.7.2.nix +++ b/pkgs/development/tools/documentation/haddock/2.7.2.nix @@ -10,7 +10,7 @@ cabal.mkDerivation (self : { doCheck = false; postInstall = '' - wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.ghcVersion} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")" + wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")" ''; meta = { diff --git a/pkgs/development/tools/documentation/haddock/2.9.2.nix b/pkgs/development/tools/documentation/haddock/2.9.2.nix index 61e457426dec..fcae14d789e9 100644 --- a/pkgs/development/tools/documentation/haddock/2.9.2.nix +++ b/pkgs/development/tools/documentation/haddock/2.9.2.nix @@ -10,7 +10,7 @@ cabal.mkDerivation (self : { doCheck = false; postInstall = '' - wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.ghcVersion} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")" + wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")" ''; meta = { diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 0b3ddbc672f6..c8d7b0dee858 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -58,7 +58,12 @@ # # For most packages, however, we keep only one version, and use default.nix. -{pkgs, newScope, ghc, prefFun, enableLibraryProfiling ? false, modifyPrio ? (x : x)}: +{ pkgs, newScope, ghc, prefFun, modifyPrio ? (x : x) +, enableLibraryProfiling ? false +, enableSharedLibraries ? false +, enableSharedExecutables ? false +, enableCheckPhase ? pkgs.stdenv.lib.versionOlder "7.4" ghc.version +}: # We redefine callPackage to take into account the new scope. The optional # modifyPrio argument can be set to lowPrio to make all Haskell packages have @@ -91,16 +96,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x ghc = ghc; # refers to ghcPlain }; - # The normal GHC wrapper doesn't create links to the documentation in - # ~/.nix-profile. Having this second wrapper allows us to remedy the - # situation without re-building all Haskell packages. At the next - # stdenv-updates merge, this second wrapper will go away. - - ghcUserEnvWrapper = pkgs.appendToName "new" (callPackage ../development/compilers/ghc/wrapper.nix { - ghc = ghc; # refers to ghcPlain - forUserEnv = true; - }); - # An experimental wrapper around ghcPlain that does not automatically # pick up packages from the profile, but instead has a fixed set of packages # in its global database. The set of packages can be specified as an @@ -115,8 +110,11 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x # packages. It isn't the Cabal library, which is spelled "Cabal". cabal = callPackage ../build-support/cabal { - enableLibraryProfiling = enableLibraryProfiling; - enableCheckPhase = pkgs.stdenv.lib.versionOlder "7.4" self.ghc.ghcVersion; + inherit enableLibraryProfiling; + inherit enableSharedLibraries; + inherit enableSharedExecutables; + inherit enableCheckPhase; + glibcLocales = if pkgs.stdenv.isLinux then pkgs.glibcLocales else null; }; # A variant of the cabal build driver that disables unit testing. From f5e8f1ccc174043fd6f6462202236cb871bfd514 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sat, 26 Oct 2013 18:55:48 +0200 Subject: [PATCH 9/9] ghc: update HEAD version to 7.7.20130828 --- pkgs/development/compilers/ghc/head.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 37bcde172324..e7483700ab0b 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, ghc, perl, gmp, ncurses }: stdenv.mkDerivation rec { - version = "7.7.20130816"; + version = "7.7.20130828"; name = "ghc-${version}"; src = fetchurl { url = "http://darcs.haskell.org/ghcBuilder/uploads/tn23/${name}-src.tar.bz2"; - sha256 = "0w636gfjn3xigrlj31z4hy9kv44svyifsqcshrq95qxijx396j5m"; + sha256 = "180nkd77kz3mv4g7yq8ipx34p5q8k714l0z2527y49lghy118jzv"; }; buildInputs = [ ghc perl gmp ncurses ];