Niklas Hambüchen | 13 Jun 17:09 2013

ANN: custom-hackage

https://github.com/nh2/custom-hackage

An (almost trivial) script to generate 00-index.tar.gz which is
necessary to run your own `remote-repo`.

If you are a company that has to rely on that not everybody with a
Hackage account can run arbitrary code on your computer at your next
cabal install, and you want to make available only select versions of
packages (as opposed to a full hackage mirror), this is for you.

Just drop your tars into the directory structure, run the script and
serve it over HTTP.
Albert Y. C. Lai | 16 Jun 20:42 2013
Picon

Re: ANN: custom-hackage

On 13-06-13 11:09 AM, Niklas Hambüchen wrote:
> https://github.com/nh2/custom-hackage
>
> An (almost trivial) script to generate 00-index.tar.gz which is
> necessary to run your own `remote-repo`.

I write the following critique with much reluctance, since I will be 
saying a lot of "this cannot possibly work, here is why", but I would 
also like to think that it had worked for you before you published it.

Assume the remote-repo line goes like

remote-repo: custom:http://127.0.0.1:8080/packages/archive

And assume it has just one package, formula-1.1

Then your scheme uses this layout:

   http://127.0.0.1:8080/00-index.tar.gz
   http://127.0.0.1:8080/packages/archive/formula/1.1/formula-1.1.tar.gz

However, cabal-install expects this layout:

   http://127.0.0.1:8080/packages/archive/00-index.tar.gz
   http://127.0.0.1:8080/packages/archive/package/formula-1.1.tar.gz

I know this by both reading cabal-install source code and empirical 
tests, both 0.14 and 1.16.

I have a working example at
(Continue reading)

Niklas Hambüchen | 17 Jun 05:32 2013

Re: ANN: custom-hackage

Hello Albert,

thanks for this! Please don't be reluctant with this, it is very
appreciated.

I have updated the script to use the paths as you described, and it
seems to work quite well. The fact that all tars land under package/
even makes is easier to use.

It would be great if you could give it another try.

Niklas

On 17/06/13 02:42, Albert Y. C. Lai wrote:
> On 13-06-13 11:09 AM, Niklas Hambüchen wrote:
>> https://github.com/nh2/custom-hackage
>>
>> An (almost trivial) script to generate 00-index.tar.gz which is
>> necessary to run your own `remote-repo`.
> 
> I write the following critique with much reluctance, since I will be
> saying a lot of "this cannot possibly work, here is why", but I would
> also like to think that it had worked for you before you published it.
> 
> Assume the remote-repo line goes like
> 
> remote-repo: custom:http://127.0.0.1:8080/packages/archive
> 
> And assume it has just one package, formula-1.1
> 
(Continue reading)


Gmane