nixpkgs/pkgs/development/libraries/haskell/ghc-paths/default.nix
Andres Loeh d068aa9861 Patch ghc-paths to interact better with ghcWithPackages.
When the ghc-paths library is compiled, the paths of the
compiler it is compiled with are being hardcoded in the
library (and can then be queried from other applications
using the library).

But on Nix, packages are compiled with ghc-wrapper, and
subsequently possibly used with a special version of ghc
generated for a particular environment of packages. So
one version of ghc-paths may potentially end up being
used by lots of different instances of ghc. The hardcoding
approach fails.

As a work-around, we now patch ghc-paths so that it allows
setting the paths that can be queried via environment
variables. Specific GHC environments can then set these
environment variables in the wrapper shell script that
invokes GHC.

This should at least partially solve issue #213.
2012-12-16 14:25:15 +01:00

15 lines
420 B
Nix

{ cabal }:
cabal.mkDerivation (self: {
pname = "ghc-paths";
version = "0.1.0.9";
sha256 = "0ibrr1dxa35xx20cpp8jzgfak1rdmy344dfwq4vlq013c6w8z9mg";
patches = [ ./ghc-paths-nix.patch ];
meta = {
description = "Knowledge of GHC's installation directories";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.andres ];
};
})