{"id":20612752,"url":"https://github.com/phlummox/hup","last_synced_at":"2025-04-15T07:08:44.536Z","repository":{"id":14820828,"uuid":"77164187","full_name":"phlummox/hup","owner":"phlummox","description":"Upload packages or documentation to a hackage server","archived":false,"fork":false,"pushed_at":"2022-07-18T10:40:18.000Z","size":207,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T17:33:52.951Z","etag":null,"topics":["build","build-tools","deploy-tool","distribution","hackage","hackage-server","haskell","stack","tools","uploaders","web"],"latest_commit_sha":null,"homepage":"https://hackage.haskell.org/package/hup","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phlummox.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-22T17:39:19.000Z","updated_at":"2023-10-18T08:09:16.000Z","dependencies_parsed_at":"2022-07-19T05:47:00.635Z","dependency_job_id":null,"html_url":"https://github.com/phlummox/hup","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phlummox%2Fhup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phlummox%2Fhup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phlummox%2Fhup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phlummox%2Fhup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phlummox","download_url":"https://codeload.github.com/phlummox/hup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578833,"owners_count":21127714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","build-tools","deploy-tool","distribution","hackage","hackage-server","haskell","stack","tools","uploaders","web"],"created_at":"2024-11-16T11:07:48.745Z","updated_at":"2025-04-15T07:08:44.516Z","avatar_url":"https://github.com/phlummox.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hup [![Hackage version](https://img.shields.io/hackage/v/hup.svg?label=Hackage)](https://hackage.haskell.org/package/hup)\n\n[![Build Status](https://github.com/phlummox/hup/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/phlummox/hup/actions/workflows/ci.yml)\n[![Windows build status](https://ci.appveyor.com/api/projects/status/htfimtle01wo328u/branch/master?svg=true\u0026passingText=Windows%20build%20passing\u0026failingText=Windows%20build%20failing\u0026pendingText=Windows%20build%20pending)](https://ci.appveyor.com/project/phlummox/hup/branch/master)\n\nSmall program for building and uploading packages and documentation\nbuilt with the [`stack`][stack] build tool to a hackage server.\n\n[stack]: https://www.haskellstack.org/\n\nFor instance, to build and upload package documentation to\n\u003chttps://hackage.haskell.org/\u003e for a package candidate:\n\n```\n$ hup docboth --candidate --user myHackageUserID --password myHackagePassword\n```\n\nInstead of providing a password on the command line, you can set the\n`HUP_HACKAGE_PASSWORD` environment variable and `hup` will use that as the\npassword.\n\nIn addition to `stack`, `hup` requires the `cabal` executable,\nbut will install an appropriate `cabal` if it doesn't find one in the\nbinaries for the package snapshot your project is using.\n\n## Installation\n\nThe recommended install method is to run:\n\n```\n$ stack --resolver=lts-11 build --copy-bins hup\n```\n\nOn Linux, this will install `hup` to your `~/.local/bin` directory --\nensure that it's on your PATH, and you're good to go.\n\nAlternatively, you can download a statically linked executable\n(for Linux, AMD64 architecture) from the \"[Releases][releases]\"\npage.\n\n[releases]: https://github.com/phlummox/hup/releases\n\n## Quick usage\n\nTry something like:\n\n```\n$ cd /path/to/my/project\n$ stack build\n$ hup packboth -u myHackageUserID -p myHackagePassword\n$ hup docboth -u myHackageUserID -p myHackagePassword\n```\n\n## Usage\n\n\n* `hup [COMMAND] ... [OPTIONS]`\n\n  Build and/or upload packages or documentation to a hackage server. A server\n  url should be of the format PROTOCOL://SERVER[:PORT]/, and defaults to\n  https://hackage.haskell.org/ if not specified.\n  \n  A password can also be given in the HUP_HACKAGE_PASSWORD environment variable\n  instead of on the command line.\n  \n  'hup --help=all' will give help for all commands.\n\n* Commands:\n\n        packbuild  Build source distribution .tgz for a package.\n        packup     Upload FILE as a package (or candidate package).\n        packboth   Build source distribution .tgz and upload as package (or\n                   candidate package).\n        docbuild   Build documentation for a package.\n        docup      Upload FILE as documentation.\n        docboth    Build and upload documentation for a package.\n      \n* Common flags:\n\n        -v --verbose          be verbose\n        -h --help             Display help message\n        -V --version          Print version information\n           --numeric-version  Print just the version number\n      \n\n  '--help=bash' will output code for bash command-line completion.\n\n### Subcommand details\n\n\n\n* `hup packbuild [OPTIONS]`\n\n  Build source distribution .tgz for a package.\n\n* `hup packup [OPTIONS] FILE`\n\n  Upload FILE as a package (or candidate package).\n\n  Flags:\n\n        -s --server=URL       \n        -c --candidate        \n        -u --user=USER        \n        -p --password=PASSWORD\n* `hup packboth [OPTIONS]`\n\n  Build source distribution .tgz and upload as package (or candidate package).\n\n  Flags:\n\n        -s --server=URL       \n        -c --candidate        \n        -u --user=USER        \n        -p --password=PASSWORD\n* `hup docbuild [OPTIONS]`\n\n  Build documentation for a package.\n\n  Flags:\n\n        -e --executables             Run haddock for Executables targets\n        -t --tests                   Run haddock for Test Suite targets\n        -i --internal                Run haddock for internal modules and include\n                                     all symbols\n           --haddock-arguments=ARGS  extra args to pass to haddock\n        -q --quick                   quick build - don't build docco for\n                                     dependencies (links may be broken)\n* `hup docup [OPTIONS] FILE`\n\n  Upload FILE as documentation.\n\n  Flags:\n\n        -s --server=URL       \n        -c --candidate        \n        -u --user=USER        \n        -p --password=PASSWORD\n* `hup docboth [OPTIONS]`\n\n  Build and upload documentation for a package.\n\n  Flags:\n\n        -e --executables             Run haddock for Executables targets\n        -t --tests                   Run haddock for Test Suite targets\n        -i --internal                Run haddock for internal modules and include\n                                     all symbols\n           --haddock-arguments=ARGS  extra args to pass to haddock\n        -q --quick                   quick build - don't build docco for\n                                     dependencies (links may be broken)\n        -s --server=URL            \n        -c --candidate             \n        -u --user=USER             \n        -p --password=PASSWORD     \n\n\n## Library API\n\nFor documentation of the library, see the [Hackage documentation][hackage-hup].\n\n[hackage-hup]: https://hackage.haskell.org/package/hup\n\n## Troubleshooting\n\n### I get an error during upload that says \"...: does not exist (no such protocol name: tcp)\"\n\nThis is not actually a bug in `hup`, but is found in e.g. Docker containers\nthat don't have all the packages needed for networking - see e.g.\n[here](https://stackoverflow.com/questions/46322773/yesod-app-in-docker-container-cant-make-network-requests) on StackOverflow.\n\nYou will need to install networking packages appropriate for your distro - on Ubuntu, something like ca-certificates, libgnutls28 (or another version of the GNU TLS library), and netbase.\n\n### I get some sort of error when building documents that says \"...haddock: internal error: ... hGetContents: invalid argument (invalid byte sequence)\"\n\nAgain, this isn't actually a bug in `hup`, but happens (e.g. in Docker\ncontainers) when the system locale is not properly set up (see a bug report\n[here](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871839) arising from a\nsimilar issue). Annoyingly, `haddock` depends on the locale being properly set,\nthough it doesn't really seem necessary.\n\nTry running `locale-gen \"en_US.UTF-8\"` to generate an appropriate UTF-8\nlocale, and `export LC_ALL=\"en_US.UTF-8\"` so that the locale can be found\nfrom environment variables.\n\n## Bash command-line completion\n\nTo enable bash command-completion:\n\nRun\n\n```\n$ hup --help=bash \u003e hup.complete\n```\n\nthen either \"`source hup.complete`\" or \"`. hup.complete`\".\n\n## Defaults\n\nUses \"`https://hackage.haskell.org/`\" as the default server location,\nbut see the `DefaultServerUrl` module if you want to patch this to\nsomething else before installing.\n\n## Bugs and limitations\n\n- Some very basic tests of library and app functionality are run on MS Windows\n  and MacOS virtual machines using GitHub and Appveyor's CI/CD capabilities, but\n  no extensive testing on those platforms is performed.\n\n## Feature requests\n\nSo that actual bugs and defects aren't cluttered by other issues,\nproposed features and feature requests are maintained as *closed* issues on\nGitHub with the labels \"enhancement\" and \"incomplete\"\n(see [here][feature-requests]).\n\n[feature-requests]: https://github.com/phlummox/hup/issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement+label%3Aincomplete\n\n## Credits\n\n`hup` is a Haskellified version of [Oleg Grenrus's script][oleg],\nwhich is a stack-enabled version of [Eric Mertens's script][eric].\n\n[oleg]: http://web.archive.org/web/20210209123501/https://github.com/mstksg/binary-orphans/commit/3f106567260c1a9bb3063d49948201675876ad12.patch\n[eric]: http://web.archive.org/web/20210209124009/https://github.com/ekmett/lens/commit/12b08783a3e44d46b41553d8a57560c6e68cf7e1.patch\n\n\u003c!--\n  vim: syntax=markdown\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphlummox%2Fhup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphlummox%2Fhup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphlummox%2Fhup/lists"}