[Nix-dev] Nix - building only some libraries with profiling

John Wiegley johnw at newartisans.com
Thu Aug 6 23:24:19 CEST 2015


>>>>> Carlo Nucera <meditans at gmail.com> writes:

> Hi, I'd like to fine tune my haskell setup with Nix.
> I need to transitively compile a package I'm working on with profiling. For the
> time being, I'm compiling all my haskell libraries with libraries enabled, with
> the lines:

>   overrides = self: super: {
>     mkDerivation = drv: super.mkDerivation (drv //
> {enableLibraryProfiling = true;});

> as you can see in this gist:
> https://gist.github.com/meditans/82ded9101c55eb5884d7

> Obviously, this way of doing things is suboptimal, so how can I modify this
> file to transitively build with profiling only a few libraries?

You should be able to enable profiling in the default.nix for your project,
and it will build only the dependencies necessary to honor that.

John


More information about the nix-dev mailing list