[Nix-dev] Overriding by removing a derivation attribute

Kosyrev Serge _deepfire at feelingofgreen.ru
Tue Mar 1 23:03:22 CET 2016


Kosyrev Serge <_deepfire at feelingofgreen.ru> writes:
> I want to override a Haskell derivation, but in the particular case
> it is not enough to change the 'src' attribute -- I also need to stop the
> derivation supplying an alternate .cabal file:
[..]
> Naturally, this doesn't work as desired (the file still gets supplied),
> and so the question is -- how is one supposed to achieve that?

What worked for me was:

      aeson          = removeAttrs (dontCheck (haskell.lib.overrideCabal old.aeson (oldAttrs: {
        src = pkgs.fetchgit {
                url    = https://github.com/bos/aeson;
                rev    = "d9f1ad357e5dc28c381099814e7cce0e68cf2b6a";
                sha256 = "0nzajw4ia2s7kjjygw9xddrfa1aq2kq960bm9wgj8b34manmyh0f";
        };
      }))) ["editedCabalFile"];

I think I was lucky that the attribute that was supposed to be
overridden was interpreted at the latest stage in the pipeline.

-- 
с уважениeм / respectfully,
Косырев Сергей


More information about the nix-dev mailing list