[Nix-dev] Proper way of adding custom nix expressions
Richard Wallace
rwallace at thewallacepack.net
Thu Nov 1 00:12:41 CET 2012
I don't disagree, but from the BUGS section of the haskell-overlay[1]
"Oh, there are many. build tools were not defined by cabal files in
the past which is why tools like happy have to added as buildinputs
manually (see default.nix file of the overlay). If you have 2 month of
free time - what about implementing NAT for finding solutions for the
dependency trees?"
So it seems there needs to be some fine tuning of packages before just
throwing them out there.
Rich
[1] http://nixos.org/wiki/Nixpkgs-haskell-overlay
On Wed, Oct 31, 2012 at 4:05 PM, Daniel Santa Cruz <dstcruz at gmail.com> wrote:
> I'm interested in figuring out what is standing in the way of getting
> hack-nix as the standard way of doing things. From my very naive point of
> view, that is what I would want as the end user. This deal of having to
> create a nix expression for every package, and for every version of that
> package does not appeal to me very much. I understand that in a day to day
> scenario, it is not "that bad", but the hack-nix approach would seem "oh, so
> nice".
>
> I would feel like I have given more to the community if the entire hackage
> was instantly available via nix, rather than by creating nix expressions by
> hand for them. I already did some of that, as can be seen by some of the
> packages for Snap and for Yesod, but I have moved away from it. For fast
> moving projects, manually creating nix expressions is an extra effort that I
> would like to be able to avoid.
>
> Daniel
>
>
> On Wed, Oct 31, 2012 at 6:51 PM, Richard Wallace
> <rwallace at thewallacepack.net> wrote:
>>
>> Thanks, I think I'll give this a try. hack-nix is more comprehensive,
>> but I'd like to see if I can contribute to the community.
>>
>> On Wed, Oct 31, 2012 at 2:01 PM, Peter Simons <simons at cryp.to> wrote:
>> > Hi Richard,
>> >
>> > > It seems like ~/.nix-defexpr is the place I should add anything
>> > custom.
>> >
>> > yes, that is true. Personally, I have a checked-out copy of the Git
>> > repository from http://github.com/nixos/nixpkgs at that location. Adding
>> > 'boomerang' is then just a matter of running the commands:
>> >
>> > $ cd .nix-defexpr/pkgs/development/libraries/haskell/
>> > $ mkdir boomerang
>> > $ cabal2nix cabal://boomerang >boomerang/default.nix
>> >
>> > Now, add the line
>> >
>> > boomerang = callPackage ../development/libraries/haskell/boomerang
>> > {};
>> >
>> > to ~/.nix-defexpr/pkgs/top-level/haskell-packages.nix, and test the
>> > build with the compiler of your choice:
>> >
>> > $ nix-env -p /tmp/test -iA haskellPackages_ghc742.boomerang
>> > installing `haskell-boomerang-ghc7.4.2-1.3.3'
>> > these derivations will be built:
>> >
>> > /nix/store/dv8a9bvnsqkv3b6kykfk16dmqjshh32s-haskell-boomerang-ghc7.4.2-1.3.3.drv
>> > [...]
>> > [...]
>> > patching ELF executables and libraries
>> > patching script interpreter paths
>> > building path(s)
>> > `/nix/store/kybjzfbk54q8qn7jwv7v82ah7nz7nird-user-environment'
>> > created 22 symlinks in user environment
>> >
>> > Finally, commit the result and open a pull request. :-)
>> >
>> > Take care,
>> > Peter
>> >
>> > _______________________________________________
>> > 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
>
>
More information about the nix-dev
mailing list