Skip to content

DeterminateSystems/flake-schemas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flake schemas

Note

Flake schemas are not yet supported in Nix. You can track ongoing work in this pull request against the upstream project. Until that merges, you may see this warning:

warning: unknown flake output 'schemas'

You can also experiment with flake schemas using a candidate version of Nix.

This Nix flake provides a set of schema definitions for commonly used flake output types. It's used by default for flakes that do not have a schemas output.

It supports the following flake output types:

Experimenting with flake schemas

Flake schemas are not yet supported in Nix. To experiment with them, you can use the version of Nix from the pull request to upstream. Below are some example commands.

Warning

The first time you run one of the commands, you will build Nix in its entirety, which is resource intensive and could take a while.

# Display the flake schema for this repo
nix run github:DeterminateSystems/nix-src/flake-schemas -- \
  flake show "https://flakehub.com/f/DeterminateSystems/flake-schemas/*"

# Display the flake schema for this repo as JSON
nix run github:DeterminateSystems/nix-src/flake-schemas -- \
  flake show --json "https://flakehub.com/f/DeterminateSystems/flake-schemas/*"

# Display the flake schema for Nixpkgs
nix run github:DeterminateSystems/nix-src/flake-schemas -- \
  flake show "https://flakehub.com/f/NixOS/nixpkgs/*"

# Display the flake schema for Nixpkgs as JSON
nix run github:DeterminateSystems/nix-src/flake-schemas -- \
  flake show --json "https://flakehub.com/f/NixOS/nixpkgs/*"

Development

After making changes to flake-schemas, be sure to run the tests:

nix flake check -L ./tests

To apply formatting, run the following:

nix develop ./tests -c treefmt

Read more

About

Schemas for common flake output types

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 7

Languages