{"id":22292621,"url":"https://github.com/ericnorris/rules_nfpm","last_synced_at":"2025-04-12T02:10:39.125Z","repository":{"id":57561304,"uuid":"271614328","full_name":"ericnorris/rules_nfpm","owner":"ericnorris","description":"NFPM rules for Bazel","archived":false,"fork":false,"pushed_at":"2023-09-19T07:58:38.000Z","size":179,"stargazers_count":5,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T21:48:12.674Z","etag":null,"topics":["bazel","bazel-rules","deb","packager","rpm"],"latest_commit_sha":null,"homepage":null,"language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericnorris.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2020-06-11T18:03:57.000Z","updated_at":"2023-06-28T23:47:54.000Z","dependencies_parsed_at":"2022-09-01T12:21:12.482Z","dependency_job_id":"e3b44468-2d70-4bbe-92e9-36de8af3951e","html_url":"https://github.com/ericnorris/rules_nfpm","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericnorris%2Frules_nfpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericnorris%2Frules_nfpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericnorris%2Frules_nfpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericnorris%2Frules_nfpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericnorris","download_url":"https://codeload.github.com/ericnorris/rules_nfpm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505929,"owners_count":21115354,"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":["bazel","bazel-rules","deb","packager","rpm"],"created_at":"2024-12-03T17:23:11.375Z","updated_at":"2025-04-12T02:10:39.100Z","avatar_url":"https://github.com/ericnorris.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- DO NOT EDIT THIS FILE, see docs/BUILD.bazel --\u003e\n\n# rules_nfpm\n\n`rules_nfpm` provides rules for building 'deb' and 'rpm' packages using [NFPM](https://github.com/goreleaser/nfpm/), a packager written in Go.\n\nWhile [rules_pkg](https://github.com/bazelbuild/rules_pkg/) _works_, `rules_nfpm` has the following advantages:\n\n- Clear documentation\n- No host dependencies (e.g. `rpmbuild` is not needed in `PATH`)\n- Built-in templating of Bazel [workspace status](https://docs.bazel.build/versions/master/user-manual.html#workspace_status) key-value pairs\n\n## Setup\n\nInclude the following snippet in your repository's WORKSPACE file:\n\n```starlark\nload(\"@bazel_tools//tools/build_defs/repo:http.bzl\", \"http_archive\")\n\nhttp_archive(\n    name = \"com_github_ericnorris_rules_nfpm\",\n    sha256 = \"800ebc64eac94d5ec6589e98a904c8c13aaad1ae0a981550de47a5ad7f72c660\",\n    urls = [\n        \"https://github.com/ericnorris/rules_nfpm/archive/v2.0.0.tar.gz\",\n    ],\n    strip_prefix = \"rules_nfpm-2.0.0\",\n)\n\nload(\"@com_github_ericnorris_rules_nfpm//nfpm:repositories.bzl\", \"rules_nfpm_dependencies\")\n\nrules_nfpm_dependencies()\n\nload(\"@com_github_ericnorris_rules_nfpm//nfpm:setup.bzl\", \"rules_nfpm_setup\")\n\nrules_nfpm_setup()\n\nload(\"@com_github_ericnorris_rules_nfpm//nfpm:go_repositories.bzl\", \"rules_nfpm_go_dependencies\")\n\nrules_nfpm_go_dependencies()\n```\n\n\u003c!-- Generated with Stardoc: http://skydoc.bazel.build --\u003e\n\n\u003ca id=\"#nfpm_package\"\u003e\u003c/a\u003e\n\n## nfpm_package\n\n\u003cpre\u003e\nnfpm_package(\u003ca href=\"#nfpm_package-name\"\u003ename\u003c/a\u003e, \u003ca href=\"#nfpm_package-config\"\u003econfig\u003c/a\u003e, \u003ca href=\"#nfpm_package-deps\"\u003edeps\u003c/a\u003e)\n\u003c/pre\u003e\n\n\nGenerates a package using [NFPM](https://github.com/goreleaser/nfpm/).\n\nThe config file is templatized using the `go` [text/template](https://golang.org/pkg/text/template/) library. The dot (`.`) value is a [ConfigTemplateData](https://pkg.go.dev/github.com/ericnorris/rules_nfpm/go/internal/cmd/nfpmwrapper?tab=doc#ConfigTemplateData) struct.\n\n### Example\n\n```starlark\nnfpm_package(\n    name = \"helloworld.deb\",\n    config = \"helloworld.yaml\",\n    deps = [\n        \"//cmd/helloworld\",\n    ],\n)\n```\n\nSee the [example directory](/example/README.md) for a more comprehensive example.\n\n\n**ATTRIBUTES**\n\n\n| Name  | Description | Type | Mandatory | Default |\n| :------------- | :------------- | :------------- | :------------- | :------------- |\n| \u003ca id=\"nfpm_package-name\"\u003e\u003c/a\u003ename |  A unique name for this target.   | \u003ca href=\"https://bazel.build/docs/build-ref.html#name\"\u003eName\u003c/a\u003e | required |  |\n| \u003ca id=\"nfpm_package-config\"\u003e\u003c/a\u003econfig |  NFPM configuration file template.   | \u003ca href=\"https://bazel.build/docs/build-ref.html#labels\"\u003eLabel\u003c/a\u003e | required |  |\n| \u003ca id=\"nfpm_package-deps\"\u003e\u003c/a\u003edeps |  Dependencies for this target. The output path of each dependency will be available in the \u003ccode\u003e.Dependencies\u003c/code\u003e map in the configuration file template, keyed by the dependency's label.   | \u003ca href=\"https://bazel.build/docs/build-ref.html#labels\"\u003eList of labels\u003c/a\u003e | optional | [] |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericnorris%2Frules_nfpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericnorris%2Frules_nfpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericnorris%2Frules_nfpm/lists"}