Skip to content

Easier config to mirror Hackage #5870

@brandonchinn178

Description

@brandonchinn178

Our company has an Artifactory instance that we've set up to mirror/cache Hackage urls; i.e. https://artifactory.example.com/hackage/foo/bar will mirror and cache https://hackage.haskell.org/foo/bar.

Currently it's annoying to configure Stack to use this mirror; currently we have to manually create ~/.stack/config.yaml containing

package-indices:
- download-prefix: https://artifactory.example.com/hackage/
  hackage-security:
    keyids:
    - ...
    key-threshold: 3
    ignore-expiry: true

Since the mirror is basically the same thing as Hackage, there's no point in duplicating all the keyids and whatnot; presumably this is all information already bundled in the Stack executable anyway.

It would be nice to have a way to just specify a URL and have it configured with the default configuration, e.g.:

# environment variable
export STACK_HACKAGE_URL=https://artifactory.example.com/hackage/

# helper command
stack config set hackage-url https://artifactory.example.com/hackage/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions