I was trying to use the cassandra-thrift haskell package and there was a
bug in one if it's dependencies, thrift. I fixed the bug in thrift and then
went to the nix haskell guide to find out how to override "thrift" with my
bugfixed version.

I came up with this from the haskell guide (
http://nixos.org/nixpkgs/manual/#how-to-build-projects-that-depend-on-each-other
):

{ pkgs }: {
packageOverrides = super: let self = super.pkgs; in
  {
    haskellPackages = super.haskellPackages.override {
      overrides = self: super: {
        thrift = self.callPackage /home/cody/sources/thrift/lib/hs {};
      };
    };
  };

  allowUnfree = true;
  firefox = {
     enableGoogleTalkPlugin = true;
     enableAdobeFlash = true;
  };

and then finally tried the example from ocharle's wiki on nix/haskell,
which involved putting the override in shell.nix like below:

with (import <nixpkgs> {}).pkgs;
let modifiedHaskellPackages = haskellPackages.override {
      overrides = self: super: {
        thrift = self.callPackage /home/cody/sources/thrift/lib/hs {};
      };
    };
in modifiedHaskellPackages.hscassandra.env

I'm a little dismayed since I even went through all 19 or so of the nix
pills(
http://lethalman.blogspot.com/2014/07/nix-pill-1-why-you-should-give-it-try.html)
thinking I just needed to brush up on nix.

If someone could also explain these snippets and how they work in detail or
differently than the resources I've looked at many times:

http://nixos.org/nixpkgs/manual/#how-to-build-projects-that-depend-on-each-other
http://lethalman.blogspot.com/2014/07/nix-pill-1-why-you-should-give-it-try.html
http://wiki.ocharles.org.uk/Nix#multiple-project-usage

If possible, any example git repositories with multiple haskell
projects/overrides would be amazing.

Thank you all for your time.

Sincerely,

Cody Goodman
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to