{"id":19831917,"url":"https://github.com/nixie-dev/templates","last_synced_at":"2025-02-28T17:44:40.126Z","repository":{"id":150670632,"uuid":"611154060","full_name":"nixie-dev/templates","owner":"nixie-dev","description":"Default project templates for Nixie","archived":false,"fork":false,"pushed_at":"2023-04-04T09:44:38.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T10:19:25.400Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nixie-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-03-08T08:24:57.000Z","updated_at":"2023-03-21T13:59:33.000Z","dependencies_parsed_at":"2023-04-09T21:01:58.493Z","dependency_job_id":null,"html_url":"https://github.com/nixie-dev/templates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixie-dev%2Ftemplates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixie-dev%2Ftemplates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixie-dev%2Ftemplates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixie-dev%2Ftemplates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nixie-dev","download_url":"https://codeload.github.com/nixie-dev/templates/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241191626,"owners_count":19925302,"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":[],"created_at":"2024-11-12T11:35:41.606Z","updated_at":"2025-02-28T17:44:40.100Z","avatar_url":"https://github.com/nixie-dev.png","language":"Nix","readme":"# Project templates for [Nixie]\n\n## DISCLAIMER\n\nThis documentation, and the templates specifications, are currently a work in progress and are subject to change.\n\n---\n\n## How do I use this?\n\nThese templates are automatically retrieved by [Nixie] when initializing a new project. This repository **does not** contain code intended to be used on its own.\n\n## Structure of a template\n\nTemplates use a very hands-off process to initialize a repository for use with Nix flakes.\n\nA template derivation must contain these directories:\n\n\n### The `lib` directory\n\nThis directory is expected to contain a single executable: `lib/predicate`. This executable will be merged into the `.#predicates` flake to identify the project type in a repository.\n\nThe predicate will be run with the repository Nixie is being run in as the work directory, and no arguments.\n\nThe predicate **must** exit with code `0` if the repository contains files matching the template's build system (e.g. the `python` template looks for `pyproject.toml`).\nThe predicate **must** exit with a non-zero code otherwise.\n\nThe predicate **must not** create, delete or modify files in its work directory.\n\n\n### The `bin` directory\n\nThis contains executables to be run when applying the template:\n\n#### `bin/scan` - the dependency resolver\nThis executable will be run in one of two situations:\n\n##### The `skel/flake.nix` contains references to `nixie-env` other than `nixie-env.tools`\nIn that case, `scan` will be run for each unique field of `nixie-env` referenced in `skel/flake.nix`, with the name of the field passed as a unique argument.\n\nThe executable is expected to scan the repository for potential dependencies, then return file paths (one per line) to be fed to [`nix-index`] . (e.g. `project.dependencies = [ \"flit\" ]` might cause the `python` template's `scan` to return `/lib/python3.10/site-packages/flit`).\n\n##### The `skel/flake.nix` does not contain references to `nixie-env` other than `nixie-env.tools`\nIn that case, `scan` will be run **once** with no arguments, and is expected to run a flake-aware dependency resolver, and not return anything. (e.g. the `rust` template will run `nix run github:cargo2nix/cargo2nix/unstable`).\n\n\n#### `bin/create` - the first-run initializer\nThis executable will be run **iff** the repository is being initialized from a template, **and** the predicate for that template is false. (e.g. when `nixie for python` is run and `pyproject.toml` does not exist)\n\nThis executable should perform interactive tasks to initialize the project (e.g. the `rust` template would run `cargo init`).\n\n### The `skel` directory\n\nThis directory is expected to contain at least `flake.nix`, which **must** match certain properties.\n\nAny other file or directory in `skel` will be copied as-is into the repository **iff** they do not already exist.\n\n\n\n[Nixie]: https://github.com/nixie-dev/nixie\n[`nix-index`]: https://github.com/bennofs/nix-index\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixie-dev%2Ftemplates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnixie-dev%2Ftemplates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixie-dev%2Ftemplates/lists"}