vabal icon indicating copy to clipboard operation
vabal copied to clipboard

Nix integration

Open fgaz opened this issue 7 years ago • 2 comments

Basically just this:

vabal --nix
# runs the command: nix-shell -p cabal2nix --run "cabal2nix --compiler $GHC_VERSION_HERE --shell > shell.nix"

fgaz avatar Dec 27 '18 17:12 fgaz

Hi, with 1c36dce3d1eac3dbb87148891c58a912fef874f6 you can achieve this using xargs:

vabal show | xargs -IGHC_VERSION_HERE nix-shell -p cabal2nix --run "cabal2nix --compiler GHC_VERSION_HERE --shell > shell.nix"

Let me know what you think about it. Note that vabal show, will also download ghc, if the needed version is missing (if you don't provide the --no-install flag). Does it make sense? Also, Happy new year!

Franciman avatar Dec 31 '18 23:12 Franciman

Ok, I misunderstood the issue. We need to use nix to get ghc, so a new backend powered by nix is needed. Shall work on it. @fgaz can you provide me a nix script to get the list of cached ghcs ? This is not a necessary feature, but may be helpful for people who want to avoid installing other ghcs (and thus recompiling dependencies) when a cached one could do the job as well.

Franciman avatar Jan 01 '19 20:01 Franciman