[Nix-dev] Profiling support
Marc Weber
marco-oweber at gmx.de
Mon Apr 26 17:30:48 CEST 2010
Hi Jean,
There is one main cabal builder.
You can modify that to add your flag and rebuild everything
all-packages.nix -> haskellPackages -> cabal attr name.
a dict is called attrs in Nix. keys are called "names"
This should point you to:
pkgs/development/libraries/haskell/cabal/cabal.nix
./Setup configure --verbose --prefix="$out" $extraLibDirs $configureFlags
you can add your flag here and retry.
Is adding --enable-library-profiling to all builds desirable?
Build time will increase. AFAIK cabal builds both: a non-profiling and a
profiling version then.
ghc is used by developpers mainly (exception darcs?).
So I would be fine adding --enable-library-profiling everywhere.
A real fix would be using the getConfig command to get user specific
additional cabal flags.
If you're very keen on both Haskell and Nix you can also try hack-nix.
You can override or set such flags in a target specific way.
Eg you can build all dependencies which are used by the package you're
trying to compile with this flag only.
I enabled it by default.
The drawback about hack-nix is that it doesn't build everything yet
because not all packages on hackage do build with latest versions only
:(
But it builds haskell tags for you automatically.
So it depends on what you're going to do which is the best way to solve
you issue.
If you want to get to know hack-nix without installing it ping me on
irc.
HTH
Marc Weber
More information about the nix-dev
mailing list