Jugendhackt / haskell-ricochet

(WIP/Experimental) Ricochet implementation as Haskell Library.
GNU General Public License v3.0
22 stars 0 forks source link

Add a usable environment for updating and using nix expressions #35

Closed sternenseemann closed 9 years ago

sternenseemann commented 9 years ago

A improvement of sahe, maybe?

froozen commented 9 years ago

I don't really get what you mean. Could you elaborate this in more detail?

sternenseemann commented 9 years ago

In @shak-mar's new branch we got a reasonable number of nix expressions.

froozen commented 9 years ago

OK, that makes sense. What would you propose doing? Writitng a bash script to generate the nix-expressions with the help of cabal2nix?

sternenseemann commented 9 years ago

Indeed something like that.

froozen commented 9 years ago

@shak-mar Do you want to do it, as you already created the expressions in your branch?

photm5 commented 9 years ago

I don’t get what you want me to do. Do you request a bash script to generate the nix expressions? Something like:

#! /usr/bin/env nix-shell
#! nix-shell -i bash -p cabal2nix
for p in hprotoc protocol-buffers protocol-buffers-descriptor; do
  cabal2nix cabal://$p > $p.nix
done

Note that you need to have run cabal update at least once beforehand.

froozen commented 9 years ago

Adding an appropriate note to CONTRIBUTING.md should be enough.

cabal2nix $your_source_of_choice > $package_name.nix

And then adding the following line to the folded list in shell.nix is all there is to do.

(entry ${packageName})