{"id":15061955,"url":"https://github.com/numtide/nar-serve","last_synced_at":"2025-04-10T09:45:59.530Z","repository":{"id":43134078,"uuid":"184391664","full_name":"numtide/nar-serve","owner":"numtide","description":"Unpack and serve NAR file content on the fly","archived":false,"fork":false,"pushed_at":"2025-04-01T19:21:17.000Z","size":392,"stargazers_count":38,"open_issues_count":18,"forks_count":8,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-01T20:27:03.419Z","etag":null,"topics":["binary-cache","buildbot-numtide","nar","nix","now-sh"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/numtide.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-01T08:56:34.000Z","updated_at":"2025-02-27T14:22:54.000Z","dependencies_parsed_at":"2024-04-19T14:49:58.305Z","dependency_job_id":"77d2765e-f46c-43dd-8ebd-30d02ecda648","html_url":"https://github.com/numtide/nar-serve","commit_stats":{"total_commits":101,"total_committers":10,"mean_commits":10.1,"dds":0.3168316831683168,"last_synced_commit":"e5c749a444f2d14f381c75ef3a8feaa82c333b92"},"previous_names":["zimbatm/nar-serve"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtide%2Fnar-serve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtide%2Fnar-serve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtide%2Fnar-serve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtide%2Fnar-serve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numtide","download_url":"https://codeload.github.com/numtide/nar-serve/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248196333,"owners_count":21063397,"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":["binary-cache","buildbot-numtide","nar","nix","now-sh"],"created_at":"2024-09-24T23:28:10.706Z","updated_at":"2025-04-10T09:45:59.502Z","avatar_url":"https://github.com/numtide.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nar-serve - Serve NAR file content directly from cache\n\nPush your build artifacts to one place.\n\nAll the files in https://cache.nixos.org are packed in NAR files which makes\nthem not directly accessible. This service allows to download, decompress,\nunpack and serve any file in the cache on the fly.\n\n## Use cases\n\n* Avoid publishing build artifacts to both the binary cache and another service.\n* Allows to share build results easily.\n* Inspect the content of a NAR file.\n\n## Development\n\nInside the provided nix shell run:\n\n```shell\n./start-dev\n```\n\nThis will create a small local server with live reload that emulates now.sh.\n\nCurrently, the default port is 8383. You can change it by setting the `PORT`\nenvironment variable, or `HTTP_ADDR` to also change the bind address.\n\n## Usage\n\nStore contents can be fetched via a simple HTTP GET request.\n\nAppend any store path to the hostname to fetch and unpack it on\nthe fly. That's it.\n\nE.g.:\n\n* https://serve.ntd.one/nix/store/barxv95b8arrlh97s6axj8k7ljn7aky1-go-1.12/share/go/doc/effective_go.html\n\nNAR archives also contain information about the executable bit for each contained file.\nnar-serve uses a custom HTTP header named `NAR-executable` to indicate whether the fetched file would be executable.\n\n## Configuration\n\nYou can use the following environment variables to configure nar-serve:\n\n| Name | Default value | Description |\n|:--   |:--            |:-- |\n| `PORT` | `8383` | Port number on which nar-service listens |\n| `HTTP_ADDR` | `:$PORT` | HTTP address to bind the server to. When set, takes precedence over $PORT. |\n| `NIX_CACHE_URL` | `https://cache.nixos.org` | The URL of the Nix store from which NARs are fetched |\n| `DOMAIN` | \"\" | When set, also serve `\u003cnar-hash\u003e.$DOMAIN` paths. |\n\n## Contributing\n\nContributions are welcome!\n\nBefore adding any new feature it might be best to first discuss them by\ncreating a new issue in https://github.com/numtide/nar-serve/issues .\n\nAll code is licensed under the Apache 2.0 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumtide%2Fnar-serve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumtide%2Fnar-serve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumtide%2Fnar-serve/lists"}