What about just copying the old .nix from old nixpkgs commits? On Mon, Sep 8, 2014 at 8:08 PM, Richard Wallace <[email protected] > wrote:
> On Mon, Sep 8, 2014 at 9:03 AM, Mateusz Kowalczyk <[email protected] > > wrote: > >> On 09/08/2014 04:56 PM, Richard Wallace wrote: >> > Hello, >> > >> > I'm using nix-shell to setup a Haskell environment for development. On >> a >> > project I ran into a problem recently, and I'm curious if there is a >> > common/preferred way of solving it. >> > >> > The problem I ran into is that the project depends on the mongoDB 1.5 >> > package. The API changed drastically in 2.0 and we're not ready to >> > undertake the upgrade yet. I think I can handle this by creating a >> nixpkgs >> > directory in the project, putting a mongoDB/default.nix file in there >> that >> > is setup for the version we need, then override it in our shell.nix file >> > like this: >> > >> > let >> > >> > pkgs = import <nixpkgs> {}; >> > >> > haskellPackages = pkgs.haskellPackages.override { >> > >> > extension = self: super: { >> > mongoDB = self.callPackage nixpkgs/mongoDB {}; >> > ourkidsclass = self.callPackage ./. {}; >> > >> > }; >> > >> > }; >> > >> > Is this a reasonable approach? Is there a better way? >> > >> > Thanks, >> > Rich >> > >> > >> > >> > _______________________________________________ >> > nix-dev mailing list >> > [email protected] >> > http://lists.science.uu.nl/mailman/listinfo/nix-dev >> > >> >> This looks as good of a solution as any other one could come up with. Is >> there something you're dissatisfied with that you would like to have in >> a ‘better’ solution? >> >> > Well, the mongoDB package isn't the only one that I want to get a specific > version of. We originally built it with a sandbox and used `cabal freeze` > to make sure everyone is using the same versions. So there are a number of > such packages and I was hoping for something a bit more automated. Perhaps > I can script something to make it a bit easier to maintain. > > Rich > > > >> -- >> Mateusz K. >> _______________________________________________ >> nix-dev mailing list >> [email protected] >> http://lists.science.uu.nl/mailman/listinfo/nix-dev >> > > > _______________________________________________ > nix-dev mailing list > [email protected] > http://lists.science.uu.nl/mailman/listinfo/nix-dev > > -- www.debian.org - The Universal Operating System
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
