[Nix-dev] Developing with older packages

Luca Bruno lethalman88 at gmail.com
Mon Sep 8 22:27:14 CEST 2014


What about just copying the old .nix from old nixpkgs commits?

On Mon, Sep 8, 2014 at 8:08 PM, Richard Wallace <rwallace at thewallacepack.net
> wrote:

> On Mon, Sep 8, 2014 at 9:03 AM, Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk
> > 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
>> > nix-dev at lists.science.uu.nl
>> > 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
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>


-- 
www.debian.org - The Universal Operating System
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140908/909b3e6d/attachment.html 


More information about the nix-dev mailing list