Hi Adam,

I was able to get what I need using your information.  Thanks so much for
your help!

#!/usr/bin/env bash

cabal update

mkdir -p deps

_project="$(echo *.cabal | cut -d '.' -f 1)"

pushd deps > /dev/null

cp ../$_project.cabal ./

projects() {
  cabal install $_project --dry-run | grep hw- | grep -v
"^${_project}-[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+$"
}

for x in $(projects); do
  stack unpack $x
done

rm ./$_project.cabal

popd > /dev/null

Cheers,

-John
​

On Sun, 23 Oct 2016 at 22:06 Adam Bergmark <[email protected]> wrote:

> Hi John,
>
> I think the simplest way to do this is something like this in your project
> directory:
>
> $ rm -f stack.yaml
> $ stack unpack package-1 package-2
> $ stack init
>
> You can use `--resolver ghc-8' to stack init to use the Cabal solver
> instead of using a stackage snapshot but this will take version constraints
> declared in cabal files into account.
>
> A way to check if there are newer versions available is `cabal install
> my-package --dry-run | grep latest`
>
> HTH,
> Adam
>
>
> On Sun, Oct 23, 2016 at 12:47 PM John Ky <[email protected]> wrote:
>
> Hello,
>
> I'm interesting in configuring my stack.yaml such that for a specific few
> packages the latest version on hackage is resolvable.
>
> Is this possible?
>
> Cheers,
>
> -John
>
> --
> You received this message because you are subscribed to the Google Groups
> "haskell-stack" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/haskell-stack/b685da1f-a83b-48c9-a57a-f7edc5249582%40googlegroups.com
> <https://groups.google.com/d/msgid/haskell-stack/b685da1f-a83b-48c9-a57a-f7edc5249582%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/haskell-stack/CAMB4o-CbPPQ5tg__Kf%2B%3D4WHTPaN3AZ-ZxDCM4XuKEVcxzX%2BU6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to