pub struct NixConfig {Show 25 fields
pub name: Option<String>,
pub path: Option<String>,
pub repository: Option<RepositoryConfig>,
pub commit_author: Option<CommitAuthorConfig>,
pub commit_msg_template: Option<String>,
pub ids: Option<Vec<String>>,
pub url_template: Option<String>,
pub skip_upload: Option<StringOrBool>,
pub skip: Option<StringOrBool>,
pub install: Option<String>,
pub extra_install: Option<String>,
pub post_install: Option<String>,
pub description: Option<String>,
pub homepage: Option<String>,
pub license: Option<String>,
pub maintainers: Option<Vec<String>>,
pub changelog: Option<String>,
pub long_description: Option<String>,
pub dependencies: Option<Vec<NixDependency>>,
pub formatter: Option<String>,
pub amd64_variant: Option<Amd64Variant>,
pub main_program: Option<String>,
pub required: Option<bool>,
pub if_condition: Option<String>,
pub retain_on_rollback: Option<bool>,
}Fields§
§name: Option<String>Override the derivation name (default: crate name).
path: Option<String>Path for the .nix file in the repository (default: pkgs/<name>/default.nix).
repository: Option<RepositoryConfig>Unified repository config with branch, token, PR, git SSH support.
Commit author with optional signing.
commit_msg_template: Option<String>Custom commit message template.
ids: Option<Vec<String>>Build IDs filter: only include artifacts whose id is in this list.
url_template: Option<String>Custom URL template for download URLs (overrides release URL).
skip_upload: Option<StringOrBool>Skip publishing. "true" always skips; "auto" skips for prereleases.
Accepts bool or template string.
skip: Option<StringOrBool>Skip this Nix config. Accepts bool or template string
(e.g. "{{ if .IsSnapshot }}true{{ endif }}" for conditional skip).
Distinct from skip_upload so users can model both intents — disable
means “don’t generate at all”, skip_upload means “generate but don’t
push”. Without this field, nix: { skip: true } was silently
dropped by the serde unknown-field default.
install: Option<String>Custom install commands (replaces auto-generated binary install).
extra_install: Option<String>Additional install commands appended after the main install.
post_install: Option<String>Post-install commands (postInstall phase).
description: Option<String>Short description of the Nix derivation.
homepage: Option<String>Project homepage URL.
license: Option<String>License for the derivation’s meta.license. Accepts a nix
lib.licenses attribute (e.g. mit, asl20) or an SPDX expression
(e.g. MIT, Apache-2.0, MIT OR Apache-2.0). A known single id maps
to lib.licenses.<attr>; an OR/AND list of known ids maps to
with lib.licenses; [ … ]. An unknown id or an unparseable compound
(e.g. a WITH exception) degrades to a quoted-string license in
meta — never rejected, never an invalid attr-path. When unset, the
license is derived from the crate’s Cargo.toml [package].license.
maintainers: Option<Vec<String>>nixpkgs maintainer handles (from lib.maintainers) rendered as
maintainers = with lib.maintainers; [ alice bob ]; in the
derivation’s meta. These are nixpkgs handles (e.g. globin,
zowoq), NOT Name <email> author strings — a nixpkgs review
rejects a derivation whose meta.maintainers is absent. When unset
the derivation still emits maintainers = [ ]; (an empty-but-present
list is valid and clears the “field absent” rejection); a user fills
in their handle. Each entry is rendered verbatim as a Nix identifier,
so values must be valid lib.maintainers attribute names.
changelog: Option<String>URL for meta.changelog. When unset, anodizer derives
<host>/<owner>/<repo>/releases/tag/<tag> from the crate’s release
repository and the release tag (matching what ripgrep/fd set in
nixpkgs). Set this to override (e.g. a …/blob/<tag>/CHANGELOG.md
URL). Templated. Omitted only when no release repo is configured and
no explicit value is given.
long_description: Option<String>Long-form description for meta.longDescription, rendered as a
multi-line longDescription = '' … ''; block. Optional; omitted when
unset. Templated.
dependencies: Option<Vec<NixDependency>>Nix package dependencies with optional OS filtering.
formatter: Option<String>Nix formatter to run on the generated file: “alejandra” or “nixfmt”.
amd64_variant: Option<Amd64Variant>amd64 microarchitecture variant filter (v1 / v2 / v3 / v4).
Only artifacts matching this variant are included. Default: v1.
Typed as Amd64Variant, so any value outside v1..v4 is
rejected when the config is parsed.
main_program: Option<String>Value for meta.mainProgram in the generated Nix derivation.
When set, the rendered derivation includes
mainProgram = "<value>"; inside the meta block, telling Nix
which binary nix run should execute when the derivation
contains multiple executables. Templated: supports
{{ Version }} etc. Omitted when unset.
required: Option<bool>Override whether this publisher failing should fail the overall release.
Default: false — a failure here is logged but does not abort the release.
Set to true to fail the release on any error.
if_condition: Option<String>Template-conditional gate: when the rendered result is falsy
("false" / "0" / "no" / empty), the Nix publisher is
skipped. Render failure hard-errors. Config key: nix[].if:.
retain_on_rollback: Option<bool>When true, a triggered rollback leaves this publisher’s work in
place rather than attempting to undo it. Default false.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NixConfig
impl<'de> Deserialize<'de> for NixConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for NixConfig
impl JsonSchema for NixConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PublisherGateOverrides for NixConfig
impl PublisherGateOverrides for NixConfig
Source§fn required_override(&self) -> Option<bool>
fn required_override(&self) -> Option<bool>
required: override. None keeps the publisher’s
built-in default; Some(true) anywhere escalates the release gate.Source§fn retain_on_rollback_override(&self) -> Option<bool>
fn retain_on_rollback_override(&self) -> Option<bool>
retain_on_rollback: override. Some(true) anywhere
opts the publisher’s successful work out of rollback.