Repository: nix-community/crate2nix
Branch: master
Commit: b873ca53dd64
Files: 260
Total size: 778.9 KB
Directory structure:
gitextract_j4pbtguo/
├── .envrc
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ └── bug_report.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── static-docs.yml
│ ├── tests-nix-linux.yml
│ ├── tests-nix-macos.yml
│ └── update-flake-lock.yml
├── .gitignore
├── CHANGELOG.md
├── CLAUDE.md
├── CONTRIBUTING.md
├── LICENSE-APACHE
├── LICENSE-MIT
├── README.md
├── RELEASE.md
├── cargo.sh
├── crate2nix/
│ ├── Cargo.json
│ ├── Cargo.nix
│ ├── Cargo.toml
│ ├── crate-hashes.json
│ ├── default-json.nix
│ ├── default.nix
│ ├── deny.toml
│ ├── flake-module.nix
│ ├── mk-crate2nix.nix
│ ├── rustfmt.toml
│ ├── src/
│ │ ├── command.rs
│ │ ├── config.rs
│ │ ├── json_output.rs
│ │ ├── lib.rs
│ │ ├── lock.rs
│ │ ├── main.rs
│ │ ├── metadata.rs
│ │ ├── nix_build.rs
│ │ ├── prefetch.rs
│ │ ├── render.rs
│ │ ├── resolve.rs
│ │ ├── sources.rs
│ │ ├── test.rs
│ │ └── util.rs
│ ├── templates/
│ │ ├── Cargo-workspace.toml.tera
│ │ ├── Cargo.nix.tera
│ │ ├── crate2nix-sources.nix.tera
│ │ └── nix/
│ │ └── crate2nix/
│ │ ├── default.nix
│ │ └── tests/
│ │ ├── default.nix
│ │ ├── dependencyDerivations.nix
│ │ ├── dependencyFeatures.nix
│ │ ├── enableFeatures.nix
│ │ ├── expandFeatures.nix
│ │ ├── packageFeatures.nix
│ │ ├── run.nix
│ │ └── tests.nix
│ └── tests/
│ └── self_build_up_to_date.rs
├── crate2nix.sh
├── default.nix
├── docs/
│ ├── .gitignore
│ ├── .vscode/
│ │ ├── extensions.json
│ │ └── launch.json
│ ├── README.md
│ ├── astro.config.mjs
│ ├── flake-module.nix
│ ├── package.json
│ ├── src/
│ │ ├── content/
│ │ │ ├── config.ts
│ │ │ └── docs/
│ │ │ ├── 10_getting_started/
│ │ │ │ ├── 10_flake_template_new.md
│ │ │ │ ├── 20_installing_crate2nix.md
│ │ │ │ └── 30_running_crate2nix_without_install.md
│ │ │ ├── 20_generating/
│ │ │ │ ├── 10_generating.md
│ │ │ │ └── 20_auto_generating.mdx
│ │ │ ├── 30_building/
│ │ │ │ ├── 10_building_binaries.md
│ │ │ │ ├── 20_choosing_features.md
│ │ │ │ ├── 30_crateOverrides.md
│ │ │ │ └── 40_tests.md
│ │ │ ├── 35_toolchains/
│ │ │ │ ├── 10_custom_toolchains.md
│ │ │ │ └── 20_using_a_rust_overlay.md
│ │ │ ├── 40_external_sources/
│ │ │ │ ├── 10_building_fetched_sources.md
│ │ │ │ └── 20_generating_for_fetched_sources.md
│ │ │ ├── 50_contributing/
│ │ │ │ ├── 00_intro.md
│ │ │ │ ├── 05_code.md
│ │ │ │ ├── 10_docs.md
│ │ │ │ └── 90_release.md
│ │ │ ├── 70_design/
│ │ │ │ ├── 10_structure_and_phases.md
│ │ │ │ ├── 50_tools_nix.mdx
│ │ │ │ └── 90_inspiration.md
│ │ │ ├── 90_reference/
│ │ │ │ ├── 10_runtime_dependencies.md
│ │ │ │ ├── 20_known_restrictions.md
│ │ │ │ └── 90_CHANGELOG.md
│ │ │ └── index.mdx
│ │ └── env.d.ts
│ └── tsconfig.json
├── flake.nix
├── lib/
│ └── build-from-json.nix
├── nix/
│ ├── devshell/
│ │ └── flake-module.nix
│ ├── flakeInput.nix
│ ├── nix-test-runner/
│ │ ├── README.md
│ │ ├── default.nix
│ │ ├── package.nix
│ │ └── runTest.nix
│ ├── nixpkgs.nix
│ ├── perSystem-tools/
│ │ └── flake-module.nix
│ └── pre-commit/
│ └── flake-module.nix
├── nix-test.sh
├── nixpkgs-fmt.sh
├── out-of-tree-sources.md
├── regenerate_cargo_nix.sh
├── run_tests.sh
├── sample_projects/
│ ├── aliased-dependencies/
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ ├── hello/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ └── src/
│ │ └── main.rs
│ ├── bin/
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ └── src/
│ │ └── main.rs
│ ├── bin_required_features/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── bin/
│ │ │ └── bin_not_to_be_compiled.rs
│ │ └── main.rs
│ ├── bin_with_default_features/
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ ├── override-root-features.nix
│ │ └── src/
│ │ └── main.rs
│ ├── bin_with_dep_features/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── bin_with_git_branch_dep/
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ └── src/
│ │ └── main.rs
│ ├── bin_with_git_submodule_dep/
│ │ ├── Cargo.nix
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ ├── default-with-customBuildRustCrate.nix
│ │ ├── default-with-customBuildRustCrateForPkgs.nix
│ │ ├── default.nix
│ │ └── src/
│ │ └── main.rs
│ ├── bin_with_lib_dep/
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ └── src/
│ │ └── main.rs
│ ├── bin_with_lib_git_dep/
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ └── src/
│ │ └── main.rs
│ ├── bin_with_rerenamed_lib_dep/
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ └── src/
│ │ └── main.rs
│ ├── cdylib/
│ │ ├── Cargo.toml
│ │ ├── src/
│ │ │ └── lib.rs
│ │ └── test.nix
│ ├── cfg-test/
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ ├── snowflake.txt
│ │ ├── src/
│ │ │ ├── lib.rs
│ │ │ └── main.rs
│ │ ├── test.nix
│ │ └── tests/
│ │ └── echo_foo_test.rs
│ ├── codegen/
│ │ ├── Cargo.nix
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── crate-hashes.json
│ │ └── src/
│ │ └── main.rs
│ ├── conditional_features/
│ │ ├── Cargo.toml
│ │ ├── optional/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ └── src/
│ │ └── main.rs
│ ├── cross_compile_build_dependencies/
│ │ ├── Cargo.toml
│ │ ├── alice/
│ │ │ ├── Cargo.toml
│ │ │ ├── bob/
│ │ │ │ ├── Cargo.toml
│ │ │ │ └── src/
│ │ │ │ └── lib.rs
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ ├── default.nix
│ │ └── src/
│ │ └── main.rs
│ ├── dependency_issue_65/
│ │ ├── Cargo.toml
│ │ ├── default.nix
│ │ └── src/
│ │ └── main.rs
│ ├── empty_cross/
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── default.nix
│ │ └── src/
│ │ └── lib.rs
│ ├── future_util_multi_version/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── futures_compat/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── integration_test/
│ │ ├── Cargo.json
│ │ ├── Cargo.toml
│ │ ├── src/
│ │ │ └── main.rs
│ │ ├── test-json.nix
│ │ ├── test.nix
│ │ └── tests/
│ │ ├── hello
│ │ └── integration_test.rs
│ ├── lib/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── lib.rs
│ ├── lib_and_bin/
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ └── src/
│ │ ├── lib.rs
│ │ └── main.rs
│ ├── multiple_bin/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── bin1.rs
│ │ ├── bin2.rs
│ │ └── main.rs
│ ├── nix_workspaces/
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ └── nix/
│ │ └── sources.nix
│ ├── numtest/
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ └── src/
│ │ └── main.rs
│ ├── numtest_new_cargo_lock/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── renamed_build_deps/
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── main.rs
│ ├── renamed_dev_deps/
│ │ ├── Cargo.toml
│ │ ├── src/
│ │ │ └── lib.rs
│ │ ├── test.nix
│ │ └── tests.rs
│ ├── renaming/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── simple_dep/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── sub_dir_crates/
│ │ ├── Cargo.nix
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ └── src/
│ │ └── main.rs
│ ├── test_flag_passing/
│ │ ├── Cargo.toml
│ │ ├── src/
│ │ │ ├── lib.rs
│ │ │ └── main.rs
│ │ └── test.nix
│ ├── with_problematic_crates/
│ │ ├── Cargo.toml
│ │ ├── crate-hashes.json
│ │ ├── default.nix
│ │ └── src/
│ │ └── main.rs
│ └── workspace_with_nondefault_lib/
│ ├── Cargo.toml
│ └── crates/
│ ├── main/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ └── somelib/
│ ├── Cargo.toml
│ └── src/
│ └── somelib.rs
├── sample_workspace/
│ ├── Cargo.toml
│ ├── bin/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── bin_with_cond_lib_dep/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── bin_with_default_features/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── bin_with_lib_dep/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── crate-hashes.json
│ ├── lib/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── lib.rs
│ ├── lib_and_bin/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── lib.rs
│ │ └── main.rs
│ └── with_tera/
│ ├── Cargo.toml
│ └── src/
│ └── main.rs
├── shell.nix
├── templates/
│ └── flake-binary/
│ ├── .envrc
│ ├── .gitignore
│ ├── Cargo.toml
│ ├── flake.nix
│ ├── nix/
│ │ ├── devshell/
│ │ │ └── flake-module.nix
│ │ └── rust-overlay/
│ │ └── flake-module.nix
│ ├── rust-toolchain.toml
│ └── src/
│ └── main.rs
├── tests.nix
└── tools.nix
================================================
FILE CONTENTS
================================================
================================================
FILE: .envrc
================================================
#!/usr/bin/env bash
# ^ make editor happy
#
# Use https://direnv.net/ to automatically load the dev shell.
#
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
fi
watch_file nix/**
watch_file -- **/*.nix
# Adding files to git includes them in a flake
# But it is also a bit much reloading.
# watch_file .git/index .git/HEAD
use flake . --show-trace
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug Report
about: Report a bug with crate2nix
title: ''
labels: bug
assignees: ''
---
## Description
A clear description of the bug.
## Steps to Reproduce
1.
2.
3.
## Expected Behavior
What you expected to happen.
## Actual Behavior
What actually happened. Include error messages if applicable.
## Environment
- crate2nix version:
- Nix version:
- OS:
## Reproducible Test Case
**To help us fix this issue quickly, please provide a minimal reproducible example.**
The best way to do this is to submit a PR that adds a sample project to `sample_projects/`:
1. Create a minimal Cargo project that reproduces the issue
2. Add it to `sample_projects/your_project_name/`
3. Run `./regenerate_cargo_nix.sh` to generate the `Cargo.nix`
4. The test suite (`./run_tests.sh` or `nix flake check`) should demonstrate the failure
See existing projects in `sample_projects/` for examples of the expected structure.
If you can't submit a PR, please share:
- Your `Cargo.toml` and `Cargo.lock`
- Any relevant `crate2nix.json` configuration
- The generated `Cargo.nix` (or the error if generation fails)
================================================
FILE: .github/dependabot.yml
================================================
# Set update schedule for GitHub Actions
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "monthly"
exclude-paths:
- "sample_projects/**"
- "sample_workspace/**"
================================================
FILE: .github/workflows/static-docs.yml
================================================
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v17
with:
name: eigenvalue
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: 'nix build .#docs'
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: 'result'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
================================================
FILE: .github/workflows/tests-nix-linux.yml
================================================
name: "tests-nix-linux"
on:
pull_request:
push:
jobs:
tests:
strategy:
matrix:
platform:
- ubuntu-latest
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v6
- uses: wimpysworld/nothing-but-nix@main
- uses: cachix/install-nix-action@v31
with:
install_url: "https://releases.nixos.org/nix/nix-2.33.0/install"
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v17
with:
name: eigenvalue
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: "./run_tests.sh --no-cargo-build"
- run: "nix --version"
- run: "nix flake check -L"
- run: "nix run . -- --help"
================================================
FILE: .github/workflows/tests-nix-macos.yml
================================================
name: "tests-nix-macos"
on:
pull_request:
push:
jobs:
tests:
strategy:
matrix:
platform:
- macos-latest
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
with:
install_url: "https://releases.nixos.org/nix/nix-2.33.0/install"
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v17
with:
name: eigenvalue
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: "./run_tests.sh --no-cargo-build"
- run: "nix --version"
- run: "nix flake check -L"
- run: "nix run . -- --help"
================================================
FILE: .github/workflows/update-flake-lock.yml
================================================
name: update-flake-lock
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '35 12 * * 3'
jobs:
lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@main
with:
pr-title: "Update flake.lock"
pr-labels: |
dependencies
automated
================================================
FILE: .gitignore
================================================
target
**/*.rs.bk
.idea
*.iml
/result*
/sample_projects/*/result
crate2nix/result*
/*.json
*.log
*~
# cachix tmp file
store-path-pre-build
# Devenv
.devenv*
devenv.local.nix
# direnv
.direnv
# pre-commit
.pre-commit-config.yaml
template/flake.lock
# Editor configuration
.zed/settings.json
.vscode/settings.json
================================================
FILE: CHANGELOG.md
================================================
# CHANGELOG
See
[CHANGELOG](https://nix-community.github.io/crate2nix/90_reference/90_changelog/).
================================================
FILE: CLAUDE.md
================================================
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working
with code in this repository.
## Project Overview
crate2nix generates Nix build files (`Cargo.nix`) for Rust/Cargo projects,
enabling crate-by-crate hermetic builds with Nix. It reads
`Cargo.toml`/`Cargo.lock`, resolves dependencies, prefetches hashes, and
renders Nix derivations via Tera templates.
## Development Environment
The project uses a Nix flake with direnv integration. Enter the dev shell
via `direnv allow` or `nix develop`. All shell scripts (e.g., `cargo.sh`,
`run_tests.sh`) auto-enter the pure nix-shell if not already inside.
## Common Commands
### Build
```bash
nix build # Build crate2nix via Nix
./cargo.sh build # Build with cargo (inside nix-shell)
```
### Test
```bash
./run_tests.sh # Full test suite
./run_tests.sh --no-cargo-build # Skip cargo build/test steps (Nix-only)
./cargo.sh test # Rust unit tests only
./cargo.sh test test_name # Single Rust test
./nix-test.sh ./crate2nix/templates/nix/crate2nix/tests/default.nix
nix flake check # Nix integration tests
```
### Lint & Format
```bash
./cargo.sh clippy # Rust linting
./cargo.sh fmt # Rust formatting
./nixpkgs-fmt.sh \
./{,nix/}{,*/}*.nix \
./crate2nix/templates/nix/crate2nix/{*.nix,tests/*.nix} \
./sample_projects/*/[[:lower:]]*.nix # Nix formatting
```
### Regenerate Generated Files
```bash
./regenerate_cargo_nix.sh # Regenerate all Cargo.nix files
```
### Docs (Astro/Starlight site in `docs/`)
```bash
nix build .#docs # Build static docs site
cd docs && npm run dev # Local dev server
cd docs && npm run build # Build via npm directly
```
## Architecture
### Rust Source (`crate2nix/src/`)
The CLI entry point is `main.rs` using `structopt`. The main command is
`generate`.
Core pipeline in `lib.rs` via `BuildInfo::for_config()`:
1. **metadata.rs** - Calls `cargo metadata`, merges results from
multiple Cargo.toml files into `IndexedMetadata`
2. **resolve.rs** - Resolves each package into `CrateDerivation` with
source type (`CratesIo`, `Git`, `Registry`, etc.), dependencies
(normal/build/dev), platform conditions, and features
3. **lock.rs** - Parses `Cargo.lock` to extract checksums, avoiding
unnecessary prefetches
4. **prefetch.rs** - Prefetches SHA256 hashes via
`nix-prefetch-url`/`nix-prefetch-git`, caches in
`crate-hashes.json` and `registry-hashes.json`
5. **render.rs** - Renders output using Tera templates
6. **config.rs** - Reads optional `crate2nix.json` for out-of-tree
sources and configuration
7. **sources.rs** - Manages source fetching for crates.io, git, and
alternative registries
### Nix Templates (`crate2nix/templates/`)
- `Cargo.nix.tera` - Main output template; generates a Nix file that
provides `rootCrate`, `workspaceMembers`, and per-crate derivations
- `nix/` - Template includes for the build infrastructure (crate
building, feature resolution, etc.)
### Key Nix Files (repo root)
- `tools.nix` - Public Nix API; provides `generatedCargoNix` helper
for generating Cargo.nix in Nix builds
- `tests.nix` - Integration test harness; defines `buildTest` function
and runs all `sample_projects/`
- `default.nix` - Package derivation for crate2nix itself
### Sample Projects (`sample_projects/`)
30+ test projects covering various scenarios: binary/library crates,
features, git dependencies, workspaces, cross-compilation, cdylib,
codegen, etc. Each has a pregenerated `Cargo.nix` that gets regenerated
by `regenerate_cargo_nix.sh`.
## Key Conventions
- Rust edition 2021, `#![forbid(unsafe_code)]`,
`#![deny(missing_docs)]` in lib.rs
- Rust formatting: edition 2018 style with reordered imports
(`rustfmt.toml`)
- Nix formatting: `nixpkgs-fmt`
- License: Apache-2.0 (Rust crate), dual Apache-2.0/MIT (repo)
- Version tags use bare numbers (e.g., `0.14.2`, not `v0.14.2`)
- The `Cargo.nix` files are checked into git; `run_tests.sh` verifies
no uncommitted changes after regeneration
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing
See
[Contributing](https://nix-community.github.io/crate2nix/50_contributing/00_intro/).
================================================
FILE: LICENSE-APACHE
================================================
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/LICENSE-2.0
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: LICENSE-MIT
================================================
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
# crate2nix
[](https://github.com/nix-community/crate2nix/actions/workflows/tests-nix-linux.yml)
[](https://github.com/nix-community/crate2nix/actions/workflows/tests-nix-macos.yml)
[](https://crates.io/crates/crate2nix)
`crate2nix` generates [Nix](https://nixos.org/nix/) build files for
[Rust](https://www.rust-lang.org/)/[Cargo](https://crates.io/) projects,
building each crate individually for precise, incremental rebuilds.
- **Incremental CI builds** -- only rebuild the crates that actually changed.
- **Full Nix integration** -- remote builds, binary caches, Docker images, NixOS modules.
- **Local dev unchanged** -- keep using `cargo` and `rust-analyzer` as usual.
## Quick start
### Without installing
```bash
nix run nixpkgs#crate2nix -- generate
nix build -f Cargo.nix rootCrate.build
```
### With a flake template
```bash
nix flake init --template github:nix-community/crate2nix
```
### Installing
```bash
# From nixpkgs
nix profile install nixpkgs#crate2nix
# Latest development version
nix profile install github:nix-community/crate2nix
```
Then, inside your project:
```bash
crate2nix generate # creates Cargo.nix
nix build -f Cargo.nix rootCrate.build
```
## How it works
`crate2nix` reads `Cargo.toml` and `Cargo.lock`, resolves the full dependency
tree via `cargo metadata`, prefetches source hashes, and renders a `Cargo.nix`
file through Tera templates. The generated file contains one Nix derivation per
crate, so Nix rebuilds only what changed.
Two generation strategies are supported:
| Strategy | Pros | Cons |
| --- | --- | --- |
| **Manual** (`crate2nix generate`) | No IFD, full build parallelism | Must regenerate when deps change |
| **Auto** (Import From Derivation) | Always in sync with `Cargo.lock` | May reduce parallelism |
## Nix API
`tools.nix` exposes helpers for use in your own Nix expressions:
```nix
let
crate2nix = builtins.fetchTarball "https://github.com/nix-community/crate2nix/tarball/master";
tools = import "${crate2nix}/tools.nix" { inherit pkgs; };
generated = tools.generatedCargoNix {
name = "my-project";
src = ./.;
};
project = pkgs.callPackage "${generated}/default.nix" {};
in
project.rootCrate.build
```
Or the shorthand `appliedCargoNix` which combines generation and import.
## JSON output (experimental)
`crate2nix generate --format json` emits a pre-resolved JSON file instead of
`Cargo.nix`. All dependency resolution — feature expansion, `cfg()` platform
filtering, optional dep activation — happens in Rust, so the Nix side is a
trivial data consumer with no O(n×m) eval-time logic.
### Generating
```bash
crate2nix generate --format json
```
This writes `./Cargo.json` by default (use `-o` to override). The output is
compact: empty fields and already-resolved feature maps are omitted, so the
JSON is typically smaller than the equivalent `Cargo.nix`.
### Consuming in Nix
Use `lib/build-from-json.nix` (shipped in this repo) to turn the JSON into
`buildRustCrate` derivations:
```nix
let
cargoNix = import ./lib/build-from-json.nix {
inherit pkgs;
src = ./.;
resolvedJson = ./Cargo.json;
};
in {
# Single crate
my-binary = cargoNix.workspaceMembers.my-crate.build;
# Root crate (if the workspace has one)
default = cargoNix.rootCrate.build;
# All workspace members linked together
all = cargoNix.allWorkspaceMembers;
}
```
The consumer accepts two optional arguments for customisation:
- `buildRustCrateForPkgs` — override the `buildRustCrate` used (e.g. for a
custom toolchain)
- `defaultCrateOverrides` — per-crate build fixups, same as the existing
`Cargo.nix` workflow
## Documentation
Full documentation is at
****, covering:
- [Installation options](https://nix-community.github.io/crate2nix/10_getting_started/20_installing_crate2nix/)
- [Generation strategies](https://nix-community.github.io/crate2nix/20_generating/10_generating/)
- [Building binaries](https://nix-community.github.io/crate2nix/30_building/10_building_binaries/)
- [Feature selection](https://nix-community.github.io/crate2nix/30_building/20_choosing_features/)
- [Crate overrides](https://nix-community.github.io/crate2nix/30_building/30_crateoverrides/)
- [Known restrictions](https://nix-community.github.io/crate2nix/90_reference/20_known_restrictions/)
- [Changelog](https://nix-community.github.io/crate2nix/90_reference/90_changelog/)
## Contributing
Contributions are welcome! See the
[contributing guide](https://nix-community.github.io/crate2nix/50_contributing/)
for details.
## License
Apache-2.0
================================================
FILE: RELEASE.md
================================================
# Creating a release
Release checklist for crate2nix maintainers.
- [ ] Update flake dependencies: `nix flake update`
- [ ] `./run_tests.sh`
- [ ] Verify build on Mac OS X
- [ ] Verify that generated output looks nice
- [ ] Verify that CHANGELOG is up-to-date
- [ ] Verify that new features are documented
- [ ] Bump version in `crate2nix/Cargo.toml`
- [ ] `./run_tests.sh` to regenerate sources after version bump
- [ ] Tag version e.g. `0.14.2` (without leading `v`)
- [ ] Push
- [ ] `cargo publish`
- [ ] In `flake.nix`: bump input `crate2nix_stable` to the new tag
- [ ] Create release from tag
================================================
FILE: cargo.sh
================================================
#!/usr/bin/env bash
# Executes cargo from the pinned nixpkgs
#
# Example: ./cargo.sh test
set -Eeuo pipefail
top="$(dirname "$0")"
top="$(cd "$top"; pwd)"
if [ -z "${IN_CRATE2NIX_SHELL:-}" ]; then
echo "=== Entering $top/shell.nix"
exec nix-shell --pure "$top/shell.nix" --run "$(printf "%q " $0 "$@")"
fi
export TEMPLATES_DIR="$top/crate2nix/templates"
cargo "$@"
================================================
FILE: crate2nix/Cargo.json
================================================
{
"generator": "@generated by crate2nix",
"root": "crate2nix",
"workspaceMembers": {
"crate2nix": "crate2nix"
},
"crates": {
"aho-corasick": {
"crateName": "aho-corasick",
"version": "1.1.3",
"edition": "2021",
"sha256": "05mrpkvdgp5d20y2p989f187ry9diliijgwrs254fs9s1m1x6q4f",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "memchr",
"packageId": "memchr"
}
],
"resolvedDefaultFeatures": [
"default",
"perf-literal",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Andrew Gallant "
]
},
"ansi_term": {
"crateName": "ansi_term",
"version": "0.12.1",
"edition": "2015",
"sha256": "1ljmkbilxgmhavxvxqa7qvm6f3fjggi7q2l3a72q9x0cxjvrnanm",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "winapi",
"packageId": "winapi",
"target": "cfg(target_os = \"windows\")"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"ogham@bsago.me",
"Ryan Scheel (Havvy) ",
"Josh Triplett "
]
},
"anyhow": {
"crateName": "anyhow",
"version": "1.0.86",
"edition": "2018",
"sha256": "1nk301x8qhpdaks6a9zvcp7yakjqnczjmqndbg7vk4494d3d1ldk",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"default",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"David Tolnay "
]
},
"atty": {
"crateName": "atty",
"version": "0.2.14",
"edition": "2015",
"sha256": "1s7yslcs6a28c5vz7jwj63lkfgyx8mx99fdirlhi9lbhhzhrpcyr",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "hermit-abi",
"packageId": "hermit-abi",
"target": "cfg(target_os = \"hermit\")"
},
{
"name": "libc",
"packageId": "libc",
"target": "cfg(unix)"
},
{
"name": "winapi",
"packageId": "winapi",
"target": "cfg(windows)"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"softprops "
]
},
"bitflags 1.3.2": {
"crateName": "bitflags",
"version": "1.3.2",
"edition": "2018",
"sha256": "12ki6w8gn1ldq7yz9y680llwk5gmrhrzszaa17g1sbrw2r2qvwxy",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"default"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The Rust Project Developers"
]
},
"bitflags 2.6.0": {
"crateName": "bitflags",
"version": "2.6.0",
"edition": "2021",
"sha256": "1pkidwzn3hnxlsl8zizh0bncgbjnw7c41cx7bby26ncbzmiznj5h",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"The Rust Project Developers"
]
},
"block-buffer": {
"crateName": "block-buffer",
"version": "0.10.4",
"edition": "2018",
"sha256": "0w9sa2ypmrsqqvc20nhwr75wbb5cjr4kkyhpjm1z1lv2kdicfy1h",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "generic-array",
"packageId": "generic-array"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"RustCrypto Developers"
]
},
"bstr": {
"crateName": "bstr",
"version": "1.9.1",
"edition": "2021",
"sha256": "01ipr5rncw3kf4dyc1p2g00njn1df2b0xpviwhb8830iv77wbvq5",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "memchr",
"packageId": "memchr"
}
],
"resolvedDefaultFeatures": [
"alloc",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Andrew Gallant "
]
},
"camino": {
"crateName": "camino",
"version": "1.1.7",
"edition": "2018",
"sha256": "0ff28kc3qjcrmi8k88b2j2p7mzrvbag20yqcrj9sl30n3fanpv70",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "serde",
"packageId": "serde"
}
],
"resolvedDefaultFeatures": [
"serde",
"serde1"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Without Boats ",
"Ashley Williams ",
"Steve Klabnik ",
"Rain "
]
},
"cargo-platform": {
"crateName": "cargo-platform",
"version": "0.1.8",
"edition": "2021",
"sha256": "1z5b7ivbj508wkqdg2vb0hw4vi1k1pyhcn6h1h1b8svcb8vg1c94",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "serde",
"packageId": "serde"
}
],
"libCrateTypes": [
"lib"
]
},
"cargo_metadata": {
"crateName": "cargo_metadata",
"version": "0.18.1",
"edition": "2018",
"sha256": "0drh0zndl4qgndy6kg6783cydbvhxgv0hcg7d9hhqx0zwi3nb21d",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "camino",
"packageId": "camino"
},
{
"name": "cargo-platform",
"packageId": "cargo-platform"
},
{
"name": "semver",
"packageId": "semver"
},
{
"name": "serde",
"packageId": "serde"
},
{
"name": "serde_json",
"packageId": "serde_json"
},
{
"name": "thiserror",
"packageId": "thiserror"
}
],
"resolvedDefaultFeatures": [
"default"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Oliver Schneider "
]
},
"cfg-if": {
"crateName": "cfg-if",
"version": "1.0.0",
"edition": "2018",
"sha256": "1za0vb97n4brpzpv8lsbnzmq5r8f2b0cpqqr0sy8h5bn751xxwds",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Alex Crichton "
]
},
"clap": {
"crateName": "clap",
"version": "2.34.0",
"edition": "2018",
"sha256": "071q5d8jfwbazi6zhik9xwpacx5i6kb2vkzy060vhf0c3120aqd0",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "ansi_term",
"packageId": "ansi_term",
"target": "cfg(not(windows))"
},
{
"name": "atty",
"packageId": "atty"
},
{
"name": "bitflags",
"packageId": "bitflags 1.3.2"
},
{
"name": "strsim",
"packageId": "strsim"
},
{
"name": "textwrap",
"packageId": "textwrap"
},
{
"name": "unicode-width",
"packageId": "unicode-width"
},
{
"name": "vec_map",
"packageId": "vec_map"
}
],
"resolvedDefaultFeatures": [
"ansi_term",
"atty",
"color",
"default",
"strsim",
"suggestions",
"vec_map"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Kevin K. "
]
},
"colored-diff": {
"crateName": "colored-diff",
"version": "0.2.3",
"edition": "2015",
"sha256": "1dfwjxd13f8l8bdzm76kkp6cp4sr1pyc8lavp52avwy313mhh0j1",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "ansi_term",
"packageId": "ansi_term"
},
{
"name": "dissimilar",
"packageId": "dissimilar"
},
{
"name": "itertools",
"packageId": "itertools 0.10.5"
}
],
"libCrateTypes": [
"lib"
]
},
"cpufeatures": {
"crateName": "cpufeatures",
"version": "0.2.12",
"edition": "2018",
"sha256": "012m7rrak4girqlii3jnqwrr73gv1i980q4wra5yyyhvzwk5xzjk",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "libc",
"packageId": "libc",
"target": "aarch64-linux-android"
},
{
"name": "libc",
"packageId": "libc",
"target": "cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))"
},
{
"name": "libc",
"packageId": "libc",
"target": "cfg(all(target_arch = \"aarch64\", target_vendor = \"apple\"))"
},
{
"name": "libc",
"packageId": "libc",
"target": "cfg(all(target_arch = \"loongarch64\", target_os = \"linux\"))"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"RustCrypto Developers"
]
},
"crate2nix": {
"crateName": "crate2nix",
"version": "0.15.0",
"edition": "2021",
"source": {
"type": "local",
"path": "."
},
"dependencies": [
{
"name": "anyhow",
"packageId": "anyhow"
},
{
"name": "cargo-platform",
"packageId": "cargo-platform"
},
{
"name": "cargo_metadata",
"packageId": "cargo_metadata"
},
{
"name": "hex",
"packageId": "hex"
},
{
"name": "itertools",
"packageId": "itertools 0.12.1"
},
{
"name": "lazy_static",
"packageId": "lazy_static"
},
{
"name": "nix-base32",
"packageId": "nix-base32"
},
{
"name": "pathdiff",
"packageId": "pathdiff"
},
{
"name": "semver",
"packageId": "semver"
},
{
"name": "serde",
"packageId": "serde"
},
{
"name": "serde_json",
"packageId": "serde_json"
},
{
"name": "structopt",
"packageId": "structopt"
},
{
"name": "tera",
"packageId": "tera"
},
{
"name": "toml",
"packageId": "toml"
},
{
"name": "url",
"packageId": "url"
}
],
"devDependencies": [
{
"name": "colored-diff",
"packageId": "colored-diff"
},
{
"name": "fs_extra",
"packageId": "fs_extra"
},
{
"name": "tempdir",
"packageId": "tempdir"
}
],
"crateBin": [
{
"name": "crate2nix",
"path": "src/main.rs"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"Peter Kolloch "
]
},
"crossbeam-deque": {
"crateName": "crossbeam-deque",
"version": "0.8.5",
"edition": "2021",
"sha256": "03bp38ljx4wj6vvy4fbhx41q8f585zyqix6pncz1mkz93z08qgv1",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "crossbeam-epoch",
"packageId": "crossbeam-epoch"
},
{
"name": "crossbeam-utils",
"packageId": "crossbeam-utils"
}
],
"resolvedDefaultFeatures": [
"default",
"std"
],
"libCrateTypes": [
"lib"
]
},
"crossbeam-epoch": {
"crateName": "crossbeam-epoch",
"version": "0.9.18",
"edition": "2021",
"sha256": "03j2np8llwf376m3fxqx859mgp9f83hj1w34153c7a9c7i5ar0jv",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "crossbeam-utils",
"packageId": "crossbeam-utils"
}
],
"resolvedDefaultFeatures": [
"alloc",
"std"
],
"libCrateTypes": [
"lib"
]
},
"crossbeam-utils": {
"crateName": "crossbeam-utils",
"version": "0.8.20",
"edition": "2021",
"sha256": "100fksq5mm1n7zj242cclkw6yf7a4a8ix3lvpfkhxvdhbda9kv12",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"std"
],
"libCrateTypes": [
"lib"
]
},
"crypto-common": {
"crateName": "crypto-common",
"version": "0.1.6",
"edition": "2018",
"sha256": "1cvby95a6xg7kxdz5ln3rl9xh66nz66w46mm3g56ri1z5x815yqv",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "generic-array",
"packageId": "generic-array"
},
{
"name": "typenum",
"packageId": "typenum"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"RustCrypto Developers"
]
},
"digest": {
"crateName": "digest",
"version": "0.10.7",
"edition": "2018",
"sha256": "14p2n6ih29x81akj097lvz7wi9b6b9hvls0lwrv7b6xwyy0s5ncy",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "block-buffer",
"packageId": "block-buffer"
},
{
"name": "crypto-common",
"packageId": "crypto-common"
}
],
"resolvedDefaultFeatures": [
"block-buffer",
"core-api",
"default"
],
"libCrateTypes": [
"lib"
],
"authors": [
"RustCrypto Developers"
]
},
"dissimilar": {
"crateName": "dissimilar",
"version": "1.0.9",
"edition": "2018",
"sha256": "0bcn4s99ghigd3yadpd7i3gljv5z2hkr07ijvvxvsxmz3yfygy2r",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"David Tolnay "
]
},
"either": {
"crateName": "either",
"version": "1.13.0",
"edition": "2018",
"sha256": "1w2c1mybrd7vljyxk77y9f4w9dyjrmp3yp82mk7bcm8848fazcb0",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"use_std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"bluss"
]
},
"equivalent": {
"crateName": "equivalent",
"version": "1.0.1",
"edition": "2015",
"sha256": "1malmx5f4lkfvqasz319lq6gb3ddg19yzf9s8cykfsgzdmyq0hsl",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
]
},
"form_urlencoded": {
"crateName": "form_urlencoded",
"version": "1.2.1",
"edition": "2018",
"sha256": "0milh8x7nl4f450s3ddhg57a3flcv6yq8hlkyk6fyr3mcb128dp1",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "percent-encoding",
"packageId": "percent-encoding"
}
],
"resolvedDefaultFeatures": [
"alloc",
"default",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The rust-url developers"
]
},
"fs_extra": {
"crateName": "fs_extra",
"version": "1.3.0",
"edition": "2018",
"sha256": "075i25z70j2mz9r7i9p9r521y8xdj81q7skslyb7zhqnnw33fw22",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Denis Kurilenko "
]
},
"fuchsia-cprng": {
"crateName": "fuchsia-cprng",
"version": "0.1.1",
"edition": "2018",
"sha256": "1fnkqrbz7ixxzsb04bsz9p0zzazanma8znfdqjvh39n14vapfvx0",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Erick Tryzelaar "
]
},
"generic-array": {
"crateName": "generic-array",
"version": "0.14.7",
"edition": "2015",
"sha256": "16lyyrzrljfq424c3n8kfwkqihlimmsg5nhshbbp48np3yjrqr45",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "typenum",
"packageId": "typenum"
}
],
"buildDependencies": [
{
"name": "version_check",
"packageId": "version_check"
}
],
"resolvedDefaultFeatures": [
"more_lengths"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Bartłomiej Kamiński ",
"Aaron Trent "
]
},
"globset": {
"crateName": "globset",
"version": "0.4.14",
"edition": "2021",
"sha256": "1qab0c1drpybgm4nc92lf8b46x0ap44c9y4k23rndgc5bfdkpnjp",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "aho-corasick",
"packageId": "aho-corasick"
},
{
"name": "bstr",
"packageId": "bstr"
},
{
"name": "log",
"packageId": "log"
},
{
"name": "regex-automata",
"packageId": "regex-automata"
},
{
"name": "regex-syntax",
"packageId": "regex-syntax"
}
],
"resolvedDefaultFeatures": [
"default",
"log"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Andrew Gallant "
]
},
"globwalk": {
"crateName": "globwalk",
"version": "0.9.1",
"edition": "2021",
"sha256": "0mz7bsa66p2rrgnz3l94ac4kbklh7mq8j30iizyxjy4qyvmn1xqb",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "bitflags",
"packageId": "bitflags 2.6.0"
},
{
"name": "ignore",
"packageId": "ignore"
},
{
"name": "walkdir",
"packageId": "walkdir"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"Gilad Naaman "
]
},
"hashbrown": {
"crateName": "hashbrown",
"version": "0.14.5",
"edition": "2021",
"sha256": "1wa1vy1xs3mp11bn3z9dv0jricgr6a2j0zkf1g19yz3vw4il89z5",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"raw"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Amanieu d'Antras "
]
},
"heck": {
"crateName": "heck",
"version": "0.3.3",
"edition": "2018",
"sha256": "0b0kkr790p66lvzn9nsmfjvydrbmh9z5gb664jchwgw64vxiwqkd",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "unicode-segmentation",
"packageId": "unicode-segmentation"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"Without Boats "
]
},
"hermit-abi": {
"crateName": "hermit-abi",
"version": "0.1.19",
"edition": "2018",
"sha256": "0cxcm8093nf5fyn114w8vxbrbcyvv91d4015rdnlgfll7cs6gd32",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "libc",
"packageId": "libc"
}
],
"resolvedDefaultFeatures": [
"default"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Stefan Lankes"
]
},
"hex": {
"crateName": "hex",
"version": "0.4.3",
"edition": "2018",
"sha256": "0w1a4davm1lgzpamwnba907aysmlrnygbqmfis2mqjx5m552a93z",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"alloc",
"default",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"KokaKiwi "
]
},
"idna": {
"crateName": "idna",
"version": "0.5.0",
"edition": "2018",
"sha256": "1xhjrcjqq0l5bpzvdgylvpkgk94panxgsirzhjnnqfdgc4a9nkb3",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "unicode-bidi",
"packageId": "unicode-bidi"
},
{
"name": "unicode-normalization",
"packageId": "unicode-normalization"
}
],
"resolvedDefaultFeatures": [
"alloc",
"default",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The rust-url developers"
]
},
"ignore": {
"crateName": "ignore",
"version": "0.4.22",
"edition": "2021",
"sha256": "1wcaqpi6djqgi1brghrdyw4d5qgnwzhqrqyn4mar4vp677gi0s5l",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "crossbeam-deque",
"packageId": "crossbeam-deque"
},
{
"name": "globset",
"packageId": "globset"
},
{
"name": "log",
"packageId": "log"
},
{
"name": "memchr",
"packageId": "memchr"
},
{
"name": "regex-automata",
"packageId": "regex-automata"
},
{
"name": "same-file",
"packageId": "same-file"
},
{
"name": "walkdir",
"packageId": "walkdir"
},
{
"name": "winapi-util",
"packageId": "winapi-util",
"target": "cfg(windows)"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"Andrew Gallant "
]
},
"indexmap": {
"crateName": "indexmap",
"version": "2.2.6",
"edition": "2021",
"sha256": "09hgwi2ig0wyj5rjziia76zmhgfj95k0jb4ic3iiawm4vlavg3qn",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "equivalent",
"packageId": "equivalent"
},
{
"name": "hashbrown",
"packageId": "hashbrown"
}
],
"resolvedDefaultFeatures": [
"default",
"std"
],
"libCrateTypes": [
"lib"
]
},
"itertools 0.10.5": {
"crateName": "itertools",
"version": "0.10.5",
"edition": "2018",
"sha256": "0ww45h7nxx5kj6z2y6chlskxd1igvs4j507anr6dzg99x1h25zdh",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "either",
"packageId": "either"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"bluss"
]
},
"itertools 0.12.1": {
"crateName": "itertools",
"version": "0.12.1",
"edition": "2018",
"sha256": "0s95jbb3ndj1lvfxyq5wanc0fm0r6hg6q4ngb92qlfdxvci10ads",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "either",
"packageId": "either"
}
],
"resolvedDefaultFeatures": [
"default",
"use_alloc",
"use_std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"bluss"
]
},
"itoa": {
"crateName": "itoa",
"version": "1.0.11",
"edition": "2018",
"sha256": "0nv9cqjwzr3q58qz84dcz63ggc54yhf1yqar1m858m1kfd4g3wa9",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"David Tolnay "
]
},
"lazy_static": {
"crateName": "lazy_static",
"version": "1.5.0",
"edition": "2015",
"sha256": "1zk6dqqni0193xg6iijh7i3i44sryglwgvx20spdvwk3r6sbrlmv",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Marvin Löbel "
]
},
"libc": {
"crateName": "libc",
"version": "0.2.155",
"edition": "2015",
"sha256": "0z44c53z54znna8n322k5iwg80arxxpdzjj5260pxxzc9a58icwp",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"default",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The Rust Project Developers"
]
},
"log": {
"crateName": "log",
"version": "0.4.22",
"edition": "2021",
"sha256": "093vs0wkm1rgyykk7fjbqp2lwizbixac1w52gv109p5r4jh0p9x7",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"The Rust Project Developers"
]
},
"memchr": {
"crateName": "memchr",
"version": "2.7.4",
"edition": "2021",
"sha256": "18z32bhxrax0fnjikv475z7ii718hq457qwmaryixfxsl2qrmjkq",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"alloc",
"default",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Andrew Gallant ",
"bluss"
]
},
"nix-base32": {
"crateName": "nix-base32",
"version": "0.1.1",
"edition": "2018",
"sha256": "04jnq6arig0amz0scadavbzn9bg9k4zphmrm1562n6ygfj1dnj45",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Peter Kolloch "
]
},
"once_cell": {
"crateName": "once_cell",
"version": "1.19.0",
"edition": "2021",
"sha256": "14kvw7px5z96dk4dwdm1r9cqhhy2cyj1l5n5b29mynbb8yr15nrz",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"alloc",
"default",
"race",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Aleksey Kladov "
]
},
"pathdiff": {
"crateName": "pathdiff",
"version": "0.2.1",
"edition": "2018",
"sha256": "1pa4dcmb7lwir4himg1mnl97a05b2z0svczg62l8940pbim12dc8",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Manish Goregaokar "
]
},
"percent-encoding": {
"crateName": "percent-encoding",
"version": "2.3.1",
"edition": "2018",
"sha256": "0gi8wgx0dcy8rnv1kywdv98lwcx67hz0a0zwpib5v2i08r88y573",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"alloc",
"default",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The rust-url developers"
]
},
"pest": {
"crateName": "pest",
"version": "2.7.10",
"edition": "2021",
"sha256": "1s4fvis7h6l872g6nk17r130kcllj4c0hjvwkzd3hi196g3320an",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "memchr",
"packageId": "memchr"
},
{
"name": "thiserror",
"packageId": "thiserror"
},
{
"name": "ucd-trie",
"packageId": "ucd-trie"
}
],
"resolvedDefaultFeatures": [
"default",
"memchr",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Dragoș Tiselice "
]
},
"pest_derive": {
"crateName": "pest_derive",
"version": "2.7.10",
"edition": "2021",
"sha256": "0n8lsk9s21dp7958p9yarbk2gsc8wg0rvdzr7cd7pjpvjf8kqa96",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "pest",
"packageId": "pest"
},
{
"name": "pest_generator",
"packageId": "pest_generator"
}
],
"resolvedDefaultFeatures": [
"default",
"std"
],
"procMacro": true,
"authors": [
"Dragoș Tiselice "
]
},
"pest_generator": {
"crateName": "pest_generator",
"version": "2.7.10",
"edition": "2021",
"sha256": "11s6q0vf25lckbzak0qndzpv87ksaxy6pa9cvn2hlizvsgvjmhiy",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "pest",
"packageId": "pest"
},
{
"name": "pest_meta",
"packageId": "pest_meta"
},
{
"name": "proc-macro2",
"packageId": "proc-macro2"
},
{
"name": "quote",
"packageId": "quote"
},
{
"name": "syn",
"packageId": "syn 2.0.68"
}
],
"resolvedDefaultFeatures": [
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Dragoș Tiselice "
]
},
"pest_meta": {
"crateName": "pest_meta",
"version": "2.7.10",
"edition": "2021",
"sha256": "1kdxl164yyjsmn01lvllsll4sz3xbgy4dmkq33n63hrp5w1418np",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "once_cell",
"packageId": "once_cell"
},
{
"name": "pest",
"packageId": "pest"
}
],
"buildDependencies": [
{
"name": "sha2",
"packageId": "sha2"
}
],
"resolvedDefaultFeatures": [
"default"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Dragoș Tiselice "
]
},
"proc-macro-error": {
"crateName": "proc-macro-error",
"version": "1.0.4",
"edition": "2018",
"sha256": "1373bhxaf0pagd8zkyd03kkx6bchzf6g0dkwrwzsnal9z47lj9fs",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "proc-macro-error-attr",
"packageId": "proc-macro-error-attr"
},
{
"name": "proc-macro2",
"packageId": "proc-macro2"
},
{
"name": "quote",
"packageId": "quote"
},
{
"name": "syn",
"packageId": "syn 1.0.109"
}
],
"buildDependencies": [
{
"name": "version_check",
"packageId": "version_check"
}
],
"resolvedDefaultFeatures": [
"default",
"syn",
"syn-error"
],
"libCrateTypes": [
"lib"
],
"authors": [
"CreepySkeleton "
]
},
"proc-macro-error-attr": {
"crateName": "proc-macro-error-attr",
"version": "1.0.4",
"edition": "2018",
"sha256": "0sgq6m5jfmasmwwy8x4mjygx5l7kp8s4j60bv25ckv2j1qc41gm1",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "proc-macro2",
"packageId": "proc-macro2"
},
{
"name": "quote",
"packageId": "quote"
}
],
"buildDependencies": [
{
"name": "version_check",
"packageId": "version_check"
}
],
"procMacro": true,
"authors": [
"CreepySkeleton "
]
},
"proc-macro2": {
"crateName": "proc-macro2",
"version": "1.0.86",
"edition": "2021",
"sha256": "0xrv22p8lqlfdf1w0pj4si8n2ws4aw0kilmziwf0vpv5ys6rwway",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "unicode-ident",
"packageId": "unicode-ident"
}
],
"resolvedDefaultFeatures": [
"default",
"proc-macro"
],
"libCrateTypes": [
"lib"
],
"authors": [
"David Tolnay ",
"Alex Crichton "
]
},
"quote": {
"crateName": "quote",
"version": "1.0.36",
"edition": "2018",
"sha256": "19xcmh445bg6simirnnd4fvkmp6v2qiwxh5f6rw4a70h76pnm9qg",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "proc-macro2",
"packageId": "proc-macro2"
}
],
"resolvedDefaultFeatures": [
"default",
"proc-macro"
],
"libCrateTypes": [
"lib"
],
"authors": [
"David Tolnay "
]
},
"rand": {
"crateName": "rand",
"version": "0.4.6",
"edition": "2015",
"sha256": "14qjfv3gggzhnma20k0sc1jf8y6pplsaq7n1j9ls5c8kf2wl0a2m",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "fuchsia-cprng",
"packageId": "fuchsia-cprng",
"target": "cfg(target_os = \"fuchsia\")"
},
{
"name": "libc",
"packageId": "libc",
"target": "cfg(unix)"
},
{
"name": "rand_core",
"packageId": "rand_core 0.3.1",
"target": "cfg(target_env = \"sgx\")"
},
{
"name": "rdrand",
"packageId": "rdrand",
"target": "cfg(target_env = \"sgx\")"
},
{
"name": "winapi",
"packageId": "winapi",
"target": "cfg(windows)"
}
],
"resolvedDefaultFeatures": [
"default",
"libc",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The Rust Project Developers"
]
},
"rand_core 0.3.1": {
"crateName": "rand_core",
"version": "0.3.1",
"edition": "2015",
"sha256": "0jzdgszfa4bliigiy4hi66k7fs3gfwi2qxn8vik84ph77fwdwvvs",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "rand_core",
"packageId": "rand_core 0.4.2"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"The Rand Project Developers",
"The Rust Project Developers"
]
},
"rand_core 0.4.2": {
"crateName": "rand_core",
"version": "0.4.2",
"edition": "2015",
"sha256": "1p09ynysrq1vcdlmcqnapq4qakl2yd1ng3kxh3qscpx09k2a6cww",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"The Rand Project Developers",
"The Rust Project Developers"
]
},
"rdrand": {
"crateName": "rdrand",
"version": "0.4.0",
"edition": "2015",
"sha256": "1cjq0kwx1bk7jx3kzyciiish5gqsj7620dm43dc52sr8fzmm9037",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "rand_core",
"packageId": "rand_core 0.3.1"
}
],
"resolvedDefaultFeatures": [
"default",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Simonas Kazlauskas "
]
},
"regex": {
"crateName": "regex",
"version": "1.10.5",
"edition": "2021",
"sha256": "0zsiqk2sxc1kd46qw0yp87s2a14ialwyxinpl0k266ddkm1i64mr",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "aho-corasick",
"packageId": "aho-corasick"
},
{
"name": "memchr",
"packageId": "memchr"
},
{
"name": "regex-automata",
"packageId": "regex-automata"
},
{
"name": "regex-syntax",
"packageId": "regex-syntax"
}
],
"resolvedDefaultFeatures": [
"default",
"perf",
"perf-backtrack",
"perf-cache",
"perf-dfa",
"perf-inline",
"perf-literal",
"perf-onepass",
"std",
"unicode",
"unicode-age",
"unicode-bool",
"unicode-case",
"unicode-gencat",
"unicode-perl",
"unicode-script",
"unicode-segment"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The Rust Project Developers",
"Andrew Gallant "
]
},
"regex-automata": {
"crateName": "regex-automata",
"version": "0.4.7",
"edition": "2021",
"sha256": "1pwjdi4jckpbaivpl6x4v5g4crb37zr2wac93wlfsbzgqn6gbjiq",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "aho-corasick",
"packageId": "aho-corasick"
},
{
"name": "memchr",
"packageId": "memchr"
},
{
"name": "regex-syntax",
"packageId": "regex-syntax"
}
],
"resolvedDefaultFeatures": [
"alloc",
"dfa-onepass",
"hybrid",
"meta",
"nfa",
"nfa-backtrack",
"nfa-pikevm",
"nfa-thompson",
"perf",
"perf-inline",
"perf-literal",
"perf-literal-multisubstring",
"perf-literal-substring",
"std",
"syntax",
"unicode",
"unicode-age",
"unicode-bool",
"unicode-case",
"unicode-gencat",
"unicode-perl",
"unicode-script",
"unicode-segment",
"unicode-word-boundary"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The Rust Project Developers",
"Andrew Gallant "
]
},
"regex-syntax": {
"crateName": "regex-syntax",
"version": "0.8.4",
"edition": "2021",
"sha256": "16r0kjy20vx33dr4mhasj5l1f87czas714x2fz6zl0f8wwxa0rks",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"default",
"std",
"unicode",
"unicode-age",
"unicode-bool",
"unicode-case",
"unicode-gencat",
"unicode-perl",
"unicode-script",
"unicode-segment"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The Rust Project Developers",
"Andrew Gallant "
]
},
"remove_dir_all": {
"crateName": "remove_dir_all",
"version": "0.5.3",
"edition": "2015",
"sha256": "1rzqbsgkmr053bxxl04vmvsd1njyz0nxvly97aip6aa2cmb15k9s",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "winapi",
"packageId": "winapi",
"target": "cfg(windows)"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"Aaronepower "
]
},
"ryu": {
"crateName": "ryu",
"version": "1.0.18",
"edition": "2018",
"sha256": "17xx2s8j1lln7iackzd9p0sv546vjq71i779gphjq923vjh5pjzk",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"David Tolnay "
]
},
"same-file": {
"crateName": "same-file",
"version": "1.0.6",
"edition": "2018",
"sha256": "00h5j1w87dmhnvbv9l8bic3y7xxsnjmssvifw2ayvgx9mb1ivz4k",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "winapi-util",
"packageId": "winapi-util",
"target": "cfg(windows)"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"Andrew Gallant "
]
},
"semver": {
"crateName": "semver",
"version": "1.0.23",
"edition": "2018",
"sha256": "12wqpxfflclbq4dv8sa6gchdh92ahhwn4ci1ls22wlby3h57wsb1",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "serde",
"packageId": "serde"
}
],
"resolvedDefaultFeatures": [
"default",
"serde",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"David Tolnay "
]
},
"serde": {
"crateName": "serde",
"version": "1.0.203",
"edition": "2018",
"sha256": "1500ghq198n6py5anvz5qbqagd9h1hq04f4qpsvjzrvix56snlvj",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "serde_derive",
"packageId": "serde_derive"
},
{
"name": "serde_derive",
"packageId": "serde_derive",
"target": "cfg(any())"
}
],
"resolvedDefaultFeatures": [
"alloc",
"default",
"derive",
"serde_derive",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Erick Tryzelaar ",
"David Tolnay "
]
},
"serde_derive": {
"crateName": "serde_derive",
"version": "1.0.203",
"edition": "2015",
"sha256": "1fmmqmfza3mwxb1v80737dj01gznrh8mhgqgylkndx5npq7bq32h",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "proc-macro2",
"packageId": "proc-macro2"
},
{
"name": "quote",
"packageId": "quote"
},
{
"name": "syn",
"packageId": "syn 2.0.68"
}
],
"resolvedDefaultFeatures": [
"default"
],
"procMacro": true,
"authors": [
"Erick Tryzelaar ",
"David Tolnay "
]
},
"serde_json": {
"crateName": "serde_json",
"version": "1.0.118",
"edition": "2021",
"sha256": "1r7jpqdfnrv8skn5va1r202g6lhdhka0vyn42vm5g21x2srzciyr",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "itoa",
"packageId": "itoa"
},
{
"name": "ryu",
"packageId": "ryu"
},
{
"name": "serde",
"packageId": "serde"
}
],
"resolvedDefaultFeatures": [
"default",
"std",
"unbounded_depth"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Erick Tryzelaar ",
"David Tolnay "
]
},
"serde_spanned": {
"crateName": "serde_spanned",
"version": "0.6.6",
"edition": "2021",
"sha256": "1839b6m5p9ijjmcwamiya2r612ks2vg6w2pp95yg76lr3zh79rkr",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "serde",
"packageId": "serde"
}
],
"resolvedDefaultFeatures": [
"serde"
],
"libCrateTypes": [
"lib"
]
},
"sha2": {
"crateName": "sha2",
"version": "0.10.8",
"edition": "2018",
"sha256": "1j1x78zk9il95w9iv46dh9wm73r6xrgj32y6lzzw7bxws9dbfgbr",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "cfg-if",
"packageId": "cfg-if"
},
{
"name": "cpufeatures",
"packageId": "cpufeatures",
"target": "cfg(any(target_arch = \"aarch64\", target_arch = \"x86_64\", target_arch = \"x86\"))"
},
{
"name": "digest",
"packageId": "digest"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"RustCrypto Developers"
]
},
"strsim": {
"crateName": "strsim",
"version": "0.8.0",
"edition": "2015",
"sha256": "0sjsm7hrvjdifz661pjxq5w4hf190hx53fra8dfvamacvff139cf",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Danny Guo "
]
},
"structopt": {
"crateName": "structopt",
"version": "0.3.26",
"edition": "2018",
"sha256": "043sg3qxllann6q9i71d05qp3q13scmcvhxhd950ka2v8ij5qsqc",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "clap",
"packageId": "clap"
},
{
"name": "lazy_static",
"packageId": "lazy_static"
},
{
"name": "structopt-derive",
"packageId": "structopt-derive"
}
],
"resolvedDefaultFeatures": [
"default"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Guillaume Pinot ",
"others"
]
},
"structopt-derive": {
"crateName": "structopt-derive",
"version": "0.4.18",
"edition": "2018",
"sha256": "1q5gcigmvw0cinjxzpyrkflliq5r1ivljmrvfrl3phcwgwraxdfw",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "heck",
"packageId": "heck"
},
{
"name": "proc-macro-error",
"packageId": "proc-macro-error"
},
{
"name": "proc-macro2",
"packageId": "proc-macro2"
},
{
"name": "quote",
"packageId": "quote"
},
{
"name": "syn",
"packageId": "syn 1.0.109"
}
],
"procMacro": true,
"authors": [
"Guillaume Pinot "
]
},
"syn 1.0.109": {
"crateName": "syn",
"version": "1.0.109",
"edition": "2018",
"sha256": "0ds2if4600bd59wsv7jjgfkayfzy3hnazs394kz6zdkmna8l3dkj",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "proc-macro2",
"packageId": "proc-macro2"
},
{
"name": "quote",
"packageId": "quote"
},
{
"name": "unicode-ident",
"packageId": "unicode-ident"
}
],
"resolvedDefaultFeatures": [
"clone-impls",
"default",
"derive",
"full",
"parsing",
"printing",
"proc-macro",
"quote"
],
"libCrateTypes": [
"lib"
],
"authors": [
"David Tolnay "
]
},
"syn 2.0.68": {
"crateName": "syn",
"version": "2.0.68",
"edition": "2021",
"sha256": "1sf1y2hajhjav38ipg63c934xrgkz4v42fz24a0ckmmri06sf7wh",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "proc-macro2",
"packageId": "proc-macro2"
},
{
"name": "quote",
"packageId": "quote"
},
{
"name": "unicode-ident",
"packageId": "unicode-ident"
}
],
"resolvedDefaultFeatures": [
"clone-impls",
"default",
"derive",
"parsing",
"printing",
"proc-macro"
],
"libCrateTypes": [
"lib"
],
"authors": [
"David Tolnay "
]
},
"tempdir": {
"crateName": "tempdir",
"version": "0.3.7",
"edition": "2015",
"sha256": "1n5n86zxpgd85y0mswrp5cfdisizq2rv3la906g6ipyc03xvbwhm",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "rand",
"packageId": "rand"
},
{
"name": "remove_dir_all",
"packageId": "remove_dir_all"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"The Rust Project Developers"
]
},
"tera": {
"crateName": "tera",
"version": "1.20.0",
"edition": "2018",
"sha256": "1vnj9imw2h9szkd1izsrhwrc9jvazvdsp84x65wg2rg88ldqb7db",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "globwalk",
"packageId": "globwalk"
},
{
"name": "lazy_static",
"packageId": "lazy_static"
},
{
"name": "pest",
"packageId": "pest"
},
{
"name": "pest_derive",
"packageId": "pest_derive"
},
{
"name": "regex",
"packageId": "regex"
},
{
"name": "serde",
"packageId": "serde"
},
{
"name": "serde_json",
"packageId": "serde_json"
},
{
"name": "unic-segment",
"packageId": "unic-segment"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"Vincent Prouillet "
]
},
"textwrap": {
"crateName": "textwrap",
"version": "0.11.0",
"edition": "2015",
"sha256": "0q5hky03ik3y50s9sz25r438bc4nwhqc6dqwynv4wylc807n29nk",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "unicode-width",
"packageId": "unicode-width"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"Martin Geisler "
]
},
"thiserror": {
"crateName": "thiserror",
"version": "1.0.61",
"edition": "2021",
"sha256": "028prh962l16cmjivwb1g9xalbpqip0305zhq006mg74dc6whin5",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "thiserror-impl",
"packageId": "thiserror-impl"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"David Tolnay "
]
},
"thiserror-impl": {
"crateName": "thiserror-impl",
"version": "1.0.61",
"edition": "2021",
"sha256": "0cvm37hp0kbcyk1xac1z0chpbd9pbn2g456iyid6sah0a113ihs6",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "proc-macro2",
"packageId": "proc-macro2"
},
{
"name": "quote",
"packageId": "quote"
},
{
"name": "syn",
"packageId": "syn 2.0.68"
}
],
"procMacro": true,
"authors": [
"David Tolnay "
]
},
"tinyvec": {
"crateName": "tinyvec",
"version": "1.6.1",
"edition": "2018",
"sha256": "10idfhsvp7zhbr8pn37wfra2bn02vr5xg6mhdvrbxlp2zg31alf5",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "tinyvec_macros",
"packageId": "tinyvec_macros"
}
],
"resolvedDefaultFeatures": [
"alloc",
"default",
"tinyvec_macros"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Lokathor "
]
},
"tinyvec_macros": {
"crateName": "tinyvec_macros",
"version": "0.1.1",
"edition": "2018",
"sha256": "081gag86208sc3y6sdkshgw3vysm5d34p431dzw0bshz66ncng0z",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Soveu "
]
},
"toml": {
"crateName": "toml",
"version": "0.8.14",
"edition": "2021",
"sha256": "0dgk8bacrza09npifba1xsx7wyjjvhz3igxpdnyjcbqxn8mfnjbg",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "serde",
"packageId": "serde"
},
{
"name": "serde_spanned",
"packageId": "serde_spanned"
},
{
"name": "toml_datetime",
"packageId": "toml_datetime"
},
{
"name": "toml_edit",
"packageId": "toml_edit"
}
],
"resolvedDefaultFeatures": [
"default",
"display",
"parse"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Alex Crichton "
]
},
"toml_datetime": {
"crateName": "toml_datetime",
"version": "0.6.6",
"edition": "2021",
"sha256": "1grcrr3gh7id3cy3j700kczwwfbn04p5ncrrj369prjaj9bgvbab",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "serde",
"packageId": "serde"
}
],
"resolvedDefaultFeatures": [
"serde"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Alex Crichton "
]
},
"toml_edit": {
"crateName": "toml_edit",
"version": "0.22.14",
"edition": "2021",
"sha256": "0f2fw0viqvisjhqwjavgypz5mgbldh53przrsjlrrggijyppl77j",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "indexmap",
"packageId": "indexmap"
},
{
"name": "serde",
"packageId": "serde"
},
{
"name": "serde_spanned",
"packageId": "serde_spanned"
},
{
"name": "toml_datetime",
"packageId": "toml_datetime"
},
{
"name": "winnow",
"packageId": "winnow"
}
],
"resolvedDefaultFeatures": [
"display",
"parse",
"serde"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Andronik Ordian ",
"Ed Page "
]
},
"typenum": {
"crateName": "typenum",
"version": "1.17.0",
"edition": "2018",
"sha256": "09dqxv69m9lj9zvv6xw5vxaqx15ps0vxyy5myg33i0kbqvq0pzs2",
"source": {
"type": "crates-io"
},
"build": "build/main.rs",
"libCrateTypes": [
"lib"
],
"authors": [
"Paho Lurie-Gregg ",
"Andre Bogus "
]
},
"ucd-trie": {
"crateName": "ucd-trie",
"version": "0.1.6",
"edition": "2021",
"sha256": "1ff4yfksirqs37ybin9aw71aa5gva00hw7jdxbw8w668zy964r7d",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Andrew Gallant "
]
},
"unic-char-property": {
"crateName": "unic-char-property",
"version": "0.9.0",
"edition": "2018",
"sha256": "08g21dn3wwix3ycfl0vrbahn0835nv2q3swm8wms0vwvgm07mid8",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "unic-char-range",
"packageId": "unic-char-range"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"The UNIC Project Developers"
]
},
"unic-char-range": {
"crateName": "unic-char-range",
"version": "0.9.0",
"edition": "2018",
"sha256": "1g0z7iwvjhqspi6194zsff8vy6i3921hpqcrp3v1813hbwnh5603",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"default"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The UNIC Project Developers"
]
},
"unic-common": {
"crateName": "unic-common",
"version": "0.9.0",
"edition": "2018",
"sha256": "1g1mm954m0zr497dl4kx3vr09yaly290zs33bbl4wrbaba1gzmw0",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"default"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The UNIC Project Developers"
]
},
"unic-segment": {
"crateName": "unic-segment",
"version": "0.9.0",
"edition": "2018",
"sha256": "08wgz2q6vrdvmbd23kf9pbg8cyzm5q8hq9spc4blzy2ppqk5vvg4",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "unic-ucd-segment",
"packageId": "unic-ucd-segment"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"The UNIC Project Developers"
]
},
"unic-ucd-segment": {
"crateName": "unic-ucd-segment",
"version": "0.9.0",
"edition": "2018",
"sha256": "0027lczcg0r401g6fnzm2bq9fxhgxvri1nlryhhv8192lqic2y90",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "unic-char-property",
"packageId": "unic-char-property"
},
{
"name": "unic-char-range",
"packageId": "unic-char-range"
},
{
"name": "unic-ucd-version",
"packageId": "unic-ucd-version"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"The UNIC Project Developers"
]
},
"unic-ucd-version": {
"crateName": "unic-ucd-version",
"version": "0.9.0",
"edition": "2018",
"sha256": "1i5hnzpfnxkp4ijfk8kvhpvj84bij575ybqx1b6hyigy6wi2zgcn",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "unic-common",
"packageId": "unic-common"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"The UNIC Project Developers"
]
},
"unicode-bidi": {
"crateName": "unicode-bidi",
"version": "0.3.15",
"edition": "2018",
"sha256": "0xcdxm7h0ydyprwpcbh436rbs6s6lph7f3gr527lzgv6lw053y88",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"hardcoded-data",
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The Servo Project Developers"
]
},
"unicode-ident": {
"crateName": "unicode-ident",
"version": "1.0.12",
"edition": "2018",
"sha256": "0jzf1znfpb2gx8nr8mvmyqs1crnv79l57nxnbiszc7xf7ynbjm1k",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"David Tolnay "
]
},
"unicode-normalization": {
"crateName": "unicode-normalization",
"version": "0.1.23",
"edition": "2018",
"sha256": "1x81a50h2zxigj74b9bqjsirxxbyhmis54kg600xj213vf31cvd5",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "tinyvec",
"packageId": "tinyvec"
}
],
"resolvedDefaultFeatures": [
"std"
],
"libCrateTypes": [
"lib"
],
"authors": [
"kwantam ",
"Manish Goregaokar "
]
},
"unicode-segmentation": {
"crateName": "unicode-segmentation",
"version": "1.11.0",
"edition": "2018",
"sha256": "00kjpwp1g8fqm45drmwivlacn3y9jx73bvs09n6s3x73nqi7vj6l",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"kwantam ",
"Manish Goregaokar "
]
},
"unicode-width": {
"crateName": "unicode-width",
"version": "0.1.13",
"edition": "2021",
"sha256": "0p92vl8n7qc8mxz45xn6qbgi0259z96n32a158l6vj5bywwdadh3",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"default"
],
"libCrateTypes": [
"lib"
],
"authors": [
"kwantam ",
"Manish Goregaokar "
]
},
"url": {
"crateName": "url",
"version": "2.5.2",
"edition": "2018",
"sha256": "0v2dx50mx7xzl9454cl5qmpjnhkbahmn59gd3apyipbgyyylsy12",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "form_urlencoded",
"packageId": "form_urlencoded"
},
{
"name": "idna",
"packageId": "idna"
},
{
"name": "percent-encoding",
"packageId": "percent-encoding"
},
{
"name": "serde",
"packageId": "serde"
}
],
"resolvedDefaultFeatures": [
"default",
"serde"
],
"libCrateTypes": [
"lib"
],
"authors": [
"The rust-url developers"
]
},
"vec_map": {
"crateName": "vec_map",
"version": "0.8.2",
"edition": "2015",
"sha256": "1481w9g1dw9rxp3l6snkdqihzyrd2f8vispzqmwjwsdyhw8xzggi",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Alex Crichton ",
"Jorge Aparicio ",
"Alexis Beingessner ",
"Brian Anderson <>",
"tbu- <>",
"Manish Goregaokar <>",
"Aaron Turon ",
"Adolfo Ochagavía <>",
"Niko Matsakis <>",
"Steven Fackler <>",
"Chase Southwood ",
"Eduard Burtescu <>",
"Florian Wilkens <>",
"Félix Raimundo <>",
"Tibor Benke <>",
"Markus Siemens ",
"Josh Branchaud ",
"Huon Wilson ",
"Corey Farwell ",
"Aaron Liblong <>",
"Nick Cameron ",
"Patrick Walton ",
"Felix S Klock II <>",
"Andrew Paseltiner ",
"Sean McArthur ",
"Vadim Petrochenkov <>"
]
},
"version_check": {
"crateName": "version_check",
"version": "0.9.4",
"edition": "2015",
"sha256": "0gs8grwdlgh0xq660d7wr80x14vxbizmd8dbp29p2pdncx8lp1s9",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Sergio Benitez "
]
},
"walkdir": {
"crateName": "walkdir",
"version": "2.5.0",
"edition": "2018",
"sha256": "0jsy7a710qv8gld5957ybrnc07gavppp963gs32xk4ag8130jy99",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "same-file",
"packageId": "same-file"
},
{
"name": "winapi-util",
"packageId": "winapi-util",
"target": "cfg(windows)"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"Andrew Gallant "
]
},
"winapi": {
"crateName": "winapi",
"version": "0.3.9",
"edition": "2015",
"sha256": "06gl025x418lchw1wxj64ycr7gha83m44cjr5sarhynd9xkrm0sw",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "winapi-i686-pc-windows-gnu",
"packageId": "winapi-i686-pc-windows-gnu",
"target": "i686-pc-windows-gnu"
},
{
"name": "winapi-x86_64-pc-windows-gnu",
"packageId": "winapi-x86_64-pc-windows-gnu",
"target": "x86_64-pc-windows-gnu"
}
],
"resolvedDefaultFeatures": [
"consoleapi",
"errhandlingapi",
"fileapi",
"handleapi",
"minwinbase",
"minwindef",
"ntsecapi",
"processenv",
"profileapi",
"std",
"winbase",
"winerror",
"winnt"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Peter Atashian "
]
},
"winapi-i686-pc-windows-gnu": {
"crateName": "winapi-i686-pc-windows-gnu",
"version": "0.4.0",
"edition": "2015",
"sha256": "1dmpa6mvcvzz16zg6d5vrfy4bxgg541wxrcip7cnshi06v38ffxc",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Peter Atashian "
]
},
"winapi-util": {
"crateName": "winapi-util",
"version": "0.1.8",
"edition": "2021",
"sha256": "0svcgddd2rw06mj4r76gj655qsa1ikgz3d3gzax96fz7w62c6k2d",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "windows-sys",
"packageId": "windows-sys",
"target": "cfg(windows)"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"Andrew Gallant "
]
},
"winapi-x86_64-pc-windows-gnu": {
"crateName": "winapi-x86_64-pc-windows-gnu",
"version": "0.4.0",
"edition": "2015",
"sha256": "0gqq64czqb64kskjryj8isp62m2sgvx25yyj3kpc2myh85w24bki",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Peter Atashian "
]
},
"windows-sys": {
"crateName": "windows-sys",
"version": "0.52.0",
"edition": "2021",
"sha256": "0gd3v4ji88490zgb6b5mq5zgbvwv7zx1ibn8v3x83rwcdbryaar8",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "windows-targets",
"packageId": "windows-targets"
}
],
"resolvedDefaultFeatures": [
"Win32",
"Win32_Foundation",
"Win32_Storage",
"Win32_Storage_FileSystem",
"Win32_System",
"Win32_System_Console",
"Win32_System_SystemInformation",
"default"
],
"libCrateTypes": [
"lib"
],
"authors": [
"Microsoft"
]
},
"windows-targets": {
"crateName": "windows-targets",
"version": "0.52.5",
"edition": "2021",
"sha256": "1sz7jrnkygmmlj1ia8fk85wbyil450kq5qkh5qh9sh2rcnj161vg",
"source": {
"type": "crates-io"
},
"dependencies": [
{
"name": "windows_aarch64_gnullvm",
"packageId": "windows_aarch64_gnullvm",
"target": "aarch64-pc-windows-gnullvm"
},
{
"name": "windows_aarch64_msvc",
"packageId": "windows_aarch64_msvc",
"target": "cfg(all(target_arch = \"aarch64\", target_env = \"msvc\", not(windows_raw_dylib)))"
},
{
"name": "windows_i686_gnu",
"packageId": "windows_i686_gnu",
"target": "cfg(all(target_arch = \"x86\", target_env = \"gnu\", not(target_abi = \"llvm\"), not(windows_raw_dylib)))"
},
{
"name": "windows_i686_gnullvm",
"packageId": "windows_i686_gnullvm",
"target": "i686-pc-windows-gnullvm"
},
{
"name": "windows_i686_msvc",
"packageId": "windows_i686_msvc",
"target": "cfg(all(target_arch = \"x86\", target_env = \"msvc\", not(windows_raw_dylib)))"
},
{
"name": "windows_x86_64_gnu",
"packageId": "windows_x86_64_gnu",
"target": "cfg(all(target_arch = \"x86_64\", target_env = \"gnu\", not(target_abi = \"llvm\"), not(windows_raw_dylib)))"
},
{
"name": "windows_x86_64_gnullvm",
"packageId": "windows_x86_64_gnullvm",
"target": "x86_64-pc-windows-gnullvm"
},
{
"name": "windows_x86_64_msvc",
"packageId": "windows_x86_64_msvc",
"target": "cfg(all(any(target_arch = \"x86_64\", target_arch = \"arm64ec\"), target_env = \"msvc\", not(windows_raw_dylib)))"
}
],
"libCrateTypes": [
"lib"
],
"authors": [
"Microsoft"
]
},
"windows_aarch64_gnullvm": {
"crateName": "windows_aarch64_gnullvm",
"version": "0.52.5",
"edition": "2021",
"sha256": "0qrjimbj67nnyn7zqy15mzzmqg0mn5gsr2yciqjxm3cb3vbyx23h",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Microsoft"
]
},
"windows_aarch64_msvc": {
"crateName": "windows_aarch64_msvc",
"version": "0.52.5",
"edition": "2021",
"sha256": "1dmga8kqlmln2ibckk6mxc9n59vdg8ziqa2zr8awcl720hazv1cr",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Microsoft"
]
},
"windows_i686_gnu": {
"crateName": "windows_i686_gnu",
"version": "0.52.5",
"edition": "2021",
"sha256": "0w4np3l6qwlra9s2xpflqrs60qk1pz6ahhn91rr74lvdy4y0gfl8",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Microsoft"
]
},
"windows_i686_gnullvm": {
"crateName": "windows_i686_gnullvm",
"version": "0.52.5",
"edition": "2021",
"sha256": "1s9f4gff0cixd86mw3n63rpmsm4pmr4ffndl6s7qa2h35492dx47",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Microsoft"
]
},
"windows_i686_msvc": {
"crateName": "windows_i686_msvc",
"version": "0.52.5",
"edition": "2021",
"sha256": "1gw7fklxywgpnwbwg43alb4hm0qjmx72hqrlwy5nanrxs7rjng6v",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Microsoft"
]
},
"windows_x86_64_gnu": {
"crateName": "windows_x86_64_gnu",
"version": "0.52.5",
"edition": "2021",
"sha256": "1n8p2mcf3lw6300k77a0knksssmgwb9hynl793mhkzyydgvlchjf",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Microsoft"
]
},
"windows_x86_64_gnullvm": {
"crateName": "windows_x86_64_gnullvm",
"version": "0.52.5",
"edition": "2021",
"sha256": "15n56jrh4s5bz66zimavr1rmcaw6wa306myrvmbc6rydhbj9h8l5",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Microsoft"
]
},
"windows_x86_64_msvc": {
"crateName": "windows_x86_64_msvc",
"version": "0.52.5",
"edition": "2021",
"sha256": "1w1bn24ap8dp9i85s8mlg8cim2bl2368bd6qyvm0xzqvzmdpxi5y",
"source": {
"type": "crates-io"
},
"libCrateTypes": [
"lib"
],
"authors": [
"Microsoft"
]
},
"winnow": {
"crateName": "winnow",
"version": "0.6.13",
"edition": "2021",
"sha256": "189b0mrr9lkckdyr0177hwj1c59igxc2lsl71f4wg8wrqbvfbdar",
"source": {
"type": "crates-io"
},
"resolvedDefaultFeatures": [
"alloc",
"default",
"std"
],
"libCrateTypes": [
"lib"
]
}
}
}
================================================
FILE: crate2nix/Cargo.nix
================================================
# This file was @generated by crate2nix 0.15.0 with the command:
# "generate" "-n" "../nix/nixpkgs.nix" "-f" "./crate2nix/Cargo.toml" "-o" "./crate2nix/Cargo.nix"
# See https://github.com/kolloch/crate2nix for more info.
{ nixpkgs ? ../nix/nixpkgs.nix
, pkgs ? import nixpkgs { config = {}; }
, fetchurl ? pkgs.fetchurl
, lib ? pkgs.lib
, stdenv ? pkgs.stdenv
, buildRustCrateForPkgs ? pkgs: pkgs.buildRustCrate
# This is used as the `crateOverrides` argument for `buildRustCrate`.
, defaultCrateOverrides ? pkgs.defaultCrateOverrides
# The features to enable for the root_crate or the workspace_members.
, rootFeatures ? [ "default" ]
# If true, throw errors instead of issueing deprecation warnings.
, strictDeprecation ? false
# Elements to add to the `-C target-feature=` argument passed to `rustc`
# (separated by `,`, prefixed with `+`).
# Used for conditional compilation based on CPU feature detection.
, targetFeatures ? []
# Additional target attributes for conditional dependencies.
# Use this for custom cfg flags that are passed via rustcflags but need to
# be known at Nix evaluation time for dependency resolution.
# Example: { tracing_unstable = true; } for crates using cfg(tracing_unstable).
, extraTargetFlags ? {}
# Whether to perform release builds: longer compile times, faster binaries.
, release ? true
# Additional crate2nix configuration if it exists.
, crateConfig
? if builtins.pathExists ./crate-config.nix
then pkgs.callPackage ./crate-config.nix {}
else {}
}:
rec {
#
# "public" attributes that we attempt to keep stable with new versions of crate2nix.
#
rootCrate = rec {
packageId = "crate2nix";
# Use this attribute to refer to the derivation building your root crate package.
# You can override the features with rootCrate.build.override { features = [ "default" "feature1" ... ]; }.
build = internal.buildRustCrateWithFeatures {
inherit packageId;
};
# Debug support which might change between releases.
# File a bug if you depend on any for non-debug work!
debug = internal.debugCrate { inherit packageId; };
};
# Refer your crate build derivation by name here.
# You can override the features with
# workspaceMembers."${crateName}".build.override { features = [ "default" "feature1" ... ]; }.
workspaceMembers = {
"crate2nix" = rec {
packageId = "crate2nix";
build = internal.buildRustCrateWithFeatures {
packageId = "crate2nix";
};
# Debug support which might change between releases.
# File a bug if you depend on any for non-debug work!
debug = internal.debugCrate { inherit packageId; };
};
};
# A derivation that joins the outputs of all workspace members together.
allWorkspaceMembers = pkgs.symlinkJoin {
name = "all-workspace-members";
paths =
let members = builtins.attrValues workspaceMembers;
in builtins.map (m: m.build) members;
};
#
# "internal" ("private") attributes that may change in every new version of crate2nix.
#
internal = rec {
# Build and dependency information for crates.
# Many of the fields are passed one-to-one to buildRustCrate.
#
# Noteworthy:
# * `dependencies`/`buildDependencies`: similar to the corresponding fields for buildRustCrate.
# but with additional information which is used during dependency/feature resolution.
# * `resolvedDependencies`: the selected default features reported by cargo - only included for debugging.
# * `devDependencies` as of now not used by `buildRustCrate` but used to
# inject test dependencies into the build
crates = {
"aho-corasick" = rec {
crateName = "aho-corasick";
version = "1.1.3";
edition = "2021";
sha256 = "05mrpkvdgp5d20y2p989f187ry9diliijgwrs254fs9s1m1x6q4f";
libName = "aho_corasick";
authors = [
"Andrew Gallant "
];
dependencies = [
{
name = "memchr";
packageId = "memchr";
optional = true;
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "std" "perf-literal" ];
"logging" = [ "dep:log" ];
"perf-literal" = [ "dep:memchr" ];
"std" = [ "memchr?/std" ];
};
resolvedDefaultFeatures = [ "default" "perf-literal" "std" ];
};
"ansi_term" = rec {
crateName = "ansi_term";
version = "0.12.1";
edition = "2015";
sha256 = "1ljmkbilxgmhavxvxqa7qvm6f3fjggi7q2l3a72q9x0cxjvrnanm";
authors = [
"ogham@bsago.me"
"Ryan Scheel (Havvy) "
"Josh Triplett "
];
dependencies = [
{
name = "winapi";
packageId = "winapi";
target = { target, features }: ("windows" == target."os" or null);
features = [ "consoleapi" "errhandlingapi" "fileapi" "handleapi" "processenv" ];
}
];
features = {
"derive_serde_style" = [ "serde" ];
"serde" = [ "dep:serde" ];
};
};
"anyhow" = rec {
crateName = "anyhow";
version = "1.0.86";
edition = "2018";
sha256 = "1nk301x8qhpdaks6a9zvcp7yakjqnczjmqndbg7vk4494d3d1ldk";
authors = [
"David Tolnay "
];
features = {
"backtrace" = [ "dep:backtrace" ];
"default" = [ "std" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"atty" = rec {
crateName = "atty";
version = "0.2.14";
edition = "2015";
sha256 = "1s7yslcs6a28c5vz7jwj63lkfgyx8mx99fdirlhi9lbhhzhrpcyr";
authors = [
"softprops "
];
dependencies = [
{
name = "hermit-abi";
packageId = "hermit-abi";
target = { target, features }: ("hermit" == target."os" or null);
}
{
name = "libc";
packageId = "libc";
usesDefaultFeatures = false;
target = { target, features }: (target."unix" or false);
}
{
name = "winapi";
packageId = "winapi";
target = { target, features }: (target."windows" or false);
features = [ "consoleapi" "processenv" "minwinbase" "minwindef" "winbase" ];
}
];
};
"bitflags 1.3.2" = rec {
crateName = "bitflags";
version = "1.3.2";
edition = "2018";
sha256 = "12ki6w8gn1ldq7yz9y680llwk5gmrhrzszaa17g1sbrw2r2qvwxy";
authors = [
"The Rust Project Developers"
];
features = {
"compiler_builtins" = [ "dep:compiler_builtins" ];
"core" = [ "dep:core" ];
"rustc-dep-of-std" = [ "core" "compiler_builtins" ];
};
resolvedDefaultFeatures = [ "default" ];
};
"bitflags 2.6.0" = rec {
crateName = "bitflags";
version = "2.6.0";
edition = "2021";
sha256 = "1pkidwzn3hnxlsl8zizh0bncgbjnw7c41cx7bby26ncbzmiznj5h";
authors = [
"The Rust Project Developers"
];
features = {
"arbitrary" = [ "dep:arbitrary" ];
"bytemuck" = [ "dep:bytemuck" ];
"compiler_builtins" = [ "dep:compiler_builtins" ];
"core" = [ "dep:core" ];
"rustc-dep-of-std" = [ "core" "compiler_builtins" ];
"serde" = [ "dep:serde" ];
};
};
"block-buffer" = rec {
crateName = "block-buffer";
version = "0.10.4";
edition = "2018";
sha256 = "0w9sa2ypmrsqqvc20nhwr75wbb5cjr4kkyhpjm1z1lv2kdicfy1h";
libName = "block_buffer";
authors = [
"RustCrypto Developers"
];
dependencies = [
{
name = "generic-array";
packageId = "generic-array";
}
];
};
"bstr" = rec {
crateName = "bstr";
version = "1.9.1";
edition = "2021";
sha256 = "01ipr5rncw3kf4dyc1p2g00njn1df2b0xpviwhb8830iv77wbvq5";
authors = [
"Andrew Gallant "
];
dependencies = [
{
name = "memchr";
packageId = "memchr";
usesDefaultFeatures = false;
}
{
name = "serde";
packageId = "serde";
optional = true;
usesDefaultFeatures = false;
}
];
features = {
"alloc" = [ "memchr/alloc" "serde?/alloc" ];
"default" = [ "std" "unicode" ];
"serde" = [ "dep:serde" ];
"std" = [ "alloc" "memchr/std" "serde?/std" ];
"unicode" = [ "dep:regex-automata" ];
};
resolvedDefaultFeatures = [ "alloc" "std" ];
};
"camino" = rec {
crateName = "camino";
version = "1.1.7";
edition = "2018";
sha256 = "0ff28kc3qjcrmi8k88b2j2p7mzrvbag20yqcrj9sl30n3fanpv70";
authors = [
"Without Boats "
"Ashley Williams "
"Steve Klabnik "
"Rain "
];
dependencies = [
{
name = "serde";
packageId = "serde";
optional = true;
features = [ "derive" ];
}
];
features = {
"proptest" = [ "dep:proptest" ];
"proptest1" = [ "proptest" ];
"serde" = [ "dep:serde" ];
"serde1" = [ "serde" ];
};
resolvedDefaultFeatures = [ "serde" "serde1" ];
};
"cargo-platform" = rec {
crateName = "cargo-platform";
version = "0.1.8";
edition = "2021";
sha256 = "1z5b7ivbj508wkqdg2vb0hw4vi1k1pyhcn6h1h1b8svcb8vg1c94";
libName = "cargo_platform";
dependencies = [
{
name = "serde";
packageId = "serde";
}
];
};
"cargo_metadata" = rec {
crateName = "cargo_metadata";
version = "0.18.1";
edition = "2018";
sha256 = "0drh0zndl4qgndy6kg6783cydbvhxgv0hcg7d9hhqx0zwi3nb21d";
authors = [
"Oliver Schneider "
];
dependencies = [
{
name = "camino";
packageId = "camino";
features = [ "serde1" ];
}
{
name = "cargo-platform";
packageId = "cargo-platform";
}
{
name = "semver";
packageId = "semver";
features = [ "serde" ];
}
{
name = "serde";
packageId = "serde";
features = [ "derive" ];
}
{
name = "serde_json";
packageId = "serde_json";
features = [ "unbounded_depth" ];
}
{
name = "thiserror";
packageId = "thiserror";
}
];
features = {
"builder" = [ "derive_builder" ];
"derive_builder" = [ "dep:derive_builder" ];
};
resolvedDefaultFeatures = [ "default" ];
};
"cfg-if" = rec {
crateName = "cfg-if";
version = "1.0.0";
edition = "2018";
sha256 = "1za0vb97n4brpzpv8lsbnzmq5r8f2b0cpqqr0sy8h5bn751xxwds";
libName = "cfg_if";
authors = [
"Alex Crichton "
];
features = {
"compiler_builtins" = [ "dep:compiler_builtins" ];
"core" = [ "dep:core" ];
"rustc-dep-of-std" = [ "core" "compiler_builtins" ];
};
};
"clap" = rec {
crateName = "clap";
version = "2.34.0";
edition = "2018";
sha256 = "071q5d8jfwbazi6zhik9xwpacx5i6kb2vkzy060vhf0c3120aqd0";
authors = [
"Kevin K. "
];
dependencies = [
{
name = "ansi_term";
packageId = "ansi_term";
optional = true;
target = { target, features }: (!(target."windows" or false));
}
{
name = "atty";
packageId = "atty";
optional = true;
}
{
name = "bitflags";
packageId = "bitflags 1.3.2";
}
{
name = "strsim";
packageId = "strsim";
optional = true;
}
{
name = "textwrap";
packageId = "textwrap";
}
{
name = "unicode-width";
packageId = "unicode-width";
}
{
name = "vec_map";
packageId = "vec_map";
optional = true;
}
];
features = {
"ansi_term" = [ "dep:ansi_term" ];
"atty" = [ "dep:atty" ];
"clippy" = [ "dep:clippy" ];
"color" = [ "ansi_term" "atty" ];
"default" = [ "suggestions" "color" "vec_map" ];
"doc" = [ "yaml" ];
"strsim" = [ "dep:strsim" ];
"suggestions" = [ "strsim" ];
"term_size" = [ "dep:term_size" ];
"vec_map" = [ "dep:vec_map" ];
"wrap_help" = [ "term_size" "textwrap/term_size" ];
"yaml" = [ "yaml-rust" ];
"yaml-rust" = [ "dep:yaml-rust" ];
};
resolvedDefaultFeatures = [ "ansi_term" "atty" "color" "default" "strsim" "suggestions" "vec_map" ];
};
"colored-diff" = rec {
crateName = "colored-diff";
version = "0.2.3";
edition = "2015";
sha256 = "1dfwjxd13f8l8bdzm76kkp6cp4sr1pyc8lavp52avwy313mhh0j1";
libName = "colored_diff";
dependencies = [
{
name = "ansi_term";
packageId = "ansi_term";
}
{
name = "dissimilar";
packageId = "dissimilar";
}
{
name = "itertools";
packageId = "itertools 0.10.5";
usesDefaultFeatures = false;
}
];
};
"cpufeatures" = rec {
crateName = "cpufeatures";
version = "0.2.12";
edition = "2018";
sha256 = "012m7rrak4girqlii3jnqwrr73gv1i980q4wra5yyyhvzwk5xzjk";
authors = [
"RustCrypto Developers"
];
dependencies = [
{
name = "libc";
packageId = "libc";
target = { target, features }: (target.name == "aarch64-linux-android");
}
{
name = "libc";
packageId = "libc";
target = { target, features }: (("aarch64" == target."arch" or null) && ("linux" == target."os" or null));
}
{
name = "libc";
packageId = "libc";
target = { target, features }: (("aarch64" == target."arch" or null) && ("apple" == target."vendor" or null));
}
{
name = "libc";
packageId = "libc";
target = { target, features }: (("loongarch64" == target."arch" or null) && ("linux" == target."os" or null));
}
];
};
"crate2nix" = rec {
crateName = "crate2nix";
version = "0.15.0";
edition = "2021";
crateBin = [
{
name = "crate2nix";
path = "src/main.rs";
requiredFeatures = [ ];
}
];
src = lib.cleanSourceWith { filter = sourceFilter; src = ./.; };
authors = [
"Peter Kolloch "
];
dependencies = [
{
name = "anyhow";
packageId = "anyhow";
}
{
name = "cargo-platform";
packageId = "cargo-platform";
}
{
name = "cargo_metadata";
packageId = "cargo_metadata";
}
{
name = "hex";
packageId = "hex";
}
{
name = "itertools";
packageId = "itertools 0.12.1";
}
{
name = "lazy_static";
packageId = "lazy_static";
}
{
name = "nix-base32";
packageId = "nix-base32";
}
{
name = "pathdiff";
packageId = "pathdiff";
}
{
name = "semver";
packageId = "semver";
features = [ "serde" ];
}
{
name = "serde";
packageId = "serde";
features = [ "derive" ];
}
{
name = "serde_json";
packageId = "serde_json";
features = [ "unbounded_depth" ];
}
{
name = "structopt";
packageId = "structopt";
}
{
name = "tera";
packageId = "tera";
usesDefaultFeatures = false;
}
{
name = "toml";
packageId = "toml";
}
{
name = "url";
packageId = "url";
features = [ "serde" ];
}
];
devDependencies = [
{
name = "colored-diff";
packageId = "colored-diff";
}
{
name = "fs_extra";
packageId = "fs_extra";
}
{
name = "tempdir";
packageId = "tempdir";
}
];
};
"crossbeam-deque" = rec {
crateName = "crossbeam-deque";
version = "0.8.5";
edition = "2021";
sha256 = "03bp38ljx4wj6vvy4fbhx41q8f585zyqix6pncz1mkz93z08qgv1";
libName = "crossbeam_deque";
dependencies = [
{
name = "crossbeam-epoch";
packageId = "crossbeam-epoch";
usesDefaultFeatures = false;
}
{
name = "crossbeam-utils";
packageId = "crossbeam-utils";
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "std" ];
"std" = [ "crossbeam-epoch/std" "crossbeam-utils/std" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"crossbeam-epoch" = rec {
crateName = "crossbeam-epoch";
version = "0.9.18";
edition = "2021";
sha256 = "03j2np8llwf376m3fxqx859mgp9f83hj1w34153c7a9c7i5ar0jv";
libName = "crossbeam_epoch";
dependencies = [
{
name = "crossbeam-utils";
packageId = "crossbeam-utils";
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "std" ];
"loom" = [ "loom-crate" "crossbeam-utils/loom" ];
"loom-crate" = [ "dep:loom-crate" ];
"nightly" = [ "crossbeam-utils/nightly" ];
"std" = [ "alloc" "crossbeam-utils/std" ];
};
resolvedDefaultFeatures = [ "alloc" "std" ];
};
"crossbeam-utils" = rec {
crateName = "crossbeam-utils";
version = "0.8.20";
edition = "2021";
sha256 = "100fksq5mm1n7zj242cclkw6yf7a4a8ix3lvpfkhxvdhbda9kv12";
libName = "crossbeam_utils";
features = {
"default" = [ "std" ];
"loom" = [ "dep:loom" ];
};
resolvedDefaultFeatures = [ "std" ];
};
"crypto-common" = rec {
crateName = "crypto-common";
version = "0.1.6";
edition = "2018";
sha256 = "1cvby95a6xg7kxdz5ln3rl9xh66nz66w46mm3g56ri1z5x815yqv";
libName = "crypto_common";
authors = [
"RustCrypto Developers"
];
dependencies = [
{
name = "generic-array";
packageId = "generic-array";
features = [ "more_lengths" ];
}
{
name = "typenum";
packageId = "typenum";
}
];
features = {
"getrandom" = [ "rand_core/getrandom" ];
"rand_core" = [ "dep:rand_core" ];
};
};
"digest" = rec {
crateName = "digest";
version = "0.10.7";
edition = "2018";
sha256 = "14p2n6ih29x81akj097lvz7wi9b6b9hvls0lwrv7b6xwyy0s5ncy";
authors = [
"RustCrypto Developers"
];
dependencies = [
{
name = "block-buffer";
packageId = "block-buffer";
optional = true;
}
{
name = "crypto-common";
packageId = "crypto-common";
}
];
features = {
"blobby" = [ "dep:blobby" ];
"block-buffer" = [ "dep:block-buffer" ];
"const-oid" = [ "dep:const-oid" ];
"core-api" = [ "block-buffer" ];
"default" = [ "core-api" ];
"dev" = [ "blobby" ];
"mac" = [ "subtle" ];
"oid" = [ "const-oid" ];
"rand_core" = [ "crypto-common/rand_core" ];
"std" = [ "alloc" "crypto-common/std" ];
"subtle" = [ "dep:subtle" ];
};
resolvedDefaultFeatures = [ "block-buffer" "core-api" "default" ];
};
"dissimilar" = rec {
crateName = "dissimilar";
version = "1.0.9";
edition = "2018";
sha256 = "0bcn4s99ghigd3yadpd7i3gljv5z2hkr07ijvvxvsxmz3yfygy2r";
authors = [
"David Tolnay "
];
};
"either" = rec {
crateName = "either";
version = "1.13.0";
edition = "2018";
sha256 = "1w2c1mybrd7vljyxk77y9f4w9dyjrmp3yp82mk7bcm8848fazcb0";
authors = [
"bluss"
];
features = {
"default" = [ "use_std" ];
"serde" = [ "dep:serde" ];
};
resolvedDefaultFeatures = [ "use_std" ];
};
"equivalent" = rec {
crateName = "equivalent";
version = "1.0.1";
edition = "2015";
sha256 = "1malmx5f4lkfvqasz319lq6gb3ddg19yzf9s8cykfsgzdmyq0hsl";
};
"form_urlencoded" = rec {
crateName = "form_urlencoded";
version = "1.2.1";
edition = "2018";
sha256 = "0milh8x7nl4f450s3ddhg57a3flcv6yq8hlkyk6fyr3mcb128dp1";
authors = [
"The rust-url developers"
];
dependencies = [
{
name = "percent-encoding";
packageId = "percent-encoding";
usesDefaultFeatures = false;
}
];
features = {
"alloc" = [ "percent-encoding/alloc" ];
"default" = [ "std" ];
"std" = [ "alloc" "percent-encoding/std" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "std" ];
};
"fs_extra" = rec {
crateName = "fs_extra";
version = "1.3.0";
edition = "2018";
sha256 = "075i25z70j2mz9r7i9p9r521y8xdj81q7skslyb7zhqnnw33fw22";
authors = [
"Denis Kurilenko "
];
};
"fuchsia-cprng" = rec {
crateName = "fuchsia-cprng";
version = "0.1.1";
edition = "2018";
sha256 = "1fnkqrbz7ixxzsb04bsz9p0zzazanma8znfdqjvh39n14vapfvx0";
libName = "fuchsia_cprng";
authors = [
"Erick Tryzelaar "
];
};
"generic-array" = rec {
crateName = "generic-array";
version = "0.14.7";
edition = "2015";
sha256 = "16lyyrzrljfq424c3n8kfwkqihlimmsg5nhshbbp48np3yjrqr45";
libName = "generic_array";
authors = [
"Bartłomiej Kamiński "
"Aaron Trent "
];
dependencies = [
{
name = "typenum";
packageId = "typenum";
}
];
buildDependencies = [
{
name = "version_check";
packageId = "version_check";
}
];
features = {
"serde" = [ "dep:serde" ];
"zeroize" = [ "dep:zeroize" ];
};
resolvedDefaultFeatures = [ "more_lengths" ];
};
"globset" = rec {
crateName = "globset";
version = "0.4.14";
edition = "2021";
sha256 = "1qab0c1drpybgm4nc92lf8b46x0ap44c9y4k23rndgc5bfdkpnjp";
authors = [
"Andrew Gallant "
];
dependencies = [
{
name = "aho-corasick";
packageId = "aho-corasick";
}
{
name = "bstr";
packageId = "bstr";
usesDefaultFeatures = false;
features = [ "std" ];
}
{
name = "log";
packageId = "log";
optional = true;
}
{
name = "regex-automata";
packageId = "regex-automata";
usesDefaultFeatures = false;
features = [ "std" "perf" "syntax" "meta" "nfa" "hybrid" ];
}
{
name = "regex-syntax";
packageId = "regex-syntax";
usesDefaultFeatures = false;
features = [ "std" ];
}
];
features = {
"default" = [ "log" ];
"log" = [ "dep:log" ];
"serde" = [ "dep:serde" ];
"serde1" = [ "serde" ];
};
resolvedDefaultFeatures = [ "default" "log" ];
};
"globwalk" = rec {
crateName = "globwalk";
version = "0.9.1";
edition = "2021";
sha256 = "0mz7bsa66p2rrgnz3l94ac4kbklh7mq8j30iizyxjy4qyvmn1xqb";
authors = [
"Gilad Naaman "
];
dependencies = [
{
name = "bitflags";
packageId = "bitflags 2.6.0";
}
{
name = "ignore";
packageId = "ignore";
}
{
name = "walkdir";
packageId = "walkdir";
}
];
};
"hashbrown" = rec {
crateName = "hashbrown";
version = "0.14.5";
edition = "2021";
sha256 = "1wa1vy1xs3mp11bn3z9dv0jricgr6a2j0zkf1g19yz3vw4il89z5";
authors = [
"Amanieu d'Antras "
];
features = {
"ahash" = [ "dep:ahash" ];
"alloc" = [ "dep:alloc" ];
"allocator-api2" = [ "dep:allocator-api2" ];
"compiler_builtins" = [ "dep:compiler_builtins" ];
"core" = [ "dep:core" ];
"default" = [ "ahash" "inline-more" "allocator-api2" ];
"equivalent" = [ "dep:equivalent" ];
"nightly" = [ "allocator-api2?/nightly" "bumpalo/allocator_api" ];
"rayon" = [ "dep:rayon" ];
"rkyv" = [ "dep:rkyv" ];
"rustc-dep-of-std" = [ "nightly" "core" "compiler_builtins" "alloc" "rustc-internal-api" ];
"serde" = [ "dep:serde" ];
};
resolvedDefaultFeatures = [ "raw" ];
};
"heck" = rec {
crateName = "heck";
version = "0.3.3";
edition = "2018";
sha256 = "0b0kkr790p66lvzn9nsmfjvydrbmh9z5gb664jchwgw64vxiwqkd";
authors = [
"Without Boats "
];
dependencies = [
{
name = "unicode-segmentation";
packageId = "unicode-segmentation";
}
];
};
"hermit-abi" = rec {
crateName = "hermit-abi";
version = "0.1.19";
edition = "2018";
sha256 = "0cxcm8093nf5fyn114w8vxbrbcyvv91d4015rdnlgfll7cs6gd32";
libName = "hermit_abi";
authors = [
"Stefan Lankes"
];
dependencies = [
{
name = "libc";
packageId = "libc";
usesDefaultFeatures = false;
}
];
features = {
"compiler_builtins" = [ "dep:compiler_builtins" ];
"core" = [ "dep:core" ];
"rustc-dep-of-std" = [ "core" "compiler_builtins/rustc-dep-of-std" "libc/rustc-dep-of-std" ];
};
resolvedDefaultFeatures = [ "default" ];
};
"hex" = rec {
crateName = "hex";
version = "0.4.3";
edition = "2018";
sha256 = "0w1a4davm1lgzpamwnba907aysmlrnygbqmfis2mqjx5m552a93z";
authors = [
"KokaKiwi "
];
features = {
"default" = [ "std" ];
"serde" = [ "dep:serde" ];
"std" = [ "alloc" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "std" ];
};
"idna" = rec {
crateName = "idna";
version = "0.5.0";
edition = "2018";
sha256 = "1xhjrcjqq0l5bpzvdgylvpkgk94panxgsirzhjnnqfdgc4a9nkb3";
authors = [
"The rust-url developers"
];
dependencies = [
{
name = "unicode-bidi";
packageId = "unicode-bidi";
usesDefaultFeatures = false;
features = [ "hardcoded-data" ];
}
{
name = "unicode-normalization";
packageId = "unicode-normalization";
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "std" ];
"std" = [ "alloc" "unicode-bidi/std" "unicode-normalization/std" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "std" ];
};
"ignore" = rec {
crateName = "ignore";
version = "0.4.22";
edition = "2021";
sha256 = "1wcaqpi6djqgi1brghrdyw4d5qgnwzhqrqyn4mar4vp677gi0s5l";
authors = [
"Andrew Gallant "
];
dependencies = [
{
name = "crossbeam-deque";
packageId = "crossbeam-deque";
}
{
name = "globset";
packageId = "globset";
}
{
name = "log";
packageId = "log";
}
{
name = "memchr";
packageId = "memchr";
}
{
name = "regex-automata";
packageId = "regex-automata";
usesDefaultFeatures = false;
features = [ "std" "perf" "syntax" "meta" "nfa" "hybrid" "dfa-onepass" ];
}
{
name = "same-file";
packageId = "same-file";
}
{
name = "walkdir";
packageId = "walkdir";
}
{
name = "winapi-util";
packageId = "winapi-util";
target = { target, features }: (target."windows" or false);
}
];
features = {
};
};
"indexmap" = rec {
crateName = "indexmap";
version = "2.2.6";
edition = "2021";
sha256 = "09hgwi2ig0wyj5rjziia76zmhgfj95k0jb4ic3iiawm4vlavg3qn";
dependencies = [
{
name = "equivalent";
packageId = "equivalent";
usesDefaultFeatures = false;
}
{
name = "hashbrown";
packageId = "hashbrown";
usesDefaultFeatures = false;
features = [ "raw" ];
}
];
features = {
"arbitrary" = [ "dep:arbitrary" ];
"borsh" = [ "dep:borsh" ];
"default" = [ "std" ];
"quickcheck" = [ "dep:quickcheck" ];
"rayon" = [ "dep:rayon" ];
"rustc-rayon" = [ "dep:rustc-rayon" ];
"serde" = [ "dep:serde" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"itertools 0.10.5" = rec {
crateName = "itertools";
version = "0.10.5";
edition = "2018";
sha256 = "0ww45h7nxx5kj6z2y6chlskxd1igvs4j507anr6dzg99x1h25zdh";
authors = [
"bluss"
];
dependencies = [
{
name = "either";
packageId = "either";
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "use_std" ];
"use_std" = [ "use_alloc" "either/use_std" ];
};
};
"itertools 0.12.1" = rec {
crateName = "itertools";
version = "0.12.1";
edition = "2018";
sha256 = "0s95jbb3ndj1lvfxyq5wanc0fm0r6hg6q4ngb92qlfdxvci10ads";
authors = [
"bluss"
];
dependencies = [
{
name = "either";
packageId = "either";
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "use_std" ];
"use_std" = [ "use_alloc" "either/use_std" ];
};
resolvedDefaultFeatures = [ "default" "use_alloc" "use_std" ];
};
"itoa" = rec {
crateName = "itoa";
version = "1.0.11";
edition = "2018";
sha256 = "0nv9cqjwzr3q58qz84dcz63ggc54yhf1yqar1m858m1kfd4g3wa9";
authors = [
"David Tolnay "
];
features = {
"no-panic" = [ "dep:no-panic" ];
};
};
"lazy_static" = rec {
crateName = "lazy_static";
version = "1.5.0";
edition = "2015";
sha256 = "1zk6dqqni0193xg6iijh7i3i44sryglwgvx20spdvwk3r6sbrlmv";
authors = [
"Marvin Löbel "
];
features = {
"spin" = [ "dep:spin" ];
"spin_no_std" = [ "spin" ];
};
};
"libc" = rec {
crateName = "libc";
version = "0.2.155";
edition = "2015";
sha256 = "0z44c53z54znna8n322k5iwg80arxxpdzjj5260pxxzc9a58icwp";
authors = [
"The Rust Project Developers"
];
features = {
"default" = [ "std" ];
"rustc-dep-of-std" = [ "align" "rustc-std-workspace-core" ];
"rustc-std-workspace-core" = [ "dep:rustc-std-workspace-core" ];
"use_std" = [ "std" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"log" = rec {
crateName = "log";
version = "0.4.22";
edition = "2021";
sha256 = "093vs0wkm1rgyykk7fjbqp2lwizbixac1w52gv109p5r4jh0p9x7";
authors = [
"The Rust Project Developers"
];
features = {
"kv_serde" = [ "kv_std" "value-bag/serde" "serde" ];
"kv_std" = [ "std" "kv" "value-bag/error" ];
"kv_sval" = [ "kv" "value-bag/sval" "sval" "sval_ref" ];
"kv_unstable" = [ "kv" "value-bag" ];
"kv_unstable_serde" = [ "kv_serde" "kv_unstable_std" ];
"kv_unstable_std" = [ "kv_std" "kv_unstable" ];
"kv_unstable_sval" = [ "kv_sval" "kv_unstable" ];
"serde" = [ "dep:serde" ];
"sval" = [ "dep:sval" ];
"sval_ref" = [ "dep:sval_ref" ];
"value-bag" = [ "dep:value-bag" ];
};
};
"memchr" = rec {
crateName = "memchr";
version = "2.7.4";
edition = "2021";
sha256 = "18z32bhxrax0fnjikv475z7ii718hq457qwmaryixfxsl2qrmjkq";
authors = [
"Andrew Gallant "
"bluss"
];
features = {
"compiler_builtins" = [ "dep:compiler_builtins" ];
"core" = [ "dep:core" ];
"default" = [ "std" ];
"logging" = [ "dep:log" ];
"rustc-dep-of-std" = [ "core" "compiler_builtins" ];
"std" = [ "alloc" ];
"use_std" = [ "std" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "std" ];
};
"nix-base32" = rec {
crateName = "nix-base32";
version = "0.1.1";
edition = "2018";
sha256 = "04jnq6arig0amz0scadavbzn9bg9k4zphmrm1562n6ygfj1dnj45";
libName = "nix_base32";
authors = [
"Peter Kolloch "
];
};
"once_cell" = rec {
crateName = "once_cell";
version = "1.19.0";
edition = "2021";
sha256 = "14kvw7px5z96dk4dwdm1r9cqhhy2cyj1l5n5b29mynbb8yr15nrz";
authors = [
"Aleksey Kladov "
];
features = {
"alloc" = [ "race" ];
"atomic-polyfill" = [ "critical-section" ];
"critical-section" = [ "dep:critical-section" "portable-atomic" ];
"default" = [ "std" ];
"parking_lot" = [ "dep:parking_lot_core" ];
"portable-atomic" = [ "dep:portable-atomic" ];
"std" = [ "alloc" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "race" "std" ];
};
"pathdiff" = rec {
crateName = "pathdiff";
version = "0.2.1";
edition = "2018";
sha256 = "1pa4dcmb7lwir4himg1mnl97a05b2z0svczg62l8940pbim12dc8";
authors = [
"Manish Goregaokar "
];
features = {
"camino" = [ "dep:camino" ];
};
};
"percent-encoding" = rec {
crateName = "percent-encoding";
version = "2.3.1";
edition = "2018";
sha256 = "0gi8wgx0dcy8rnv1kywdv98lwcx67hz0a0zwpib5v2i08r88y573";
libName = "percent_encoding";
authors = [
"The rust-url developers"
];
features = {
"default" = [ "std" ];
"std" = [ "alloc" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "std" ];
};
"pest" = rec {
crateName = "pest";
version = "2.7.10";
edition = "2021";
sha256 = "1s4fvis7h6l872g6nk17r130kcllj4c0hjvwkzd3hi196g3320an";
authors = [
"Dragoș Tiselice "
];
dependencies = [
{
name = "memchr";
packageId = "memchr";
optional = true;
}
{
name = "thiserror";
packageId = "thiserror";
optional = true;
}
{
name = "ucd-trie";
packageId = "ucd-trie";
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "std" "memchr" ];
"memchr" = [ "dep:memchr" ];
"pretty-print" = [ "dep:serde" "dep:serde_json" ];
"std" = [ "ucd-trie/std" "dep:thiserror" ];
};
resolvedDefaultFeatures = [ "default" "memchr" "std" ];
};
"pest_derive" = rec {
crateName = "pest_derive";
version = "2.7.10";
edition = "2021";
sha256 = "0n8lsk9s21dp7958p9yarbk2gsc8wg0rvdzr7cd7pjpvjf8kqa96";
procMacro = true;
authors = [
"Dragoș Tiselice "
];
dependencies = [
{
name = "pest";
packageId = "pest";
usesDefaultFeatures = false;
}
{
name = "pest_generator";
packageId = "pest_generator";
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "std" ];
"grammar-extras" = [ "pest_generator/grammar-extras" ];
"not-bootstrap-in-src" = [ "pest_generator/not-bootstrap-in-src" ];
"std" = [ "pest/std" "pest_generator/std" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"pest_generator" = rec {
crateName = "pest_generator";
version = "2.7.10";
edition = "2021";
sha256 = "11s6q0vf25lckbzak0qndzpv87ksaxy6pa9cvn2hlizvsgvjmhiy";
authors = [
"Dragoș Tiselice "
];
dependencies = [
{
name = "pest";
packageId = "pest";
usesDefaultFeatures = false;
}
{
name = "pest_meta";
packageId = "pest_meta";
}
{
name = "proc-macro2";
packageId = "proc-macro2";
}
{
name = "quote";
packageId = "quote";
}
{
name = "syn";
packageId = "syn 2.0.68";
}
];
features = {
"default" = [ "std" ];
"grammar-extras" = [ "pest_meta/grammar-extras" ];
"not-bootstrap-in-src" = [ "pest_meta/not-bootstrap-in-src" ];
"std" = [ "pest/std" ];
};
resolvedDefaultFeatures = [ "std" ];
};
"pest_meta" = rec {
crateName = "pest_meta";
version = "2.7.10";
edition = "2021";
sha256 = "1kdxl164yyjsmn01lvllsll4sz3xbgy4dmkq33n63hrp5w1418np";
authors = [
"Dragoș Tiselice "
];
dependencies = [
{
name = "once_cell";
packageId = "once_cell";
}
{
name = "pest";
packageId = "pest";
}
];
buildDependencies = [
{
name = "sha2";
packageId = "sha2";
usesDefaultFeatures = false;
}
];
features = {
"not-bootstrap-in-src" = [ "dep:cargo" ];
};
resolvedDefaultFeatures = [ "default" ];
};
"proc-macro-error" = rec {
crateName = "proc-macro-error";
version = "1.0.4";
edition = "2018";
sha256 = "1373bhxaf0pagd8zkyd03kkx6bchzf6g0dkwrwzsnal9z47lj9fs";
libName = "proc_macro_error";
authors = [
"CreepySkeleton "
];
dependencies = [
{
name = "proc-macro-error-attr";
packageId = "proc-macro-error-attr";
}
{
name = "proc-macro2";
packageId = "proc-macro2";
}
{
name = "quote";
packageId = "quote";
}
{
name = "syn";
packageId = "syn 1.0.109";
optional = true;
usesDefaultFeatures = false;
}
];
buildDependencies = [
{
name = "version_check";
packageId = "version_check";
}
];
features = {
"default" = [ "syn-error" ];
"syn" = [ "dep:syn" ];
"syn-error" = [ "syn" ];
};
resolvedDefaultFeatures = [ "default" "syn" "syn-error" ];
};
"proc-macro-error-attr" = rec {
crateName = "proc-macro-error-attr";
version = "1.0.4";
edition = "2018";
sha256 = "0sgq6m5jfmasmwwy8x4mjygx5l7kp8s4j60bv25ckv2j1qc41gm1";
procMacro = true;
libName = "proc_macro_error_attr";
authors = [
"CreepySkeleton "
];
dependencies = [
{
name = "proc-macro2";
packageId = "proc-macro2";
}
{
name = "quote";
packageId = "quote";
}
];
buildDependencies = [
{
name = "version_check";
packageId = "version_check";
}
];
};
"proc-macro2" = rec {
crateName = "proc-macro2";
version = "1.0.86";
edition = "2021";
sha256 = "0xrv22p8lqlfdf1w0pj4si8n2ws4aw0kilmziwf0vpv5ys6rwway";
libName = "proc_macro2";
authors = [
"David Tolnay "
"Alex Crichton "
];
dependencies = [
{
name = "unicode-ident";
packageId = "unicode-ident";
}
];
features = {
"default" = [ "proc-macro" ];
};
resolvedDefaultFeatures = [ "default" "proc-macro" ];
};
"quote" = rec {
crateName = "quote";
version = "1.0.36";
edition = "2018";
sha256 = "19xcmh445bg6simirnnd4fvkmp6v2qiwxh5f6rw4a70h76pnm9qg";
authors = [
"David Tolnay "
];
dependencies = [
{
name = "proc-macro2";
packageId = "proc-macro2";
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "proc-macro" ];
"proc-macro" = [ "proc-macro2/proc-macro" ];
};
resolvedDefaultFeatures = [ "default" "proc-macro" ];
};
"rand" = rec {
crateName = "rand";
version = "0.4.6";
edition = "2015";
sha256 = "14qjfv3gggzhnma20k0sc1jf8y6pplsaq7n1j9ls5c8kf2wl0a2m";
authors = [
"The Rust Project Developers"
];
dependencies = [
{
name = "fuchsia-cprng";
packageId = "fuchsia-cprng";
target = { target, features }: ("fuchsia" == target."os" or null);
}
{
name = "libc";
packageId = "libc";
optional = true;
target = { target, features }: (target."unix" or false);
}
{
name = "rand_core";
packageId = "rand_core 0.3.1";
usesDefaultFeatures = false;
target = { target, features }: ("sgx" == target."env" or null);
}
{
name = "rdrand";
packageId = "rdrand";
target = { target, features }: ("sgx" == target."env" or null);
}
{
name = "winapi";
packageId = "winapi";
target = { target, features }: (target."windows" or false);
features = [ "minwindef" "ntsecapi" "profileapi" "winnt" ];
}
];
features = {
"default" = [ "std" ];
"libc" = [ "dep:libc" ];
"nightly" = [ "i128_support" ];
"std" = [ "libc" ];
};
resolvedDefaultFeatures = [ "default" "libc" "std" ];
};
"rand_core 0.3.1" = rec {
crateName = "rand_core";
version = "0.3.1";
edition = "2015";
sha256 = "0jzdgszfa4bliigiy4hi66k7fs3gfwi2qxn8vik84ph77fwdwvvs";
authors = [
"The Rand Project Developers"
"The Rust Project Developers"
];
dependencies = [
{
name = "rand_core";
packageId = "rand_core 0.4.2";
}
];
features = {
"alloc" = [ "rand_core/alloc" ];
"default" = [ "std" ];
"serde1" = [ "rand_core/serde1" ];
"std" = [ "rand_core/std" ];
};
};
"rand_core 0.4.2" = rec {
crateName = "rand_core";
version = "0.4.2";
edition = "2015";
sha256 = "1p09ynysrq1vcdlmcqnapq4qakl2yd1ng3kxh3qscpx09k2a6cww";
authors = [
"The Rand Project Developers"
"The Rust Project Developers"
];
features = {
"serde" = [ "dep:serde" ];
"serde1" = [ "serde" "serde_derive" ];
"serde_derive" = [ "dep:serde_derive" ];
"std" = [ "alloc" ];
};
};
"rdrand" = rec {
crateName = "rdrand";
version = "0.4.0";
edition = "2015";
sha256 = "1cjq0kwx1bk7jx3kzyciiish5gqsj7620dm43dc52sr8fzmm9037";
authors = [
"Simonas Kazlauskas "
];
dependencies = [
{
name = "rand_core";
packageId = "rand_core 0.3.1";
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "std" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"regex" = rec {
crateName = "regex";
version = "1.10.5";
edition = "2021";
sha256 = "0zsiqk2sxc1kd46qw0yp87s2a14ialwyxinpl0k266ddkm1i64mr";
authors = [
"The Rust Project Developers"
"Andrew Gallant "
];
dependencies = [
{
name = "aho-corasick";
packageId = "aho-corasick";
optional = true;
usesDefaultFeatures = false;
}
{
name = "memchr";
packageId = "memchr";
optional = true;
usesDefaultFeatures = false;
}
{
name = "regex-automata";
packageId = "regex-automata";
usesDefaultFeatures = false;
features = [ "alloc" "syntax" "meta" "nfa-pikevm" ];
}
{
name = "regex-syntax";
packageId = "regex-syntax";
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "std" "perf" "unicode" "regex-syntax/default" ];
"logging" = [ "aho-corasick?/logging" "memchr?/logging" "regex-automata/logging" ];
"perf" = [ "perf-cache" "perf-dfa" "perf-onepass" "perf-backtrack" "perf-inline" "perf-literal" ];
"perf-backtrack" = [ "regex-automata/nfa-backtrack" ];
"perf-dfa" = [ "regex-automata/hybrid" ];
"perf-dfa-full" = [ "regex-automata/dfa-build" "regex-automata/dfa-search" ];
"perf-inline" = [ "regex-automata/perf-inline" ];
"perf-literal" = [ "dep:aho-corasick" "dep:memchr" "regex-automata/perf-literal" ];
"perf-onepass" = [ "regex-automata/dfa-onepass" ];
"std" = [ "aho-corasick?/std" "memchr?/std" "regex-automata/std" "regex-syntax/std" ];
"unicode" = [ "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" "regex-automata/unicode" "regex-syntax/unicode" ];
"unicode-age" = [ "regex-automata/unicode-age" "regex-syntax/unicode-age" ];
"unicode-bool" = [ "regex-automata/unicode-bool" "regex-syntax/unicode-bool" ];
"unicode-case" = [ "regex-automata/unicode-case" "regex-syntax/unicode-case" ];
"unicode-gencat" = [ "regex-automata/unicode-gencat" "regex-syntax/unicode-gencat" ];
"unicode-perl" = [ "regex-automata/unicode-perl" "regex-automata/unicode-word-boundary" "regex-syntax/unicode-perl" ];
"unicode-script" = [ "regex-automata/unicode-script" "regex-syntax/unicode-script" ];
"unicode-segment" = [ "regex-automata/unicode-segment" "regex-syntax/unicode-segment" ];
"unstable" = [ "pattern" ];
"use_std" = [ "std" ];
};
resolvedDefaultFeatures = [ "default" "perf" "perf-backtrack" "perf-cache" "perf-dfa" "perf-inline" "perf-literal" "perf-onepass" "std" "unicode" "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" ];
};
"regex-automata" = rec {
crateName = "regex-automata";
version = "0.4.7";
edition = "2021";
sha256 = "1pwjdi4jckpbaivpl6x4v5g4crb37zr2wac93wlfsbzgqn6gbjiq";
libName = "regex_automata";
authors = [
"The Rust Project Developers"
"Andrew Gallant "
];
dependencies = [
{
name = "aho-corasick";
packageId = "aho-corasick";
optional = true;
usesDefaultFeatures = false;
}
{
name = "memchr";
packageId = "memchr";
optional = true;
usesDefaultFeatures = false;
}
{
name = "regex-syntax";
packageId = "regex-syntax";
optional = true;
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "std" "syntax" "perf" "unicode" "meta" "nfa" "dfa" "hybrid" ];
"dfa" = [ "dfa-build" "dfa-search" "dfa-onepass" ];
"dfa-build" = [ "nfa-thompson" "dfa-search" ];
"dfa-onepass" = [ "nfa-thompson" ];
"hybrid" = [ "alloc" "nfa-thompson" ];
"internal-instrument" = [ "internal-instrument-pikevm" ];
"internal-instrument-pikevm" = [ "logging" "std" ];
"logging" = [ "dep:log" "aho-corasick?/logging" "memchr?/logging" ];
"meta" = [ "syntax" "nfa-pikevm" ];
"nfa" = [ "nfa-thompson" "nfa-pikevm" "nfa-backtrack" ];
"nfa-backtrack" = [ "nfa-thompson" ];
"nfa-pikevm" = [ "nfa-thompson" ];
"nfa-thompson" = [ "alloc" ];
"perf" = [ "perf-inline" "perf-literal" ];
"perf-literal" = [ "perf-literal-substring" "perf-literal-multisubstring" ];
"perf-literal-multisubstring" = [ "std" "dep:aho-corasick" ];
"perf-literal-substring" = [ "aho-corasick?/perf-literal" "dep:memchr" ];
"std" = [ "regex-syntax?/std" "memchr?/std" "aho-corasick?/std" "alloc" ];
"syntax" = [ "dep:regex-syntax" "alloc" ];
"unicode" = [ "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" "unicode-word-boundary" "regex-syntax?/unicode" ];
"unicode-age" = [ "regex-syntax?/unicode-age" ];
"unicode-bool" = [ "regex-syntax?/unicode-bool" ];
"unicode-case" = [ "regex-syntax?/unicode-case" ];
"unicode-gencat" = [ "regex-syntax?/unicode-gencat" ];
"unicode-perl" = [ "regex-syntax?/unicode-perl" ];
"unicode-script" = [ "regex-syntax?/unicode-script" ];
"unicode-segment" = [ "regex-syntax?/unicode-segment" ];
};
resolvedDefaultFeatures = [ "alloc" "dfa-onepass" "hybrid" "meta" "nfa" "nfa-backtrack" "nfa-pikevm" "nfa-thompson" "perf" "perf-inline" "perf-literal" "perf-literal-multisubstring" "perf-literal-substring" "std" "syntax" "unicode" "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" "unicode-word-boundary" ];
};
"regex-syntax" = rec {
crateName = "regex-syntax";
version = "0.8.4";
edition = "2021";
sha256 = "16r0kjy20vx33dr4mhasj5l1f87czas714x2fz6zl0f8wwxa0rks";
libName = "regex_syntax";
authors = [
"The Rust Project Developers"
"Andrew Gallant "
];
features = {
"arbitrary" = [ "dep:arbitrary" ];
"default" = [ "std" "unicode" ];
"unicode" = [ "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" ];
};
resolvedDefaultFeatures = [ "default" "std" "unicode" "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" ];
};
"remove_dir_all" = rec {
crateName = "remove_dir_all";
version = "0.5.3";
edition = "2015";
sha256 = "1rzqbsgkmr053bxxl04vmvsd1njyz0nxvly97aip6aa2cmb15k9s";
authors = [
"Aaronepower "
];
dependencies = [
{
name = "winapi";
packageId = "winapi";
target = { target, features }: (target."windows" or false);
features = [ "std" "errhandlingapi" "winerror" "fileapi" "winbase" ];
}
];
};
"ryu" = rec {
crateName = "ryu";
version = "1.0.18";
edition = "2018";
sha256 = "17xx2s8j1lln7iackzd9p0sv546vjq71i779gphjq923vjh5pjzk";
authors = [
"David Tolnay "
];
features = {
"no-panic" = [ "dep:no-panic" ];
};
};
"same-file" = rec {
crateName = "same-file";
version = "1.0.6";
edition = "2018";
sha256 = "00h5j1w87dmhnvbv9l8bic3y7xxsnjmssvifw2ayvgx9mb1ivz4k";
libName = "same_file";
authors = [
"Andrew Gallant "
];
dependencies = [
{
name = "winapi-util";
packageId = "winapi-util";
target = { target, features }: (target."windows" or false);
}
];
};
"semver" = rec {
crateName = "semver";
version = "1.0.23";
edition = "2018";
sha256 = "12wqpxfflclbq4dv8sa6gchdh92ahhwn4ci1ls22wlby3h57wsb1";
authors = [
"David Tolnay "
];
dependencies = [
{
name = "serde";
packageId = "serde";
optional = true;
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "std" ];
"serde" = [ "dep:serde" ];
};
resolvedDefaultFeatures = [ "default" "serde" "std" ];
};
"serde" = rec {
crateName = "serde";
version = "1.0.203";
edition = "2018";
sha256 = "1500ghq198n6py5anvz5qbqagd9h1hq04f4qpsvjzrvix56snlvj";
authors = [
"Erick Tryzelaar "
"David Tolnay "
];
dependencies = [
{
name = "serde_derive";
packageId = "serde_derive";
optional = true;
}
{
name = "serde_derive";
packageId = "serde_derive";
target = { target, features }: false;
}
];
devDependencies = [
{
name = "serde_derive";
packageId = "serde_derive";
}
];
features = {
"default" = [ "std" ];
"derive" = [ "serde_derive" ];
"serde_derive" = [ "dep:serde_derive" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "derive" "serde_derive" "std" ];
};
"serde_derive" = rec {
crateName = "serde_derive";
version = "1.0.203";
edition = "2015";
sha256 = "1fmmqmfza3mwxb1v80737dj01gznrh8mhgqgylkndx5npq7bq32h";
procMacro = true;
authors = [
"Erick Tryzelaar "
"David Tolnay "
];
dependencies = [
{
name = "proc-macro2";
packageId = "proc-macro2";
usesDefaultFeatures = false;
features = [ "proc-macro" ];
}
{
name = "quote";
packageId = "quote";
usesDefaultFeatures = false;
features = [ "proc-macro" ];
}
{
name = "syn";
packageId = "syn 2.0.68";
usesDefaultFeatures = false;
features = [ "clone-impls" "derive" "parsing" "printing" "proc-macro" ];
}
];
features = {
};
resolvedDefaultFeatures = [ "default" ];
};
"serde_json" = rec {
crateName = "serde_json";
version = "1.0.118";
edition = "2021";
sha256 = "1r7jpqdfnrv8skn5va1r202g6lhdhka0vyn42vm5g21x2srzciyr";
authors = [
"Erick Tryzelaar "
"David Tolnay "
];
dependencies = [
{
name = "itoa";
packageId = "itoa";
}
{
name = "ryu";
packageId = "ryu";
}
{
name = "serde";
packageId = "serde";
usesDefaultFeatures = false;
}
];
devDependencies = [
{
name = "serde";
packageId = "serde";
features = [ "derive" ];
}
];
features = {
"alloc" = [ "serde/alloc" ];
"default" = [ "std" ];
"indexmap" = [ "dep:indexmap" ];
"preserve_order" = [ "indexmap" "std" ];
"std" = [ "serde/std" ];
};
resolvedDefaultFeatures = [ "default" "std" "unbounded_depth" ];
};
"serde_spanned" = rec {
crateName = "serde_spanned";
version = "0.6.6";
edition = "2021";
sha256 = "1839b6m5p9ijjmcwamiya2r612ks2vg6w2pp95yg76lr3zh79rkr";
dependencies = [
{
name = "serde";
packageId = "serde";
optional = true;
}
];
devDependencies = [
{
name = "serde";
packageId = "serde";
}
];
features = {
"serde" = [ "dep:serde" ];
};
resolvedDefaultFeatures = [ "serde" ];
};
"sha2" = rec {
crateName = "sha2";
version = "0.10.8";
edition = "2018";
sha256 = "1j1x78zk9il95w9iv46dh9wm73r6xrgj32y6lzzw7bxws9dbfgbr";
authors = [
"RustCrypto Developers"
];
dependencies = [
{
name = "cfg-if";
packageId = "cfg-if";
}
{
name = "cpufeatures";
packageId = "cpufeatures";
target = { target, features }: (("aarch64" == target."arch" or null) || ("x86_64" == target."arch" or null) || ("x86" == target."arch" or null));
}
{
name = "digest";
packageId = "digest";
}
];
devDependencies = [
{
name = "digest";
packageId = "digest";
features = [ "dev" ];
}
];
features = {
"asm" = [ "sha2-asm" ];
"asm-aarch64" = [ "asm" ];
"default" = [ "std" ];
"oid" = [ "digest/oid" ];
"sha2-asm" = [ "dep:sha2-asm" ];
"std" = [ "digest/std" ];
};
};
"strsim" = rec {
crateName = "strsim";
version = "0.8.0";
edition = "2015";
sha256 = "0sjsm7hrvjdifz661pjxq5w4hf190hx53fra8dfvamacvff139cf";
authors = [
"Danny Guo "
];
};
"structopt" = rec {
crateName = "structopt";
version = "0.3.26";
edition = "2018";
sha256 = "043sg3qxllann6q9i71d05qp3q13scmcvhxhd950ka2v8ij5qsqc";
authors = [
"Guillaume Pinot "
"others"
];
dependencies = [
{
name = "clap";
packageId = "clap";
usesDefaultFeatures = false;
}
{
name = "lazy_static";
packageId = "lazy_static";
}
{
name = "structopt-derive";
packageId = "structopt-derive";
}
];
features = {
"color" = [ "clap/color" ];
"debug" = [ "clap/debug" ];
"default" = [ "clap/default" ];
"doc" = [ "clap/doc" ];
"lints" = [ "clap/lints" ];
"no_cargo" = [ "clap/no_cargo" ];
"paw" = [ "structopt-derive/paw" "paw_dep" ];
"paw_dep" = [ "dep:paw_dep" ];
"suggestions" = [ "clap/suggestions" ];
"wrap_help" = [ "clap/wrap_help" ];
"yaml" = [ "clap/yaml" ];
};
resolvedDefaultFeatures = [ "default" ];
};
"structopt-derive" = rec {
crateName = "structopt-derive";
version = "0.4.18";
edition = "2018";
sha256 = "1q5gcigmvw0cinjxzpyrkflliq5r1ivljmrvfrl3phcwgwraxdfw";
procMacro = true;
libName = "structopt_derive";
authors = [
"Guillaume Pinot "
];
dependencies = [
{
name = "heck";
packageId = "heck";
}
{
name = "proc-macro-error";
packageId = "proc-macro-error";
}
{
name = "proc-macro2";
packageId = "proc-macro2";
}
{
name = "quote";
packageId = "quote";
}
{
name = "syn";
packageId = "syn 1.0.109";
features = [ "full" ];
}
];
features = {
};
};
"syn 1.0.109" = rec {
crateName = "syn";
version = "1.0.109";
edition = "2018";
sha256 = "0ds2if4600bd59wsv7jjgfkayfzy3hnazs394kz6zdkmna8l3dkj";
authors = [
"David Tolnay "
];
dependencies = [
{
name = "proc-macro2";
packageId = "proc-macro2";
usesDefaultFeatures = false;
}
{
name = "quote";
packageId = "quote";
optional = true;
usesDefaultFeatures = false;
}
{
name = "unicode-ident";
packageId = "unicode-ident";
}
];
features = {
"default" = [ "derive" "parsing" "printing" "clone-impls" "proc-macro" ];
"printing" = [ "quote" ];
"proc-macro" = [ "proc-macro2/proc-macro" "quote/proc-macro" ];
"quote" = [ "dep:quote" ];
"test" = [ "syn-test-suite/all-features" ];
};
resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "full" "parsing" "printing" "proc-macro" "quote" ];
};
"syn 2.0.68" = rec {
crateName = "syn";
version = "2.0.68";
edition = "2021";
sha256 = "1sf1y2hajhjav38ipg63c934xrgkz4v42fz24a0ckmmri06sf7wh";
authors = [
"David Tolnay "
];
dependencies = [
{
name = "proc-macro2";
packageId = "proc-macro2";
usesDefaultFeatures = false;
}
{
name = "quote";
packageId = "quote";
optional = true;
usesDefaultFeatures = false;
}
{
name = "unicode-ident";
packageId = "unicode-ident";
}
];
features = {
"default" = [ "derive" "parsing" "printing" "clone-impls" "proc-macro" ];
"printing" = [ "dep:quote" ];
"proc-macro" = [ "proc-macro2/proc-macro" "quote?/proc-macro" ];
"test" = [ "syn-test-suite/all-features" ];
};
resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "parsing" "printing" "proc-macro" ];
};
"tempdir" = rec {
crateName = "tempdir";
version = "0.3.7";
edition = "2015";
sha256 = "1n5n86zxpgd85y0mswrp5cfdisizq2rv3la906g6ipyc03xvbwhm";
authors = [
"The Rust Project Developers"
];
dependencies = [
{
name = "rand";
packageId = "rand";
}
{
name = "remove_dir_all";
packageId = "remove_dir_all";
}
];
};
"tera" = rec {
crateName = "tera";
version = "1.20.0";
edition = "2018";
sha256 = "1vnj9imw2h9szkd1izsrhwrc9jvazvdsp84x65wg2rg88ldqb7db";
authors = [
"Vincent Prouillet "
];
dependencies = [
{
name = "globwalk";
packageId = "globwalk";
}
{
name = "lazy_static";
packageId = "lazy_static";
}
{
name = "pest";
packageId = "pest";
}
{
name = "pest_derive";
packageId = "pest_derive";
}
{
name = "regex";
packageId = "regex";
}
{
name = "serde";
packageId = "serde";
}
{
name = "serde_json";
packageId = "serde_json";
}
{
name = "unic-segment";
packageId = "unic-segment";
}
];
features = {
"builtins" = [ "urlencode" "slug" "humansize" "chrono" "chrono-tz" "rand" ];
"chrono" = [ "dep:chrono" ];
"chrono-tz" = [ "dep:chrono-tz" ];
"date-locale" = [ "builtins" "chrono/unstable-locales" ];
"default" = [ "builtins" ];
"humansize" = [ "dep:humansize" ];
"percent-encoding" = [ "dep:percent-encoding" ];
"preserve_order" = [ "serde_json/preserve_order" ];
"rand" = [ "dep:rand" ];
"slug" = [ "dep:slug" ];
"urlencode" = [ "percent-encoding" ];
};
};
"textwrap" = rec {
crateName = "textwrap";
version = "0.11.0";
edition = "2015";
sha256 = "0q5hky03ik3y50s9sz25r438bc4nwhqc6dqwynv4wylc807n29nk";
authors = [
"Martin Geisler "
];
dependencies = [
{
name = "unicode-width";
packageId = "unicode-width";
}
];
features = {
"hyphenation" = [ "dep:hyphenation" ];
"term_size" = [ "dep:term_size" ];
};
};
"thiserror" = rec {
crateName = "thiserror";
version = "1.0.61";
edition = "2021";
sha256 = "028prh962l16cmjivwb1g9xalbpqip0305zhq006mg74dc6whin5";
authors = [
"David Tolnay "
];
dependencies = [
{
name = "thiserror-impl";
packageId = "thiserror-impl";
}
];
};
"thiserror-impl" = rec {
crateName = "thiserror-impl";
version = "1.0.61";
edition = "2021";
sha256 = "0cvm37hp0kbcyk1xac1z0chpbd9pbn2g456iyid6sah0a113ihs6";
procMacro = true;
libName = "thiserror_impl";
authors = [
"David Tolnay "
];
dependencies = [
{
name = "proc-macro2";
packageId = "proc-macro2";
}
{
name = "quote";
packageId = "quote";
}
{
name = "syn";
packageId = "syn 2.0.68";
}
];
};
"tinyvec" = rec {
crateName = "tinyvec";
version = "1.6.1";
edition = "2018";
sha256 = "10idfhsvp7zhbr8pn37wfra2bn02vr5xg6mhdvrbxlp2zg31alf5";
authors = [
"Lokathor "
];
dependencies = [
{
name = "tinyvec_macros";
packageId = "tinyvec_macros";
optional = true;
}
];
features = {
"alloc" = [ "tinyvec_macros" ];
"arbitrary" = [ "dep:arbitrary" ];
"real_blackbox" = [ "criterion/real_blackbox" ];
"rustc_1_57" = [ "rustc_1_55" ];
"serde" = [ "dep:serde" ];
"std" = [ "alloc" ];
"tinyvec_macros" = [ "dep:tinyvec_macros" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "tinyvec_macros" ];
};
"tinyvec_macros" = rec {
crateName = "tinyvec_macros";
version = "0.1.1";
edition = "2018";
sha256 = "081gag86208sc3y6sdkshgw3vysm5d34p431dzw0bshz66ncng0z";
authors = [
"Soveu "
];
};
"toml" = rec {
crateName = "toml";
version = "0.8.14";
edition = "2021";
sha256 = "0dgk8bacrza09npifba1xsx7wyjjvhz3igxpdnyjcbqxn8mfnjbg";
authors = [
"Alex Crichton "
];
dependencies = [
{
name = "serde";
packageId = "serde";
}
{
name = "serde_spanned";
packageId = "serde_spanned";
features = [ "serde" ];
}
{
name = "toml_datetime";
packageId = "toml_datetime";
features = [ "serde" ];
}
{
name = "toml_edit";
packageId = "toml_edit";
optional = true;
usesDefaultFeatures = false;
features = [ "serde" ];
}
];
devDependencies = [
{
name = "serde";
packageId = "serde";
features = [ "derive" ];
}
];
features = {
"default" = [ "parse" "display" ];
"display" = [ "dep:toml_edit" "toml_edit?/display" ];
"indexmap" = [ "dep:indexmap" ];
"parse" = [ "dep:toml_edit" "toml_edit?/parse" ];
"preserve_order" = [ "indexmap" ];
};
resolvedDefaultFeatures = [ "default" "display" "parse" ];
};
"toml_datetime" = rec {
crateName = "toml_datetime";
version = "0.6.6";
edition = "2021";
sha256 = "1grcrr3gh7id3cy3j700kczwwfbn04p5ncrrj369prjaj9bgvbab";
authors = [
"Alex Crichton "
];
dependencies = [
{
name = "serde";
packageId = "serde";
optional = true;
}
];
features = {
"serde" = [ "dep:serde" ];
};
resolvedDefaultFeatures = [ "serde" ];
};
"toml_edit" = rec {
crateName = "toml_edit";
version = "0.22.14";
edition = "2021";
sha256 = "0f2fw0viqvisjhqwjavgypz5mgbldh53przrsjlrrggijyppl77j";
authors = [
"Andronik Ordian "
"Ed Page "
];
dependencies = [
{
name = "indexmap";
packageId = "indexmap";
features = [ "std" ];
}
{
name = "serde";
packageId = "serde";
optional = true;
}
{
name = "serde_spanned";
packageId = "serde_spanned";
optional = true;
features = [ "serde" ];
}
{
name = "toml_datetime";
packageId = "toml_datetime";
}
{
name = "winnow";
packageId = "winnow";
optional = true;
}
];
features = {
"default" = [ "parse" "display" ];
"parse" = [ "dep:winnow" ];
"perf" = [ "dep:kstring" ];
"serde" = [ "dep:serde" "toml_datetime/serde" "dep:serde_spanned" ];
};
resolvedDefaultFeatures = [ "display" "parse" "serde" ];
};
"typenum" = rec {
crateName = "typenum";
version = "1.17.0";
edition = "2018";
sha256 = "09dqxv69m9lj9zvv6xw5vxaqx15ps0vxyy5myg33i0kbqvq0pzs2";
build = "build/main.rs";
authors = [
"Paho Lurie-Gregg "
"Andre Bogus "
];
features = {
"scale-info" = [ "dep:scale-info" ];
"scale_info" = [ "scale-info/derive" ];
};
};
"ucd-trie" = rec {
crateName = "ucd-trie";
version = "0.1.6";
edition = "2021";
sha256 = "1ff4yfksirqs37ybin9aw71aa5gva00hw7jdxbw8w668zy964r7d";
libName = "ucd_trie";
authors = [
"Andrew Gallant "
];
features = {
"default" = [ "std" ];
};
resolvedDefaultFeatures = [ "std" ];
};
"unic-char-property" = rec {
crateName = "unic-char-property";
version = "0.9.0";
edition = "2018";
sha256 = "08g21dn3wwix3ycfl0vrbahn0835nv2q3swm8wms0vwvgm07mid8";
libName = "unic_char_property";
authors = [
"The UNIC Project Developers"
];
dependencies = [
{
name = "unic-char-range";
packageId = "unic-char-range";
}
];
};
"unic-char-range" = rec {
crateName = "unic-char-range";
version = "0.9.0";
edition = "2018";
sha256 = "1g0z7iwvjhqspi6194zsff8vy6i3921hpqcrp3v1813hbwnh5603";
libName = "unic_char_range";
authors = [
"The UNIC Project Developers"
];
features = {
"rayon" = [ "dep:rayon" ];
"unstable" = [ "exact-size-is-empty" "fused" "trusted-len" ];
};
resolvedDefaultFeatures = [ "default" ];
};
"unic-common" = rec {
crateName = "unic-common";
version = "0.9.0";
edition = "2018";
sha256 = "1g1mm954m0zr497dl4kx3vr09yaly290zs33bbl4wrbaba1gzmw0";
libName = "unic_common";
authors = [
"The UNIC Project Developers"
];
features = {
};
resolvedDefaultFeatures = [ "default" ];
};
"unic-segment" = rec {
crateName = "unic-segment";
version = "0.9.0";
edition = "2018";
sha256 = "08wgz2q6vrdvmbd23kf9pbg8cyzm5q8hq9spc4blzy2ppqk5vvg4";
libName = "unic_segment";
authors = [
"The UNIC Project Developers"
];
dependencies = [
{
name = "unic-ucd-segment";
packageId = "unic-ucd-segment";
}
];
};
"unic-ucd-segment" = rec {
crateName = "unic-ucd-segment";
version = "0.9.0";
edition = "2018";
sha256 = "0027lczcg0r401g6fnzm2bq9fxhgxvri1nlryhhv8192lqic2y90";
libName = "unic_ucd_segment";
authors = [
"The UNIC Project Developers"
];
dependencies = [
{
name = "unic-char-property";
packageId = "unic-char-property";
}
{
name = "unic-char-range";
packageId = "unic-char-range";
}
{
name = "unic-ucd-version";
packageId = "unic-ucd-version";
}
];
};
"unic-ucd-version" = rec {
crateName = "unic-ucd-version";
version = "0.9.0";
edition = "2018";
sha256 = "1i5hnzpfnxkp4ijfk8kvhpvj84bij575ybqx1b6hyigy6wi2zgcn";
libName = "unic_ucd_version";
authors = [
"The UNIC Project Developers"
];
dependencies = [
{
name = "unic-common";
packageId = "unic-common";
}
];
};
"unicode-bidi" = rec {
crateName = "unicode-bidi";
version = "0.3.15";
edition = "2018";
sha256 = "0xcdxm7h0ydyprwpcbh436rbs6s6lph7f3gr527lzgv6lw053y88";
libName = "unicode_bidi";
authors = [
"The Servo Project Developers"
];
features = {
"default" = [ "std" "hardcoded-data" ];
"flame" = [ "dep:flame" ];
"flame_it" = [ "flame" "flamer" ];
"flamer" = [ "dep:flamer" ];
"serde" = [ "dep:serde" ];
"with_serde" = [ "serde" ];
};
resolvedDefaultFeatures = [ "hardcoded-data" "std" ];
};
"unicode-ident" = rec {
crateName = "unicode-ident";
version = "1.0.12";
edition = "2018";
sha256 = "0jzf1znfpb2gx8nr8mvmyqs1crnv79l57nxnbiszc7xf7ynbjm1k";
libName = "unicode_ident";
authors = [
"David Tolnay "
];
};
"unicode-normalization" = rec {
crateName = "unicode-normalization";
version = "0.1.23";
edition = "2018";
sha256 = "1x81a50h2zxigj74b9bqjsirxxbyhmis54kg600xj213vf31cvd5";
libName = "unicode_normalization";
authors = [
"kwantam "
"Manish Goregaokar "
];
dependencies = [
{
name = "tinyvec";
packageId = "tinyvec";
features = [ "alloc" ];
}
];
features = {
"default" = [ "std" ];
};
resolvedDefaultFeatures = [ "std" ];
};
"unicode-segmentation" = rec {
crateName = "unicode-segmentation";
version = "1.11.0";
edition = "2018";
sha256 = "00kjpwp1g8fqm45drmwivlacn3y9jx73bvs09n6s3x73nqi7vj6l";
libName = "unicode_segmentation";
authors = [
"kwantam "
"Manish Goregaokar "
];
features = {
};
};
"unicode-width" = rec {
crateName = "unicode-width";
version = "0.1.13";
edition = "2021";
sha256 = "0p92vl8n7qc8mxz45xn6qbgi0259z96n32a158l6vj5bywwdadh3";
libName = "unicode_width";
authors = [
"kwantam "
"Manish Goregaokar "
];
features = {
"compiler_builtins" = [ "dep:compiler_builtins" ];
"core" = [ "dep:core" ];
"rustc-dep-of-std" = [ "std" "core" "compiler_builtins" ];
"std" = [ "dep:std" ];
};
resolvedDefaultFeatures = [ "default" ];
};
"url" = rec {
crateName = "url";
version = "2.5.2";
edition = "2018";
sha256 = "0v2dx50mx7xzl9454cl5qmpjnhkbahmn59gd3apyipbgyyylsy12";
authors = [
"The rust-url developers"
];
dependencies = [
{
name = "form_urlencoded";
packageId = "form_urlencoded";
}
{
name = "idna";
packageId = "idna";
}
{
name = "percent-encoding";
packageId = "percent-encoding";
}
{
name = "serde";
packageId = "serde";
optional = true;
features = [ "derive" ];
}
];
devDependencies = [
{
name = "serde";
packageId = "serde";
features = [ "derive" ];
}
];
features = {
"serde" = [ "dep:serde" ];
};
resolvedDefaultFeatures = [ "default" "serde" ];
};
"vec_map" = rec {
crateName = "vec_map";
version = "0.8.2";
edition = "2015";
sha256 = "1481w9g1dw9rxp3l6snkdqihzyrd2f8vispzqmwjwsdyhw8xzggi";
authors = [
"Alex Crichton "
"Jorge Aparicio "
"Alexis Beingessner "
"Brian Anderson <>"
"tbu- <>"
"Manish Goregaokar <>"
"Aaron Turon "
"Adolfo Ochagavía <>"
"Niko Matsakis <>"
"Steven Fackler <>"
"Chase Southwood "
"Eduard Burtescu <>"
"Florian Wilkens <>"
"Félix Raimundo <>"
"Tibor Benke <>"
"Markus Siemens "
"Josh Branchaud "
"Huon Wilson "
"Corey Farwell "
"Aaron Liblong <>"
"Nick Cameron "
"Patrick Walton "
"Felix S Klock II <>"
"Andrew Paseltiner "
"Sean McArthur "
"Vadim Petrochenkov <>"
];
features = {
"eders" = [ "serde" ];
"serde" = [ "dep:serde" ];
};
};
"version_check" = rec {
crateName = "version_check";
version = "0.9.4";
edition = "2015";
sha256 = "0gs8grwdlgh0xq660d7wr80x14vxbizmd8dbp29p2pdncx8lp1s9";
authors = [
"Sergio Benitez "
];
};
"walkdir" = rec {
crateName = "walkdir";
version = "2.5.0";
edition = "2018";
sha256 = "0jsy7a710qv8gld5957ybrnc07gavppp963gs32xk4ag8130jy99";
authors = [
"Andrew Gallant "
];
dependencies = [
{
name = "same-file";
packageId = "same-file";
}
{
name = "winapi-util";
packageId = "winapi-util";
target = { target, features }: (target."windows" or false);
}
];
};
"winapi" = rec {
crateName = "winapi";
version = "0.3.9";
edition = "2015";
sha256 = "06gl025x418lchw1wxj64ycr7gha83m44cjr5sarhynd9xkrm0sw";
authors = [
"Peter Atashian "
];
dependencies = [
{
name = "winapi-i686-pc-windows-gnu";
packageId = "winapi-i686-pc-windows-gnu";
target = { target, features }: (target.name == "i686-pc-windows-gnu");
}
{
name = "winapi-x86_64-pc-windows-gnu";
packageId = "winapi-x86_64-pc-windows-gnu";
target = { target, features }: (target.name == "x86_64-pc-windows-gnu");
}
];
features = {
"debug" = [ "impl-debug" ];
};
resolvedDefaultFeatures = [ "consoleapi" "errhandlingapi" "fileapi" "handleapi" "minwinbase" "minwindef" "ntsecapi" "processenv" "profileapi" "std" "winbase" "winerror" "winnt" ];
};
"winapi-i686-pc-windows-gnu" = rec {
crateName = "winapi-i686-pc-windows-gnu";
version = "0.4.0";
edition = "2015";
sha256 = "1dmpa6mvcvzz16zg6d5vrfy4bxgg541wxrcip7cnshi06v38ffxc";
libName = "winapi_i686_pc_windows_gnu";
authors = [
"Peter Atashian "
];
};
"winapi-util" = rec {
crateName = "winapi-util";
version = "0.1.8";
edition = "2021";
sha256 = "0svcgddd2rw06mj4r76gj655qsa1ikgz3d3gzax96fz7w62c6k2d";
libName = "winapi_util";
authors = [
"Andrew Gallant "
];
dependencies = [
{
name = "windows-sys";
packageId = "windows-sys";
target = { target, features }: (target."windows" or false);
features = [ "Win32_Foundation" "Win32_Storage_FileSystem" "Win32_System_Console" "Win32_System_SystemInformation" ];
}
];
};
"winapi-x86_64-pc-windows-gnu" = rec {
crateName = "winapi-x86_64-pc-windows-gnu";
version = "0.4.0";
edition = "2015";
sha256 = "0gqq64czqb64kskjryj8isp62m2sgvx25yyj3kpc2myh85w24bki";
libName = "winapi_x86_64_pc_windows_gnu";
authors = [
"Peter Atashian "
];
};
"windows-sys" = rec {
crateName = "windows-sys";
version = "0.52.0";
edition = "2021";
sha256 = "0gd3v4ji88490zgb6b5mq5zgbvwv7zx1ibn8v3x83rwcdbryaar8";
libName = "windows_sys";
authors = [
"Microsoft"
];
dependencies = [
{
name = "windows-targets";
packageId = "windows-targets";
}
];
features = {
"Wdk_Foundation" = [ "Wdk" ];
"Wdk_Graphics" = [ "Wdk" ];
"Wdk_Graphics_Direct3D" = [ "Wdk_Graphics" ];
"Wdk_Storage" = [ "Wdk" ];
"Wdk_Storage_FileSystem" = [ "Wdk_Storage" ];
"Wdk_Storage_FileSystem_Minifilters" = [ "Wdk_Storage_FileSystem" ];
"Wdk_System" = [ "Wdk" ];
"Wdk_System_IO" = [ "Wdk_System" ];
"Wdk_System_OfflineRegistry" = [ "Wdk_System" ];
"Wdk_System_Registry" = [ "Wdk_System" ];
"Wdk_System_SystemInformation" = [ "Wdk_System" ];
"Wdk_System_SystemServices" = [ "Wdk_System" ];
"Wdk_System_Threading" = [ "Wdk_System" ];
"Win32_Data" = [ "Win32" ];
"Win32_Data_HtmlHelp" = [ "Win32_Data" ];
"Win32_Data_RightsManagement" = [ "Win32_Data" ];
"Win32_Devices" = [ "Win32" ];
"Win32_Devices_AllJoyn" = [ "Win32_Devices" ];
"Win32_Devices_BiometricFramework" = [ "Win32_Devices" ];
"Win32_Devices_Bluetooth" = [ "Win32_Devices" ];
"Win32_Devices_Communication" = [ "Win32_Devices" ];
"Win32_Devices_DeviceAndDriverInstallation" = [ "Win32_Devices" ];
"Win32_Devices_DeviceQuery" = [ "Win32_Devices" ];
"Win32_Devices_Display" = [ "Win32_Devices" ];
"Win32_Devices_Enumeration" = [ "Win32_Devices" ];
"Win32_Devices_Enumeration_Pnp" = [ "Win32_Devices_Enumeration" ];
"Win32_Devices_Fax" = [ "Win32_Devices" ];
"Win32_Devices_HumanInterfaceDevice" = [ "Win32_Devices" ];
"Win32_Devices_PortableDevices" = [ "Win32_Devices" ];
"Win32_Devices_Properties" = [ "Win32_Devices" ];
"Win32_Devices_Pwm" = [ "Win32_Devices" ];
"Win32_Devices_Sensors" = [ "Win32_Devices" ];
"Win32_Devices_SerialCommunication" = [ "Win32_Devices" ];
"Win32_Devices_Tapi" = [ "Win32_Devices" ];
"Win32_Devices_Usb" = [ "Win32_Devices" ];
"Win32_Devices_WebServicesOnDevices" = [ "Win32_Devices" ];
"Win32_Foundation" = [ "Win32" ];
"Win32_Gaming" = [ "Win32" ];
"Win32_Globalization" = [ "Win32" ];
"Win32_Graphics" = [ "Win32" ];
"Win32_Graphics_Dwm" = [ "Win32_Graphics" ];
"Win32_Graphics_Gdi" = [ "Win32_Graphics" ];
"Win32_Graphics_GdiPlus" = [ "Win32_Graphics" ];
"Win32_Graphics_Hlsl" = [ "Win32_Graphics" ];
"Win32_Graphics_OpenGL" = [ "Win32_Graphics" ];
"Win32_Graphics_Printing" = [ "Win32_Graphics" ];
"Win32_Graphics_Printing_PrintTicket" = [ "Win32_Graphics_Printing" ];
"Win32_Management" = [ "Win32" ];
"Win32_Management_MobileDeviceManagementRegistration" = [ "Win32_Management" ];
"Win32_Media" = [ "Win32" ];
"Win32_Media_Audio" = [ "Win32_Media" ];
"Win32_Media_DxMediaObjects" = [ "Win32_Media" ];
"Win32_Media_KernelStreaming" = [ "Win32_Media" ];
"Win32_Media_Multimedia" = [ "Win32_Media" ];
"Win32_Media_Streaming" = [ "Win32_Media" ];
"Win32_Media_WindowsMediaFormat" = [ "Win32_Media" ];
"Win32_NetworkManagement" = [ "Win32" ];
"Win32_NetworkManagement_Dhcp" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_Dns" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_InternetConnectionWizard" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_IpHelper" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_Multicast" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_Ndis" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_NetBios" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_NetManagement" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_NetShell" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_NetworkDiagnosticsFramework" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_P2P" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_QoS" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_Rras" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_Snmp" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_WNet" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_WebDav" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_WiFi" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_WindowsConnectionManager" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_WindowsFilteringPlatform" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_WindowsFirewall" = [ "Win32_NetworkManagement" ];
"Win32_NetworkManagement_WindowsNetworkVirtualization" = [ "Win32_NetworkManagement" ];
"Win32_Networking" = [ "Win32" ];
"Win32_Networking_ActiveDirectory" = [ "Win32_Networking" ];
"Win32_Networking_Clustering" = [ "Win32_Networking" ];
"Win32_Networking_HttpServer" = [ "Win32_Networking" ];
"Win32_Networking_Ldap" = [ "Win32_Networking" ];
"Win32_Networking_WebSocket" = [ "Win32_Networking" ];
"Win32_Networking_WinHttp" = [ "Win32_Networking" ];
"Win32_Networking_WinInet" = [ "Win32_Networking" ];
"Win32_Networking_WinSock" = [ "Win32_Networking" ];
"Win32_Networking_WindowsWebServices" = [ "Win32_Networking" ];
"Win32_Security" = [ "Win32" ];
"Win32_Security_AppLocker" = [ "Win32_Security" ];
"Win32_Security_Authentication" = [ "Win32_Security" ];
"Win32_Security_Authentication_Identity" = [ "Win32_Security_Authentication" ];
"Win32_Security_Authorization" = [ "Win32_Security" ];
"Win32_Security_Credentials" = [ "Win32_Security" ];
"Win32_Security_Cryptography" = [ "Win32_Security" ];
"Win32_Security_Cryptography_Catalog" = [ "Win32_Security_Cryptography" ];
"Win32_Security_Cryptography_Certificates" = [ "Win32_Security_Cryptography" ];
"Win32_Security_Cryptography_Sip" = [ "Win32_Security_Cryptography" ];
"Win32_Security_Cryptography_UI" = [ "Win32_Security_Cryptography" ];
"Win32_Security_DiagnosticDataQuery" = [ "Win32_Security" ];
"Win32_Security_DirectoryServices" = [ "Win32_Security" ];
"Win32_Security_EnterpriseData" = [ "Win32_Security" ];
"Win32_Security_ExtensibleAuthenticationProtocol" = [ "Win32_Security" ];
"Win32_Security_Isolation" = [ "Win32_Security" ];
"Win32_Security_LicenseProtection" = [ "Win32_Security" ];
"Win32_Security_NetworkAccessProtection" = [ "Win32_Security" ];
"Win32_Security_WinTrust" = [ "Win32_Security" ];
"Win32_Security_WinWlx" = [ "Win32_Security" ];
"Win32_Storage" = [ "Win32" ];
"Win32_Storage_Cabinets" = [ "Win32_Storage" ];
"Win32_Storage_CloudFilters" = [ "Win32_Storage" ];
"Win32_Storage_Compression" = [ "Win32_Storage" ];
"Win32_Storage_DistributedFileSystem" = [ "Win32_Storage" ];
"Win32_Storage_FileHistory" = [ "Win32_Storage" ];
"Win32_Storage_FileSystem" = [ "Win32_Storage" ];
"Win32_Storage_Imapi" = [ "Win32_Storage" ];
"Win32_Storage_IndexServer" = [ "Win32_Storage" ];
"Win32_Storage_InstallableFileSystems" = [ "Win32_Storage" ];
"Win32_Storage_IscsiDisc" = [ "Win32_Storage" ];
"Win32_Storage_Jet" = [ "Win32_Storage" ];
"Win32_Storage_Nvme" = [ "Win32_Storage" ];
"Win32_Storage_OfflineFiles" = [ "Win32_Storage" ];
"Win32_Storage_OperationRecorder" = [ "Win32_Storage" ];
"Win32_Storage_Packaging" = [ "Win32_Storage" ];
"Win32_Storage_Packaging_Appx" = [ "Win32_Storage_Packaging" ];
"Win32_Storage_ProjectedFileSystem" = [ "Win32_Storage" ];
"Win32_Storage_StructuredStorage" = [ "Win32_Storage" ];
"Win32_Storage_Vhd" = [ "Win32_Storage" ];
"Win32_Storage_Xps" = [ "Win32_Storage" ];
"Win32_System" = [ "Win32" ];
"Win32_System_AddressBook" = [ "Win32_System" ];
"Win32_System_Antimalware" = [ "Win32_System" ];
"Win32_System_ApplicationInstallationAndServicing" = [ "Win32_System" ];
"Win32_System_ApplicationVerifier" = [ "Win32_System" ];
"Win32_System_ClrHosting" = [ "Win32_System" ];
"Win32_System_Com" = [ "Win32_System" ];
"Win32_System_Com_Marshal" = [ "Win32_System_Com" ];
"Win32_System_Com_StructuredStorage" = [ "Win32_System_Com" ];
"Win32_System_Com_Urlmon" = [ "Win32_System_Com" ];
"Win32_System_ComponentServices" = [ "Win32_System" ];
"Win32_System_Console" = [ "Win32_System" ];
"Win32_System_CorrelationVector" = [ "Win32_System" ];
"Win32_System_DataExchange" = [ "Win32_System" ];
"Win32_System_DeploymentServices" = [ "Win32_System" ];
"Win32_System_DeveloperLicensing" = [ "Win32_System" ];
"Win32_System_Diagnostics" = [ "Win32_System" ];
"Win32_System_Diagnostics_Ceip" = [ "Win32_System_Diagnostics" ];
"Win32_System_Diagnostics_Debug" = [ "Win32_System_Diagnostics" ];
"Win32_System_Diagnostics_Debug_Extensions" = [ "Win32_System_Diagnostics_Debug" ];
"Win32_System_Diagnostics_Etw" = [ "Win32_System_Diagnostics" ];
"Win32_System_Diagnostics_ProcessSnapshotting" = [ "Win32_System_Diagnostics" ];
"Win32_System_Diagnostics_ToolHelp" = [ "Win32_System_Diagnostics" ];
"Win32_System_DistributedTransactionCoordinator" = [ "Win32_System" ];
"Win32_System_Environment" = [ "Win32_System" ];
"Win32_System_ErrorReporting" = [ "Win32_System" ];
"Win32_System_EventCollector" = [ "Win32_System" ];
"Win32_System_EventLog" = [ "Win32_System" ];
"Win32_System_EventNotificationService" = [ "Win32_System" ];
"Win32_System_GroupPolicy" = [ "Win32_System" ];
"Win32_System_HostCompute" = [ "Win32_System" ];
"Win32_System_HostComputeNetwork" = [ "Win32_System" ];
"Win32_System_HostComputeSystem" = [ "Win32_System" ];
"Win32_System_Hypervisor" = [ "Win32_System" ];
"Win32_System_IO" = [ "Win32_System" ];
"Win32_System_Iis" = [ "Win32_System" ];
"Win32_System_Ioctl" = [ "Win32_System" ];
"Win32_System_JobObjects" = [ "Win32_System" ];
"Win32_System_Js" = [ "Win32_System" ];
"Win32_System_Kernel" = [ "Win32_System" ];
"Win32_System_LibraryLoader" = [ "Win32_System" ];
"Win32_System_Mailslots" = [ "Win32_System" ];
"Win32_System_Mapi" = [ "Win32_System" ];
"Win32_System_Memory" = [ "Win32_System" ];
"Win32_System_Memory_NonVolatile" = [ "Win32_System_Memory" ];
"Win32_System_MessageQueuing" = [ "Win32_System" ];
"Win32_System_MixedReality" = [ "Win32_System" ];
"Win32_System_Ole" = [ "Win32_System" ];
"Win32_System_PasswordManagement" = [ "Win32_System" ];
"Win32_System_Performance" = [ "Win32_System" ];
"Win32_System_Performance_HardwareCounterProfiling" = [ "Win32_System_Performance" ];
"Win32_System_Pipes" = [ "Win32_System" ];
"Win32_System_Power" = [ "Win32_System" ];
"Win32_System_ProcessStatus" = [ "Win32_System" ];
"Win32_System_Recovery" = [ "Win32_System" ];
"Win32_System_Registry" = [ "Win32_System" ];
"Win32_System_RemoteDesktop" = [ "Win32_System" ];
"Win32_System_RemoteManagement" = [ "Win32_System" ];
"Win32_System_RestartManager" = [ "Win32_System" ];
"Win32_System_Restore" = [ "Win32_System" ];
"Win32_System_Rpc" = [ "Win32_System" ];
"Win32_System_Search" = [ "Win32_System" ];
"Win32_System_Search_Common" = [ "Win32_System_Search" ];
"Win32_System_SecurityCenter" = [ "Win32_System" ];
"Win32_System_Services" = [ "Win32_System" ];
"Win32_System_SetupAndMigration" = [ "Win32_System" ];
"Win32_System_Shutdown" = [ "Win32_System" ];
"Win32_System_StationsAndDesktops" = [ "Win32_System" ];
"Win32_System_SubsystemForLinux" = [ "Win32_System" ];
"Win32_System_SystemInformation" = [ "Win32_System" ];
"Win32_System_SystemServices" = [ "Win32_System" ];
"Win32_System_Threading" = [ "Win32_System" ];
"Win32_System_Time" = [ "Win32_System" ];
"Win32_System_TpmBaseServices" = [ "Win32_System" ];
"Win32_System_UserAccessLogging" = [ "Win32_System" ];
"Win32_System_Variant" = [ "Win32_System" ];
"Win32_System_VirtualDosMachines" = [ "Win32_System" ];
"Win32_System_WindowsProgramming" = [ "Win32_System" ];
"Win32_System_Wmi" = [ "Win32_System" ];
"Win32_UI" = [ "Win32" ];
"Win32_UI_Accessibility" = [ "Win32_UI" ];
"Win32_UI_ColorSystem" = [ "Win32_UI" ];
"Win32_UI_Controls" = [ "Win32_UI" ];
"Win32_UI_Controls_Dialogs" = [ "Win32_UI_Controls" ];
"Win32_UI_HiDpi" = [ "Win32_UI" ];
"Win32_UI_Input" = [ "Win32_UI" ];
"Win32_UI_Input_Ime" = [ "Win32_UI_Input" ];
"Win32_UI_Input_KeyboardAndMouse" = [ "Win32_UI_Input" ];
"Win32_UI_Input_Pointer" = [ "Win32_UI_Input" ];
"Win32_UI_Input_Touch" = [ "Win32_UI_Input" ];
"Win32_UI_Input_XboxController" = [ "Win32_UI_Input" ];
"Win32_UI_InteractionContext" = [ "Win32_UI" ];
"Win32_UI_Magnification" = [ "Win32_UI" ];
"Win32_UI_Shell" = [ "Win32_UI" ];
"Win32_UI_Shell_PropertiesSystem" = [ "Win32_UI_Shell" ];
"Win32_UI_TabletPC" = [ "Win32_UI" ];
"Win32_UI_TextServices" = [ "Win32_UI" ];
"Win32_UI_WindowsAndMessaging" = [ "Win32_UI" ];
"Win32_Web" = [ "Win32" ];
"Win32_Web_InternetExplorer" = [ "Win32_Web" ];
};
resolvedDefaultFeatures = [ "Win32" "Win32_Foundation" "Win32_Storage" "Win32_Storage_FileSystem" "Win32_System" "Win32_System_Console" "Win32_System_SystemInformation" "default" ];
};
"windows-targets" = rec {
crateName = "windows-targets";
version = "0.52.5";
edition = "2021";
sha256 = "1sz7jrnkygmmlj1ia8fk85wbyil450kq5qkh5qh9sh2rcnj161vg";
libName = "windows_targets";
authors = [
"Microsoft"
];
dependencies = [
{
name = "windows_aarch64_gnullvm";
packageId = "windows_aarch64_gnullvm";
target = { target, features }: (target.name == "aarch64-pc-windows-gnullvm");
}
{
name = "windows_aarch64_msvc";
packageId = "windows_aarch64_msvc";
target = { target, features }: (("aarch64" == target."arch" or null) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
}
{
name = "windows_i686_gnu";
packageId = "windows_i686_gnu";
target = { target, features }: (("x86" == target."arch" or null) && ("gnu" == target."env" or null) && (!("llvm" == target."abi" or null)) && (!(target."windows_raw_dylib" or false)));
}
{
name = "windows_i686_gnullvm";
packageId = "windows_i686_gnullvm";
target = { target, features }: (target.name == "i686-pc-windows-gnullvm");
}
{
name = "windows_i686_msvc";
packageId = "windows_i686_msvc";
target = { target, features }: (("x86" == target."arch" or null) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
}
{
name = "windows_x86_64_gnu";
packageId = "windows_x86_64_gnu";
target = { target, features }: (("x86_64" == target."arch" or null) && ("gnu" == target."env" or null) && (!("llvm" == target."abi" or null)) && (!(target."windows_raw_dylib" or false)));
}
{
name = "windows_x86_64_gnullvm";
packageId = "windows_x86_64_gnullvm";
target = { target, features }: (target.name == "x86_64-pc-windows-gnullvm");
}
{
name = "windows_x86_64_msvc";
packageId = "windows_x86_64_msvc";
target = { target, features }: ((("x86_64" == target."arch" or null) || ("arm64ec" == target."arch" or null)) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
}
];
};
"windows_aarch64_gnullvm" = rec {
crateName = "windows_aarch64_gnullvm";
version = "0.52.5";
edition = "2021";
sha256 = "0qrjimbj67nnyn7zqy15mzzmqg0mn5gsr2yciqjxm3cb3vbyx23h";
authors = [
"Microsoft"
];
};
"windows_aarch64_msvc" = rec {
crateName = "windows_aarch64_msvc";
version = "0.52.5";
edition = "2021";
sha256 = "1dmga8kqlmln2ibckk6mxc9n59vdg8ziqa2zr8awcl720hazv1cr";
authors = [
"Microsoft"
];
};
"windows_i686_gnu" = rec {
crateName = "windows_i686_gnu";
version = "0.52.5";
edition = "2021";
sha256 = "0w4np3l6qwlra9s2xpflqrs60qk1pz6ahhn91rr74lvdy4y0gfl8";
authors = [
"Microsoft"
];
};
"windows_i686_gnullvm" = rec {
crateName = "windows_i686_gnullvm";
version = "0.52.5";
edition = "2021";
sha256 = "1s9f4gff0cixd86mw3n63rpmsm4pmr4ffndl6s7qa2h35492dx47";
authors = [
"Microsoft"
];
};
"windows_i686_msvc" = rec {
crateName = "windows_i686_msvc";
version = "0.52.5";
edition = "2021";
sha256 = "1gw7fklxywgpnwbwg43alb4hm0qjmx72hqrlwy5nanrxs7rjng6v";
authors = [
"Microsoft"
];
};
"windows_x86_64_gnu" = rec {
crateName = "windows_x86_64_gnu";
version = "0.52.5";
edition = "2021";
sha256 = "1n8p2mcf3lw6300k77a0knksssmgwb9hynl793mhkzyydgvlchjf";
authors = [
"Microsoft"
];
};
"windows_x86_64_gnullvm" = rec {
crateName = "windows_x86_64_gnullvm";
version = "0.52.5";
edition = "2021";
sha256 = "15n56jrh4s5bz66zimavr1rmcaw6wa306myrvmbc6rydhbj9h8l5";
authors = [
"Microsoft"
];
};
"windows_x86_64_msvc" = rec {
crateName = "windows_x86_64_msvc";
version = "0.52.5";
edition = "2021";
sha256 = "1w1bn24ap8dp9i85s8mlg8cim2bl2368bd6qyvm0xzqvzmdpxi5y";
authors = [
"Microsoft"
];
};
"winnow" = rec {
crateName = "winnow";
version = "0.6.13";
edition = "2021";
sha256 = "189b0mrr9lkckdyr0177hwj1c59igxc2lsl71f4wg8wrqbvfbdar";
dependencies = [
{
name = "memchr";
packageId = "memchr";
optional = true;
usesDefaultFeatures = false;
}
];
features = {
"debug" = [ "std" "dep:anstream" "dep:anstyle" "dep:is-terminal" "dep:terminal_size" ];
"default" = [ "std" ];
"simd" = [ "dep:memchr" ];
"std" = [ "alloc" "memchr?/std" ];
"unstable-doc" = [ "alloc" "std" "simd" "unstable-recover" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "std" ];
};
};
#
# crate2nix/default.nix (excerpt start)
#
/*
Target (platform) data for conditional dependencies.
This corresponds roughly to what buildRustCrate is setting.
*/
makeDefaultTarget = platform: {
name = platform.rust.rustcTarget;
unix = platform.isUnix;
windows = platform.isWindows;
fuchsia = true;
test = false;
inherit (platform.rust.platform)
arch
os
vendor
;
family = platform.rust.platform.target-family;
env = "gnu";
endian = if platform.parsed.cpu.significantByte.name == "littleEndian" then "little" else "big";
pointer_width = toString platform.parsed.cpu.bits;
debug_assertions = false;
} // extraTargetFlags;
registryUrl =
{ registries
, url
, crate
, version
, sha256
,
}:
let
dl = registries.${url}.dl;
tmpl = [
"{crate}"
"{version}"
"{prefix}"
"{lowerprefix}"
"{sha256-checksum}"
];
in
with lib.strings;
if lib.lists.any (i: hasInfix "{}" dl) tmpl then
let
prefix =
if builtins.stringLength crate == 1 then
"1"
else if builtins.stringLength crate == 2 then
"2"
else
"${builtins.substring 0 2 crate}/${builtins.substring 2 (builtins.stringLength crate - 2) crate}";
in
builtins.replaceStrings tmpl [
crate
version
prefix
(lib.strings.toLower prefix)
sha256
]
else
"${dl}/${crate}/${version}/download";
# Filters common temp files and build files.
# TODO(pkolloch): Substitute with gitignore filter
sourceFilter =
name: type:
let
baseName = builtins.baseNameOf (builtins.toString name);
in
!(
# Filter out git
baseName == ".gitignore"
|| (type == "directory" && baseName == ".git")
# Filter out build results
|| (
type == "directory"
&& (
baseName == "target"
|| baseName == "_site"
|| baseName == ".sass-cache"
|| baseName == ".jekyll-metadata"
|| baseName == "build-artifacts"
)
)
# Filter out nix-build result symlinks
|| (type == "symlink" && lib.hasPrefix "result" baseName)
# Filter out IDE config
|| (type == "directory" && (baseName == ".idea" || baseName == ".vscode"))
|| lib.hasSuffix ".iml" baseName
# Filter out nix build files
|| baseName == "Cargo.nix"
# Filter out editor backup / swap files.
|| lib.hasSuffix "~" baseName
|| builtins.match "^\\.sw[a-z]$$" baseName != null
|| builtins.match "^\\..*\\.sw[a-z]$$" baseName != null
|| lib.hasSuffix ".tmp" baseName
|| lib.hasSuffix ".bak" baseName
|| baseName == "tests.nix"
);
/*
Returns a crate which depends on successful test execution
of crate given as the second argument.
testCrateFlags: list of flags to pass to the test exectuable
testInputs: list of packages that should be available during test execution
*/
crateWithTest =
{ crate
, testCrate
, testCrateFlags
, testInputs
, testPreRun
, testPostRun
,
}:
assert builtins.typeOf testCrateFlags == "list";
assert builtins.typeOf testInputs == "list";
assert builtins.typeOf testPreRun == "string";
assert builtins.typeOf testPostRun == "string";
let
# override the `crate` so that it will build and execute tests instead of
# building the actual lib and bin targets We just have to pass `--test`
# to rustc and it will do the right thing. We execute the tests and copy
# their log and the test executables to $out for later inspection.
test =
let
drv = testCrate.override (_: {
buildTests = true;
});
# If the user hasn't set any pre/post commands, we don't want to
# insert empty lines. This means that any existing users of crate2nix
# don't get a spurious rebuild unless they set these explicitly.
testCommand = pkgs.lib.concatStringsSep "\n" (
pkgs.lib.filter (s: s != "") [
testPreRun
"$f $testCrateFlags 2>&1 | tee -a $out"
testPostRun
]
);
in
pkgs.stdenvNoCC.mkDerivation {
name = "run-tests-${testCrate.name}";
inherit (crate) src;
inherit testCrateFlags;
buildInputs = testInputs;
buildPhase = ''
set -e
export RUST_BACKTRACE=1
# build outputs
testRoot=target/debug
mkdir -p $testRoot
# executables of the crate
# we copy to prevent std::env::current_exe() to resolve to a store location
for i in ${crate}/bin/*; do
cp "$i" "$testRoot"
done
chmod +w -R .
# test harness executables are suffixed with a hash, like cargo does
# this allows to prevent name collision with the main
# executables of the crate
hash=$(basename $out)
for file in ${drv}/tests/*; do
f=$testRoot/$(basename $file)-$hash
cp $file $f
${testCommand}
done
'';
};
in
pkgs.runCommand "${crate.name}-linked"
{
inherit (crate) outputs crateName meta;
passthru = (crate.passthru or { }) // {
inherit test;
};
}
(
lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
echo tested by ${test}
''
+ ''
${lib.concatMapStringsSep "\n" (output: "ln -s ${crate.${output}} ${"$"}${output}") crate.outputs}
''
);
# A restricted overridable version of builtRustCratesWithFeatures.
buildRustCrateWithFeatures =
{ packageId
, features ? rootFeatures
, crateOverrides ? defaultCrateOverrides
, buildRustCrateForPkgsFunc ? null
, runTests ? false
, testCrateFlags ? [ ]
, testInputs ? [ ]
, # Any command to run immediatelly before a test is executed.
testPreRun ? ""
, # Any command run immediatelly after a test is executed.
testPostRun ? ""
,
}:
lib.makeOverridable
(
{ features
, crateOverrides
, runTests
, testCrateFlags
, testInputs
, testPreRun
, testPostRun
,
}:
let
buildRustCrateForPkgsFuncOverriden =
if buildRustCrateForPkgsFunc != null then
buildRustCrateForPkgsFunc
else
(
if crateOverrides == pkgs.defaultCrateOverrides then
buildRustCrateForPkgs
else
pkgs:
(buildRustCrateForPkgs pkgs).override {
defaultCrateOverrides = crateOverrides;
}
);
builtRustCrates = builtRustCratesWithFeatures {
inherit packageId features;
buildRustCrateForPkgsFunc = buildRustCrateForPkgsFuncOverriden;
runTests = false;
};
builtTestRustCrates = builtRustCratesWithFeatures {
inherit packageId features;
buildRustCrateForPkgsFunc = buildRustCrateForPkgsFuncOverriden;
runTests = true;
};
drv = builtRustCrates.crates.${packageId};
testDrv = builtTestRustCrates.crates.${packageId};
derivation =
if runTests then
crateWithTest
{
crate = drv;
testCrate = testDrv;
inherit
testCrateFlags
testInputs
testPreRun
testPostRun
;
}
else
drv;
in
derivation
)
{
inherit
features
crateOverrides
runTests
testCrateFlags
testInputs
testPreRun
testPostRun
;
};
/*
Returns an attr set with packageId mapped to the result of buildRustCrateForPkgsFunc
for the corresponding crate.
*/
builtRustCratesWithFeatures =
{ packageId
, features
, crateConfigs ? crates
, buildRustCrateForPkgsFunc
, runTests
, makeTarget ? makeDefaultTarget
,
}@args:
assert (builtins.isAttrs crateConfigs);
assert (builtins.isString packageId);
assert (builtins.isList features);
assert (builtins.isAttrs (makeTarget stdenv.hostPlatform));
assert (builtins.isBool runTests);
let
rootPackageId = packageId;
mergedFeatures = mergePackageFeatures (
args
// {
inherit rootPackageId;
target = makeTarget stdenv.hostPlatform // {
test = runTests;
};
}
);
# Memoize built packages so that reappearing packages are only built once.
builtByPackageIdByPkgs = mkBuiltByPackageIdByPkgs pkgs;
mkBuiltByPackageIdByPkgs =
pkgs:
let
self = {
crates = lib.mapAttrs
(
packageId: value: buildByPackageIdForPkgsImpl self pkgs packageId
)
crateConfigs;
target = makeTarget pkgs.stdenv.hostPlatform;
build = mkBuiltByPackageIdByPkgs pkgs.buildPackages;
};
in
self;
buildByPackageIdForPkgsImpl =
self: pkgs: packageId:
let
features = mergedFeatures."${packageId}" or [ ];
crateConfig' = crateConfigs."${packageId}";
crateConfig = builtins.removeAttrs crateConfig' [
"resolvedDefaultFeatures"
"devDependencies"
];
devDependencies = lib.optionals (runTests && packageId == rootPackageId) (
crateConfig'.devDependencies or [ ]
);
dependencies = dependencyDerivations {
inherit features;
inherit (self) target;
buildByPackageId =
depPackageId:
# proc_macro crates must be compiled for the build architecture
if crateConfigs.${depPackageId}.procMacro or false then
self.build.crates.${depPackageId}
else
self.crates.${depPackageId};
dependencies = (crateConfig.dependencies or [ ]) ++ devDependencies;
};
buildDependencies = dependencyDerivations {
inherit features;
inherit (self.build) target;
buildByPackageId = depPackageId: self.build.crates.${depPackageId};
dependencies = crateConfig.buildDependencies or [ ];
};
dependenciesWithRenames =
let
buildDeps = filterEnabledDependencies {
inherit features;
inherit (self) target;
dependencies = crateConfig.dependencies or [ ] ++ devDependencies;
};
hostDeps = filterEnabledDependencies {
inherit features;
inherit (self.build) target;
dependencies = crateConfig.buildDependencies or [ ];
};
in
lib.filter (d: d ? "rename") (hostDeps ++ buildDeps);
# Crate renames have the form:
#
# {
# crate_name = [
# { version = "1.2.3"; rename = "crate_name01"; }
# ];
# # ...
# }
crateRenames =
let
grouped = lib.groupBy (dependency: dependency.name) dependenciesWithRenames;
versionAndRename =
dep:
let
package = crateConfigs."${dep.packageId}";
in
{
inherit (dep) rename;
inherit (package) version;
};
in
lib.mapAttrs (name: builtins.map versionAndRename) grouped;
in
buildRustCrateForPkgsFunc pkgs (
crateConfig
// {
src =
crateConfig.src or (fetchurl rec {
name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz";
# https://www.pietroalbini.org/blog/downloading-crates-io/
# Not rate-limited, CDN URL.
url = "https://static.crates.io/crates/${crateConfig.crateName}/${crateConfig.crateName}-${crateConfig.version}.crate";
sha256 =
assert (lib.assertMsg (crateConfig ? sha256) "Missing sha256 for ${name}");
crateConfig.sha256;
});
extraRustcOpts =
lib.lists.optional (targetFeatures != [ ])
"-C target-feature=${lib.concatMapStringsSep "," (x: "+${x}") targetFeatures}";
inherit
features
dependencies
buildDependencies
crateRenames
release
;
}
);
in
builtByPackageIdByPkgs;
# Returns the actual derivations for the given dependencies.
dependencyDerivations =
{ buildByPackageId
, features
, dependencies
, target
,
}:
assert (builtins.isList features);
assert (builtins.isList dependencies);
assert (builtins.isAttrs target);
let
enabledDependencies = filterEnabledDependencies {
inherit dependencies features target;
};
depDerivation = dependency: buildByPackageId dependency.packageId;
in
map depDerivation enabledDependencies;
/*
Returns a sanitized version of val with all values substituted that cannot
be serialized as JSON.
*/
sanitizeForJson =
val:
if builtins.isAttrs val then
lib.mapAttrs (n: sanitizeForJson) val
else if builtins.isList val then
builtins.map sanitizeForJson val
else if builtins.isFunction val then
"function"
else
val;
# Returns various tools to debug a crate.
debugCrate =
{ packageId
, target ? makeDefaultTarget stdenv.hostPlatform
,
}:
assert (builtins.isString packageId);
let
debug = rec {
# The built tree as passed to buildRustCrate.
buildTree = buildRustCrateWithFeatures {
buildRustCrateForPkgsFunc = _: lib.id;
inherit packageId;
};
sanitizedBuildTree = sanitizeForJson buildTree;
dependencyTree = sanitizeForJson (buildRustCrateWithFeatures {
buildRustCrateForPkgsFunc = _: crate: {
"01_crateName" = crate.crateName or false;
"02_features" = crate.features or [ ];
"03_dependencies" = crate.dependencies or [ ];
};
inherit packageId;
});
mergedPackageFeatures = mergePackageFeatures {
features = rootFeatures;
inherit packageId target;
};
diffedDefaultPackageFeatures = diffDefaultPackageFeatures {
inherit packageId target;
};
};
in
{
internal = debug;
};
/*
Returns differences between cargo default features and crate2nix default
features.
This is useful for verifying the feature resolution in crate2nix.
*/
diffDefaultPackageFeatures =
{ crateConfigs ? crates
, packageId
, target
,
}:
assert (builtins.isAttrs crateConfigs);
let
prefixValues = prefix: lib.mapAttrs (n: v: { "${prefix}" = v; });
mergedFeatures = prefixValues "crate2nix" (mergePackageFeatures {
inherit crateConfigs packageId target;
features = [ "default" ];
});
configs = prefixValues "cargo" crateConfigs;
combined = lib.foldAttrs (a: b: a // b) { } [
mergedFeatures
configs
];
onlyInCargo = builtins.attrNames (
lib.filterAttrs (n: v: !(v ? "crate2nix") && (v ? "cargo")) combined
);
onlyInCrate2Nix = builtins.attrNames (
lib.filterAttrs (n: v: (v ? "crate2nix") && !(v ? "cargo")) combined
);
differentFeatures = lib.filterAttrs
(
n: v:
(v ? "crate2nix")
&& (v ? "cargo")
&& (v.crate2nix.features or [ ]) != (v."cargo".resolved_default_features or [ ])
)
combined;
in
builtins.toJSON {
inherit onlyInCargo onlyInCrate2Nix differentFeatures;
};
/*
Returns an attrset mapping packageId to the list of enabled features.
If multiple paths to a dependency enable different features, the
corresponding feature sets are merged. Features in rust are additive.
*/
mergePackageFeatures =
{ crateConfigs ? crates
, packageId
, rootPackageId ? packageId
, features ? rootFeatures
, dependencyPath ? [ crates.${packageId}.crateName ]
, featuresByPackageId ? { }
, target
, # Adds devDependencies to the crate with rootPackageId.
runTests ? false
, ...
}@args:
assert (builtins.isAttrs crateConfigs);
assert (builtins.isString packageId);
assert (builtins.isString rootPackageId);
assert (builtins.isList features);
assert (builtins.isList dependencyPath);
assert (builtins.isAttrs featuresByPackageId);
assert (builtins.isAttrs target);
assert (builtins.isBool runTests);
let
crateConfig = crateConfigs."${packageId}" or (builtins.throw "Package not found: ${packageId}");
expandedFeatures = expandFeatures (crateConfig.features or { }) features;
enabledFeatures = enableFeatures (crateConfig.dependencies or [ ]) expandedFeatures;
depWithResolvedFeatures =
dependency:
let
inherit (dependency) packageId;
features = dependencyFeatures enabledFeatures dependency;
in
{
inherit packageId features;
};
resolveDependencies =
cache: path: dependencies:
assert (builtins.isAttrs cache);
assert (builtins.isList dependencies);
let
enabledDependencies = filterEnabledDependencies {
inherit dependencies target;
features = enabledFeatures;
};
directDependencies = map depWithResolvedFeatures enabledDependencies;
foldOverCache = op: lib.foldl op cache directDependencies;
in
foldOverCache (
cache:
{ packageId, features }:
let
cacheFeatures = cache.${packageId} or [ ];
combinedFeatures = sortedUnique (cacheFeatures ++ features);
in
if cache ? ${packageId} && cache.${packageId} == combinedFeatures then
cache
else
mergePackageFeatures {
features = combinedFeatures;
featuresByPackageId = cache;
inherit
crateConfigs
packageId
target
runTests
rootPackageId
;
}
);
cacheWithSelf =
let
cacheFeatures = featuresByPackageId.${packageId} or [ ];
combinedFeatures = sortedUnique (cacheFeatures ++ enabledFeatures);
in
featuresByPackageId
// {
"${packageId}" = combinedFeatures;
};
cacheWithDependencies = resolveDependencies cacheWithSelf "dep" (
crateConfig.dependencies or [ ]
++ lib.optionals (runTests && packageId == rootPackageId) (crateConfig.devDependencies or [ ])
);
cacheWithAll = resolveDependencies cacheWithDependencies "build" (
crateConfig.buildDependencies or [ ]
);
in
cacheWithAll;
# Returns the enabled dependencies given the enabled features.
filterEnabledDependencies =
{ dependencies
, features
, target
,
}:
assert (builtins.isList dependencies);
assert (builtins.isList features);
assert (builtins.isAttrs target);
lib.filter
(
dep:
let
targetFunc = dep.target or (features: true);
in
targetFunc { inherit features target; }
&& (!(dep.optional or false) || builtins.any (doesFeatureEnableDependency dep) features)
)
dependencies;
# Returns whether the given feature should enable the given dependency.
doesFeatureEnableDependency =
dependency: feature:
let
name = dependency.rename or dependency.name;
prefix = "${name}/";
len = builtins.stringLength prefix;
startsWithPrefix = builtins.substring 0 len feature == prefix;
in
feature == name || feature == "dep:" + name || startsWithPrefix;
/*
Returns the expanded features for the given inputFeatures by applying the
rules in featureMap.
featureMap is an attribute set which maps feature names to lists of further
feature names to enable in case this feature is selected.
*/
expandFeatures =
featureMap: inputFeatures:
assert (builtins.isAttrs featureMap);
assert (builtins.isList inputFeatures);
let
expandFeaturesNoCycle =
oldSeen: inputFeatures:
if inputFeatures != [ ] then
let
# The feature we're currently expanding.
feature = builtins.head inputFeatures;
# All the features we've seen/expanded so far, including the one
# we're currently processing.
seen = oldSeen // {
${feature} = 1;
};
# Expand the feature but be careful to not re-introduce a feature
# that we've already seen: this can easily cause a cycle, see issue
# #209.
enables = builtins.filter (f: !(seen ? "${f}")) (featureMap."${feature}" or [ ]);
in
[ feature ] ++ (expandFeaturesNoCycle seen (builtins.tail inputFeatures ++ enables))
# No more features left, nothing to expand to.
else
[ ];
outFeatures = expandFeaturesNoCycle { } inputFeatures;
in
sortedUnique outFeatures;
/*
This function adds optional dependencies as features if they are enabled
indirectly by dependency features. This function mimics Cargo's behavior
described in a note at:
https://doc.rust-lang.org/nightly/cargo/reference/features.html#dependency-features
*/
enableFeatures =
dependencies: features:
assert (builtins.isList features);
assert (builtins.isList dependencies);
let
additionalFeatures = lib.concatMap
(
dependency:
assert (builtins.isAttrs dependency);
let
enabled = builtins.any (doesFeatureEnableDependency dependency) features;
in
if (dependency.optional or false) && enabled then
[ (dependency.rename or dependency.name) ]
else
[ ]
)
dependencies;
in
sortedUnique (features ++ additionalFeatures);
/*
Returns the actual features for the given dependency.
features: The features of the crate that refers this dependency.
*/
dependencyFeatures =
features: dependency:
assert (builtins.isList features);
assert (builtins.isAttrs dependency);
let
defaultOrNil = if dependency.usesDefaultFeatures or true then [ "default" ] else [ ];
explicitFeatures = dependency.features or [ ];
additionalDependencyFeatures =
let
name = dependency.rename or dependency.name;
stripPrefixMatch = prefix: s: if lib.hasPrefix prefix s then lib.removePrefix prefix s else null;
extractFeature =
feature:
lib.findFirst (f: f != null) null (
map (prefix: stripPrefixMatch prefix feature) [
(name + "/")
(name + "?/")
]
);
dependencyFeatures = lib.filter (f: f != null) (map extractFeature features);
in
dependencyFeatures;
in
defaultOrNil ++ explicitFeatures ++ additionalDependencyFeatures;
# Sorts and removes duplicates from a list of strings.
sortedUnique =
features:
assert (builtins.isList features);
assert (builtins.all builtins.isString features);
let
outFeaturesSet = lib.foldl (set: feature: set // { "${feature}" = 1; }) { } features;
outFeaturesUnique = builtins.attrNames outFeaturesSet;
in
builtins.sort (a: b: a < b) outFeaturesUnique;
deprecationWarning =
message: value:
if strictDeprecation then
builtins.throw "strictDeprecation enabled, aborting: ${message}"
else
builtins.trace message value;
#
# crate2nix/default.nix (excerpt end)
#
};
}
================================================
FILE: crate2nix/Cargo.toml
================================================
[package]
name = "crate2nix"
version = "0.15.0"
authors = ["Peter Kolloch "]
edition = "2021"
license = "Apache-2.0"
description = "crate2nix generates nix (as in NixOS) build files for rust using cargo."
repository = "https://github.com/nix-community/crate2nix"
homepage = "https://nix-community.github.io/crate2nix/"
documentation = "https://nix-community.github.io/crate2nix/"
readme = "../README.md"
keywords = ["nix", "cargo", "build", "ci", "cache"]
resolver = "2"
[dependencies]
anyhow = "1.0.28"
cargo_metadata = "0.18"
cargo-platform = "0.1"
hex = "0.4"
itertools = "0.12"
lazy_static = "1"
nix-base32 = "0.1"
pathdiff = "0.2"
structopt = "0.3"
semver = { version = "1", features = ["serde"] }
serde = { version = "1.0.107", features = ["derive"] }
serde_json = { version = "1.0.59", features = ["unbounded_depth"] }
tera = { version = "1", default-features = false }
toml = "0.8"
url = { version = "2", features = ["serde"] }
[dev-dependencies]
colored-diff = "0.2.2"
fs_extra = "1.1"
tempdir = "0.3"
================================================
FILE: crate2nix/crate-hashes.json
================================================
{}
================================================
FILE: crate2nix/default-json.nix
================================================
# Build crate2nix from the pre-resolved JSON output, dogfooding the JSON path.
{ pkgs ? (
import (builtins.fetchTree (import ../nix/flakeInput.nix "nixpkgs")) { }
)
, stdenv ? pkgs.stdenv
, lib ? pkgs.lib
, symlinkJoin ? pkgs.symlinkJoin
, makeWrapper ? pkgs.makeWrapper
, nix ? pkgs.nix
, cargo ? pkgs.cargo
, libsecret ? pkgs.libsecret
, nix-prefetch-git ? pkgs.nix-prefetch-git
, release ? true
}:
let
cargoNix = import ../lib/build-from-json.nix {
inherit pkgs lib stdenv;
src = ./.;
resolvedJson = ./Cargo.json;
};
in
import ./mk-crate2nix.nix {
inherit pkgs stdenv lib symlinkJoin makeWrapper nix cargo libsecret
nix-prefetch-git release;
rootCrate = cargoNix.rootCrate.build;
}
================================================
FILE: crate2nix/default.nix
================================================
# Provided by callPackage or also directly usable via nix-build with defaults.
{ pkgs ? (
import (builtins.fetchTree (import ../nix/flakeInput.nix "nixpkgs")) { }
)
, stdenv ? pkgs.stdenv
, lib ? pkgs.lib
, symlinkJoin ? pkgs.symlinkJoin
, makeWrapper ? pkgs.makeWrapper
, darwin ? pkgs.darwin
, defaultCrateOverrides ? pkgs.defaultCrateOverrides
, nix ? pkgs.nix
, cargo ? pkgs.cargo
, libsecret ? pkgs.libsecret
, callPackage ? pkgs.callPackage
, nix-prefetch-git ? pkgs.nix-prefetch-git
# Seperate arguements that are NOT filled by callPackage.
, cargoNixPath ? ./Cargo.nix
, release ? true
}:
let
cargoNix = callPackage cargoNixPath { inherit release; };
withoutTemplates = name: type:
let
baseName = builtins.baseNameOf (builtins.toString name);
in
!(baseName == "templates" && type == "directory");
rootCrate = cargoNix.rootCrate.build.override {
testCrateFlags = [
"--skip nix_integration_tests"
];
crateOverrides = defaultCrateOverrides // {
crate2nix = { src, ... }: {
src =
if release
then src
else
lib.cleanSourceWith {
filter = withoutTemplates;
inherit src;
};
dontFixup = !release;
};
cssparser-macros = attrs: assert builtins.trace "cssparser" true;{
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
};
};
};
in
import ./mk-crate2nix.nix {
inherit pkgs stdenv lib symlinkJoin makeWrapper nix cargo libsecret
nix-prefetch-git release rootCrate;
}
================================================
FILE: crate2nix/deny.toml
================================================
# This template contains all of the possible sections and their default values
# Note that all fields that take a lint level have these possible values:
# * deny - An error will be produced and the check will fail
# * warn - A warning will be produced, but the check will not fail
# * allow - No warning or error will be produced, though in some cases a note
# will be
# The values provided in this template are the default values that will be used
# when any section or field is not specified in your own configuration
# If 1 or more target triples (and optionally, target_features) are specified,
# only the specified targets will be checked when running `cargo deny check`.
# This means, if a particular package is only ever used as a target specific
# dependency, such as, for example, the `nix` crate only being used via the
# `target_family = "unix"` configuration, that only having windows targets in
# this list would mean the nix crate, as well as any of its exclusive
# dependencies not shared by any other crates, would be ignored, as the target
# list here is effectively saying which targets you are building for.
targets = [
# The triple can be any string, but only the target triples built in to
# rustc (as of 1.40) can be checked against actual config expressions
#{ triple = "x86_64-unknown-linux-musl" },
# You can also specify which target_features you promise are enabled for a
# particular target. target_features are currently not validated against
# the actual valid features supported by the target architecture.
#{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
]
# This section is considered when running `cargo deny check advisories`
# More documentation for the advisories section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
[advisories]
# The path where the advisory database is cloned/fetched into
db-path = "~/.cargo/advisory-db"
# The url of the advisory database to use
db-url = "https://github.com/rustsec/advisory-db"
# The lint level for security vulnerabilities
vulnerability = "deny"
# The lint level for unmaintained crates
unmaintained = "warn"
# The lint level for crates that have been yanked from their source registry
yanked = "warn"
# The lint level for crates with security notices. Note that as of
# 2019-12-17 there are no security notice advisories in
# https://github.com/rustsec/advisory-db
notice = "warn"
# A list of advisory IDs to ignore. Note that ignored advisories will still
# output a note when they are encountered.
ignore = [
#"RUSTSEC-0000-0000",
]
# Threshold for security vulnerabilities, any vulnerability with a CVSS score
# lower than the range specified will be ignored. Note that ignored advisories
# will still output a note when they are encountered.
# * None - CVSS Score 0.0
# * Low - CVSS Score 0.1 - 3.9
# * Medium - CVSS Score 4.0 - 6.9
# * High - CVSS Score 7.0 - 8.9
# * Critical - CVSS Score 9.0 - 10.0
#severity-threshold =
# This section is considered when running `cargo deny check licenses`
# More documentation for the licenses section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
[licenses]
# The lint level for crates which do not have a detectable license
unlicensed = "deny"
# List of explictly allowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
allow = [
"MIT",
"Apache-2.0",
"BSD-3-Clause",
"ISC",
#"Apache-2.0 WITH LLVM-exception",
]
# List of explictly disallowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
deny = [
#"Nokia",
]
# Lint level for licenses considered copyleft
copyleft = "warn"
# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
# * both - The license will be approved if it is both OSI-approved *AND* FSF
# * either - The license will be approved if it is either OSI-approved *OR* FSF
# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
# * neither - This predicate is ignored and the default lint level is used
allow-osi-fsf-free = "neither"
# Lint level used when no other predicates are matched
# 1. License isn't in the allow or deny lists
# 2. License isn't copyleft
# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
default = "deny"
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the
# canonical license text of a valid SPDX license file.
# [possible values: any between 0.0 and 1.0].
confidence-threshold = 0.8
# Allow 1 or more licenses on a per-crate basis, so that particular licenses
# aren't accepted for every possible crate as with the normal allow list
exceptions = [
# Each entry is the crate and version constraint, and its specific allow
# list
#{ allow = ["Zlib"], name = "adler32", version = "*" },
]
# Some crates don't have (easily) machine readable licensing information,
# adding a clarification entry for it allows you to manually specify the
# licensing information
#[[licenses.clarify]]
# The name of the crate the clarification applies to
#name = "ring"
# THe optional version constraint for the crate
#version = "*"
# The SPDX expression for the license requirements of the crate
#expression = "MIT AND ISC AND OpenSSL"
# One or more files in the crate's source used as the "source of truth" for
# the license expression. If the contents match, the clarification will be used
# when running the license check, otherwise the clarification will be ignored
# and the crate will be checked normally, which may produce warnings or errors
# depending on the rest of your configuration
#license-files = [
# Each entry is a crate relative path, and the (opaque) hash of its contents
#{ path = "LICENSE", hash = 0xbd0eed23 }
#]
[licenses.private]
# If true, ignores workspace crates that aren't published, or are only
# published to private registries
ignore = false
# One or more private registries that you might publish crates to, if a crate
# is only published to private registries, and ignore is true, the crate will
# not have its license(s) checked
registries = [
#"https://sekretz.com/registry
]
# This section is considered when running `cargo deny check bans`.
# More documentation about the 'bans' section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
[bans]
# Lint level for when multiple versions of the same crate are detected
multiple-versions = "warn"
# The graph highlighting used when creating dotgraphs for crates
# with multiple versions
# * lowest-version - The path to the lowest versioned duplicate is highlighted
# * simplest-path - The path to the version with the fewest edges is highlighted
# * all - Both lowest-version and simplest-path are used
highlight = "all"
# List of crates that are allowed. Use with care!
allow = [
#{ name = "ansi_term", version = "=0.11.0" },
]
# List of crates to deny
deny = [
# Each entry the name of a crate and a version range. If version is
# not specified, all versions will be matched.
#{ name = "ansi_term", version = "=0.11.0" },
]
# Certain crates/versions that will be skipped when doing duplicate detection.
skip = [
#{ name = "ansi_term", version = "=0.11.0" },
]
# Similarly to `skip` allows you to skip certain crates during duplicate
# detection. Unlike skip, it also includes the entire tree of transitive
# dependencies starting at the specified crate, up to a certain depth, which is
# by default infinite
skip-tree = [
#{ name = "ansi_term", version = "=0.11.0", depth = 20 },
]
# This section is considered when running `cargo deny check sources`.
# More documentation about the 'sources' section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
[sources]
# Lint level for what to happen when a crate from a crate registry that is not
# in the allow list is encountered
unknown-registry = "warn"
# Lint level for what to happen when a crate from a git repository that is not
# in the allow list is encountered
unknown-git = "warn"
# List of URLs for allowed crate registries. Defaults to the crates.io index
# if not specified. If it is specified but empty, no registries are allowed.
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
# List of URLs for allowed Git repositories
allow-git = []
================================================
FILE: crate2nix/flake-module.nix
================================================
{ self, inputs, lib, ... }: {
flake.overlays.default = final: prev: {
crate2nix = prev.callPackage ./default.nix { };
};
perSystem =
{ pkgs
, system
, ...
}@perSystem: {
# imports = [
# inputs.pre-commit-hooks.flakeModule
# ];
config.devshells.default = {
imports = [
"${inputs.devshell}/extra/language/c.nix"
"${inputs.devshell}/extra/language/rust.nix"
];
packages = with pkgs; [
rust-analyzer
clippy
rustc
rustfmt
];
commands = with pkgs; [
{ package = cargo; category = "rust"; }
];
language.c = {
libraries = lib.optional pkgs.stdenv.isDarwin pkgs.libiconv;
};
};
config.pre-commit = {
settings.settings.rust.cargoManifestPath = "crate2nix/Cargo.toml";
settings.hooks = {
# rust
rustfmt.enable = true;
# clippy.enable = true;
};
};
config.packages.default = pkgs.callPackage ./default.nix { };
config.packages.crate2nix-from-json = pkgs.callPackage ./default-json.nix { };
config.checks =
let
# Note: This uses the build of the nix-test binary using the stable nixpkgs/crate2nix.
# The "unstable" build is tested in the tests.nix checks.
nixTestRunner = import "${self}/nix/nix-test-runner" { inherit system; };
in
{
unit-tests = pkgs.callPackage ./templates/nix/crate2nix/tests/run.nix {
inherit nixTestRunner;
};
} // (pkgs.callPackage ../tests.nix { }).checks;
};
}
================================================
FILE: crate2nix/mk-crate2nix.nix
================================================
# Shared wrapper logic for the crate2nix binary.
# Takes the raw rootCrate derivation and wraps it with PATH, completions, etc.
{ pkgs ? (
import (builtins.fetchTree (import ../nix/flakeInput.nix "nixpkgs")) { }
)
, stdenv ? pkgs.stdenv
, lib ? pkgs.lib
, symlinkJoin ? pkgs.symlinkJoin
, makeWrapper ? pkgs.makeWrapper
, nix ? pkgs.nix
, cargo ? pkgs.cargo
, libsecret ? pkgs.libsecret
, nix-prefetch-git ? pkgs.nix-prefetch-git
, release ? true
# The raw rootCrate.build derivation to wrap.
, rootCrate
}:
let
crate2nix = rootCrate.overrideAttrs (attrs: {
postInstall = lib.optionalString stdenv.isLinux ''
patchelf --add-needed ${libsecret}/lib/libsecret-1.so.0 $out/bin/crate2nix
'';
});
set_templates = if release then "" else "--set TEMPLATES_DIR ${./templates}";
in
symlinkJoin {
name = crate2nix.name;
paths = [ crate2nix ];
buildInputs = [ makeWrapper cargo ];
meta = {
description = "Nix build file generator for rust crates.";
longDescription = ''
Crate2nix generates nix files from Cargo.toml/lock files
so that you can build every crate individually in a nix sandbox.
'';
homepage = "https://github.com/nix-community/crate2nix";
license = lib.licenses.asl20;
maintainers = [
{
github = "kolloch";
githubId = 339354;
name = "Peter Kolloch";
}
lib.maintainers.andir
lib.maintainers.domenkozar
];
mainProgram = "crate2nix";
platforms = lib.platforms.all;
};
postBuild = ''
# Fallback to built dependencies for cargo and nix-prefetch-url
wrapProgram $out/bin/crate2nix ${set_templates}\
--suffix PATH ":" ${lib.makeBinPath [ cargo nix nix-prefetch-git ]}
rm -rf $out/lib $out/bin/crate2nix.d
mkdir -p \
$out/share/bash-completion/completions \
$out/share/zsh/vendor-completions
$out/bin/crate2nix completions -s 'bash' -o $out/share/bash-completion/completions
$out/bin/crate2nix completions -s 'zsh' -o $out/share/zsh/vendor-completions
'';
}
================================================
FILE: crate2nix/rustfmt.toml
================================================
edition = "2018"
reorder_imports = true
# merge_imports = true
================================================
FILE: crate2nix/src/command.rs
================================================
//! Utilities for dealing with spawned commands.
use anyhow::{bail, format_err, Error};
use std::process::{Child, Stdio};
use std::thread;
use std::{
io::{BufRead, Read},
io::{BufReader, Cursor},
sync::mpsc,
};
/// Runs the given command with output capturing.
///
/// The output will be printed indented if and only if the command does not
/// return succesfully.
pub fn run(caption: &str, command: &mut std::process::Command) -> Result<(), Error> {
eprint!("{}: ", caption);
let mut spawned: Child = command
.stdin(Stdio::null())
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.spawn()
.map_err(|e| format_err!("while spawning {:?}: {}", command, e))?;
let (sender, receiver) = mpsc::channel();
pass_through(spawned.stdout.take().expect("stdout"), sender.clone());
pass_through(spawned.stderr.take().expect("stderr"), sender);
let mut out = Vec::::new();
while let Ok(buf) = receiver.recv() {
out.extend(buf.iter());
}
let status = spawned
.wait()
.map_err(|e| format_err!("while waiting for the {:?} to finish: {}", command, e))?;
if status.success() {
eprintln!("done.");
return Ok(());
}
eprintln!();
eprintln!(" {:?}", command);
let line_reader = BufReader::new(Cursor::new(out));
for line in line_reader.lines() {
println!(
" {}",
line.map_err(|e| format_err!("while processing output lines: {}", e))?
);
}
bail!(
"{:?}\n=> exited with: {}",
command,
status.code().unwrap_or(-1)
);
}
fn pass_through(mut read: impl Read + Send + 'static, sender: mpsc::Sender>) {
thread::spawn(move || {
let mut buf = [0; 4096];
while let Ok(n) = read.read(&mut buf) {
if n == 0 {
break;
}
if sender.send(Vec::from(&buf[..n])).is_err() {
break;
}
}
});
}
================================================
FILE: crate2nix/src/config.rs
================================================
//! Managing the `crate2nix.json` config.
use anyhow::{Context, Error};
use serde::{Deserialize, Serialize};
use std::{
collections::BTreeMap,
fmt::Display,
fs::File,
io::{BufReader, BufWriter},
path::Path,
};
impl Config {
/// Read config from path.
pub fn read_from_or_default(path: &Path) -> Result {
if !path.exists() {
return Ok(Config::default());
}
let file = File::open(path).context(format!("while opening {}", path.to_string_lossy()))?;
let reader = BufReader::new(file);
serde_json::from_reader(reader).context(format!(
"while deserializing config: {}",
path.to_string_lossy()
))
}
/// Write config to path.
pub fn write_to(&self, path: &Path) -> Result<(), Error> {
let file =
File::create(path).context(format!("while opening {}", path.to_string_lossy()))?;
let writer = BufWriter::new(file);
Ok(serde_json::to_writer_pretty(writer, self)?)
}
}
/// The `crate2nix.json` config data.
#[derive(Debug, Default, Serialize, Deserialize)]
pub struct Config {
/// Out of tree sources.
pub sources: BTreeMap,
}
impl Config {
/// Add or replace a source. Returns the old source if there was one.
pub fn upsert_source(
&mut self,
explicit_name: Option,
source: Source,
) -> Option {
let name = explicit_name
.or_else(|| source.name().map(|s| s.to_string()))
.expect("No name given");
self.sources.insert(name, source)
}
/// Prints all sources to stdout.
pub fn print_sources(&self) {
if self.sources.is_empty() {
eprintln!("No sources configured.\n");
return;
}
let max_len = self
.sources
.keys()
.map(|n| n.len())
.max()
.unwrap_or_default();
for (name, source) in &self.sources {
println!("{:width$} {}", name, source, width = max_len);
println!();
println!(
"{:width$} crate2nix source add {}",
"",
source.as_command(name),
width = max_len
);
println!();
}
}
}
/// An out of tree source.
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(tag = "type")]
pub enum Source {
/// Get the source from crates.io.
CratesIo {
/// The crate name.
name: String,
/// The exact crate version to fetch.
version: semver::Version,
/// The sha256 hash of the source.
sha256: String,
},
/// Get the source from crates.io.
Registry {
/// The registry's URL
registry: String,
/// The crate name.
name: String,
/// The exact crate version to fetch.
version: semver::Version,
/// The sha256 hash of the source.
sha256: String,
},
/// Get the source from git.
Git {
/// The URL of the git repository.
///
/// E.g. https://github.com/kolloch/crate2nix.git
url: url::Url,
/// The revision hash.
rev: String,
/// The sha256 of the fetched result.
sha256: String,
},
/// Get the source from a nix expression.
Nix {
/// The nixfile to include.
#[serde(flatten)]
file: NixFile,
/// A Nix attribute path which will be resolved against the file.
#[serde(skip_serializing_if = "Option::is_none")]
attr: Option,
},
}
/// A nix file path which is either included by `import` or `callPackage`.
#[derive(Debug, Serialize, Deserialize, PartialEq, Clone, Eq, Hash)]
pub enum NixFile {
/// A file path that should be imported.
#[serde(rename = "import")]
Import(String),
/// A file path the should be included by `pkgs.callPackage`.
#[serde(rename = "package")]
Package(String),
}
impl Display for NixFile {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Import(path) => write!(f, "import {}", path),
Self::Package(path) => write!(f, "pkgs.callPackage {} {{}}", path),
}
}
}
impl NixFile {
/// Returns the chosen file option as CLI string.
pub fn as_command(&self) -> String {
match self {
Self::Import(path) => format!("--import '{}'", path),
Self::Package(path) => format!("--package '{}'", path),
}
}
}
impl Source {
/// The name of the source.
pub fn name(&self) -> Option<&str> {
match self {
Source::CratesIo { name, .. } => Some(name),
Source::Git { url, .. } => {
let path = url.path();
let after_last_slash = path.split('/').next_back().unwrap_or(path);
let without_dot_git = after_last_slash
.strip_suffix(".git")
.unwrap_or(after_last_slash);
Some(without_dot_git)
}
Source::Nix {
attr: Some(attr), ..
} => attr.split('.').next_back().or(if attr.trim().is_empty() {
None
} else {
Some(attr.trim())
}),
_ => None,
}
}
}
impl Display for Source {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Source::CratesIo {
name,
version,
sha256,
} => write!(f, "{} {} from crates.io: {}", name, version, sha256),
Source::Registry {
name,
version,
sha256,
registry,
..
} => write!(f, "{} {} from {}: {}", name, version, registry, sha256),
Source::Git { url, rev, sha256 } => write!(f, "{}#{} via git: {}", url, rev, sha256),
Source::Nix { file, attr: None } => write!(f, "{}", file),
Source::Nix {
file,
attr: Some(attr),
} => write!(f, "({}).{}", file, attr),
}
}
}
impl Source {
/// Returns a CLI string to reproduce this source.
pub fn as_command(&self, name: &str) -> String {
match self {
Source::CratesIo {
name: crate_name,
version,
..
} => format!("cratesIo --name '{}' '{}' '{}'", name, crate_name, version),
Source::Registry {
name: crate_name,
version,
registry,
..
} => format!(
"registry --registry '{}' --name '{}' '{}' '{}'",
registry, name, crate_name, version
),
Source::Git { url, rev, .. } => {
format!("git --name '{}' '{}' --rev {}", name, url, rev)
}
Source::Nix { file, attr: None } => {
format!("nix --name '{}' {}", name, file.as_command())
}
Source::Nix {
file,
attr: Some(attr),
} => format!("nix --name '{}' {} '{}'", name, file.as_command(), attr),
}
}
}
================================================
FILE: crate2nix/src/json_output.rs
================================================
//! Pre-resolved JSON output format.
//!
//! Converts BuildInfo to a flat JSON structure with dependencies already
//! filtered by target platform and optional dep activation. This eliminates
//! the O(n*m) feature resolution that the Nix template output requires at
//! eval time.
use std::collections::{BTreeMap, HashSet};
use serde::{Deserialize, Serialize};
use crate::resolve::{ResolvedDependency, ResolvedSource};
use crate::BuildInfo;
/// The pre-resolved workspace, ready for consumption by a thin Nix wrapper.
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ResolvedWorkspace {
/// Generator marker so we can identify the file and avoid accidental overwrites.
/// Always set to "@generated by crate2nix".
pub generator: String,
/// Package ID of the root crate, or null for pure workspaces.
pub root: Option,
/// Workspace member name → packageId.
pub workspace_members: BTreeMap,
/// Package ID → resolved crate info.
pub crates: BTreeMap,
}
/// A single crate with pre-resolved dependencies.
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ResolvedCrate {
/// Crate name (as used in Cargo.toml).
pub crate_name: String,
/// Crate version.
pub version: String,
/// Rust edition (e.g. "2021").
pub edition: String,
/// SHA-256 hash for crates.io or git sources.
#[serde(skip_serializing_if = "Option::is_none")]
pub sha256: Option,
/// Source information (crates-io, local, git).
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option,
/// Normal dependencies, already filtered by platform and optional dep activation.
#[serde(skip_serializing_if = "Vec::is_empty")]
pub dependencies: Vec,
/// Build dependencies, already filtered by platform and optional dep activation.
#[serde(skip_serializing_if = "Vec::is_empty")]
pub build_dependencies: Vec,
/// Dev dependencies (for tests/benches/examples). Only populated for
/// workspace members since transitive deps' tests are never built.
#[serde(skip_serializing_if = "Vec::is_empty", default)]
pub dev_dependencies: Vec,
/// The resolved features for this crate.
#[serde(skip_serializing_if = "Vec::is_empty")]
pub resolved_default_features: Vec,
/// Whether this is a proc-macro crate.
#[serde(skip_serializing_if = "std::ops::Not::not")]
pub proc_macro: bool,
/// Build script path (relative to crate root), if non-default.
#[serde(skip_serializing_if = "Option::is_none")]
pub build: Option,
/// Library source path (relative to crate root), if non-default.
#[serde(skip_serializing_if = "Option::is_none")]
pub lib_path: Option,
/// Library name, if different from crate name.
#[serde(skip_serializing_if = "Option::is_none")]
pub lib_name: Option,
/// Binary targets.
#[serde(skip_serializing_if = "Vec::is_empty")]
pub crate_bin: Vec,
/// Library crate types (e.g. \["lib"\], \["cdylib", "rlib"\]).
#[serde(skip_serializing_if = "Vec::is_empty")]
pub lib_crate_types: Vec,
/// Native library this crate links to (the `links` field in Cargo.toml).
#[serde(skip_serializing_if = "Option::is_none")]
pub links: Option,
/// Crate authors.
#[serde(skip_serializing_if = "Vec::is_empty")]
pub authors: Vec,
}
/// A resolved dependency reference.
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DepInfo {
/// Package name of the dependency.
pub name: String,
/// Shortened package ID of the resolved dependency.
pub package_id: String,
/// Rename (extern crate name), if different from package name.
#[serde(skip_serializing_if = "Option::is_none")]
pub rename: Option,
/// Platform condition string (e.g. `cfg(unix)`, `x86_64-unknown-linux-gnu`).
/// Absent for unconditional deps.
#[serde(skip_serializing_if = "Option::is_none")]
pub target: Option,
}
/// Source type for a crate.
#[derive(Debug, Serialize, Deserialize)]
#[serde(tag = "type")]
#[serde(rename_all = "kebab-case")]
pub enum SourceInfo {
/// From crates.io.
CratesIo,
/// Local path dependency.
Local {
/// Relative or absolute path to the crate directory.
path: String,
},
/// Git dependency.
Git {
/// Repository URL.
url: String,
/// Git revision.
rev: String,
},
}
/// A binary target within a crate.
#[derive(Debug, Serialize, Deserialize)]
pub struct BinTarget {
/// Binary name.
pub name: String,
/// Source path relative to crate root.
pub path: String,
}
/// Normalize a crate name (hyphens → underscores) as Cargo does.
fn normalize_name(name: &str) -> String {
name.replace('-', "_")
}
/// Expand resolved features through the feature map to find all activated
/// optional deps.
///
/// Returns a set of **effective dep names** — the rename if present, otherwise
/// the package name. This handles:
/// - `dep:foo` syntax: directly activates the dep
/// - `dep_name/feature` syntax: activates the dep
/// - Implicit activation: feature name matching an optional dep's effective name
/// - Transitive expansion through the feature map
fn activated_optional_deps(
features_map: &BTreeMap>,
dependencies: &[&ResolvedDependency],
resolved_features: &[String],
) -> HashSet {
// Collect effective names of all optional deps.
let optional_dep_effective_names: HashSet = dependencies
.iter()
.filter(|d| d.optional)
.map(|d| {
d.rename
.as_ref()
.map(|r| normalize_name(r))
.unwrap_or_else(|| normalize_name(&d.name))
})
.collect();
let mut seen = HashSet::new();
let mut queue: Vec = resolved_features.to_vec();
let mut activated = HashSet::new();
while let Some(feat) = queue.pop() {
if !seen.insert(feat.clone()) {
continue;
}
// "dep:foo" directly activates optional dep "foo" (effective name)
if let Some(dep_name) = feat.strip_prefix("dep:") {
activated.insert(normalize_name(dep_name));
continue;
}
// "dep_name/feature" syntax: activates the dep
if let Some((dep_part, _feature_part)) = feat.split_once('/') {
let normalized = normalize_name(dep_part);
if optional_dep_effective_names.contains(&normalized) {
activated.insert(normalized);
}
}
// Feature with same name as an optional dep implicitly activates it
let normalized_feat = normalize_name(&feat);
if optional_dep_effective_names.contains(&normalized_feat) {
activated.insert(normalized_feat);
}
// Follow feature rules
if let Some(rules) = features_map.get(&feat) {
for rule in rules {
queue.push(rule.clone());
}
}
}
activated
}
/// Filter inactive optional deps and serialize platform conditions as strings.
///
/// Optional deps that aren't activated by resolved features are removed.
/// Platform conditions are preserved as strings for the Nix consumer to
/// evaluate cheaply at eval time.
fn resolve_deps(deps: &[ResolvedDependency], activated: &HashSet) -> Vec {
deps.iter()
.filter(|dep| {
// Remove inactive optional deps (the expensive resolution is already done)
if dep.optional {
let effective = dep
.rename
.as_ref()
.map(|r| normalize_name(r))
.unwrap_or_else(|| normalize_name(&dep.name));
if !activated.contains(&effective) {
return false;
}
}
true
})
.map(|dep| DepInfo {
name: dep.name.clone(),
package_id: dep.package_id.repr.clone(),
rename: dep.rename.as_ref().map(|r| normalize_name(r)),
target: dep.target.as_ref().map(|p| p.to_string()),
})
.collect()
}
fn convert_source(source: &ResolvedSource, workspace_root: &str) -> Option {
match source {
ResolvedSource::CratesIo(_) => Some(SourceInfo::CratesIo),
ResolvedSource::Registry(_) => {
// TODO: handle non-crates.io registries
Some(SourceInfo::CratesIo)
}
ResolvedSource::LocalDirectory(local) => {
let abs = local.to_string();
let rel = abs
.strip_prefix(workspace_root)
.and_then(|s| s.strip_prefix('/'))
.unwrap_or(&abs);
// Strip leading "./" if present
let rel = rel.strip_prefix("./").unwrap_or(rel);
// Root workspace member has empty relative path, use "."
let path = if rel.is_empty() { "." } else { rel };
Some(SourceInfo::Local {
path: path.to_string(),
})
}
ResolvedSource::Git(git) => Some(SourceInfo::Git {
url: git.url.to_string(),
rev: git.rev.clone(),
}),
ResolvedSource::Nix(_) => None,
}
}
/// Convert a BuildInfo into a pre-resolved workspace JSON.
///
/// Feature expansion and optional dep activation are resolved in Rust.
/// Platform conditions are preserved as strings so the output is
/// target-independent — the Nix consumer filters by `stdenv.hostPlatform`.
///
/// Local source paths are made relative to the workspace root so the
/// consumer can reconstruct them as `src + "/${relativePath}"`.
pub fn to_resolved_workspace(build_info: &BuildInfo) -> ResolvedWorkspace {
let workspace_root = build_info.workspace_root.clone().unwrap_or_default();
let mut crates = BTreeMap::new();
for crate_deriv in &build_info.crates {
let id = &crate_deriv.package_id.repr;
// All deps (normal + build + dev) for optional dep activation
let all_deps: Vec<&ResolvedDependency> = crate_deriv
.dependencies
.iter()
.chain(crate_deriv.build_dependencies.iter())
.chain(crate_deriv.dev_dependencies.iter())
.collect();
// Compute activated optional deps from resolved features
let activated = activated_optional_deps(
&crate_deriv.features,
&all_deps,
&crate_deriv.resolved_default_features,
);
let dependencies = resolve_deps(&crate_deriv.dependencies, &activated);
let build_dependencies = resolve_deps(&crate_deriv.build_dependencies, &activated);
// Only emit dev-deps for workspace members — transitive deps' tests
// are never built, so their dev-deps would just bloat the JSON.
let dev_dependencies = if crate_deriv.is_root_or_workspace_member {
resolve_deps(&crate_deriv.dev_dependencies, &activated)
} else {
vec![]
};
let lib_name = crate_deriv.lib.as_ref().map(|l| normalize_name(&l.name));
crates.insert(
id.clone(),
ResolvedCrate {
crate_name: crate_deriv.crate_name.clone(),
version: crate_deriv.version.to_string(),
edition: crate_deriv.edition.clone(),
sha256: crate_deriv.source.sha256().cloned(),
source: convert_source(&crate_deriv.source, &workspace_root),
dependencies,
build_dependencies,
dev_dependencies,
resolved_default_features: crate_deriv.resolved_default_features.clone(),
proc_macro: crate_deriv.proc_macro,
build: crate_deriv.build.as_ref().and_then(|b| {
let s = b.src_path.to_string_lossy().to_string();
if s == "build.rs" {
None
} else {
Some(s)
}
}),
lib_path: crate_deriv.lib.as_ref().and_then(|l| {
let s = l.src_path.to_string_lossy().to_string();
if s == "src/lib.rs" {
None
} else {
Some(s)
}
}),
lib_name: lib_name.as_ref().and_then(|n| {
if *n == normalize_name(&crate_deriv.crate_name) {
None
} else {
Some(n.clone())
}
}),
crate_bin: if crate_deriv.is_root_or_workspace_member {
crate_deriv
.binaries
.iter()
.map(|b| BinTarget {
name: b.name.clone(),
path: b.src_path.to_string_lossy().to_string(),
})
.collect()
} else {
vec![]
},
lib_crate_types: crate_deriv.lib_crate_types.clone(),
links: crate_deriv.links.clone(),
authors: crate_deriv.authors.clone(),
},
);
}
let workspace_members = build_info
.workspace_members
.iter()
.map(|(name, id)| (name.clone(), id.repr.clone()))
.collect();
let root = build_info
.root_package_id
.as_ref()
.map(|id| id.repr.clone());
ResolvedWorkspace {
generator: "@generated by crate2nix".to_string(),
root,
workspace_members,
crates,
}
}
#[cfg(test)]
mod tests {
use super::*;
use cargo_platform::{Cfg, CfgExpr, Platform};
#[test]
fn dep_syntax_activates_optional_dep() {
let features =
BTreeMap::from([("default".to_string(), vec!["dep:libbz2-rs-sys".to_string()])]);
let dep = ResolvedDependency {
name: "libbz2-rs-sys".to_string(),
rename: None,
package_id: cargo_metadata::PackageId {
repr: "libbz2-rs-sys 0.1.0".to_string(),
},
target: None,
optional: true,
uses_default_features: true,
features: vec![],
};
let deps = vec![&dep];
let activated = activated_optional_deps(&features, &deps, &["default".to_string()]);
assert!(activated.contains("libbz2_rs_sys"), "got: {activated:?}");
}
#[test]
fn renamed_optional_dep_activated_by_effective_name() {
let features = BTreeMap::from([(
"rustls-0_23".to_string(),
vec!["dep:tokio-rustls-026".to_string()],
)]);
let dep = ResolvedDependency {
name: "tokio-rustls".to_string(),
rename: Some("tokio-rustls-026".to_string()),
package_id: cargo_metadata::PackageId {
repr: "tokio-rustls 0.26.0".to_string(),
},
target: None,
optional: true,
uses_default_features: true,
features: vec![],
};
let deps = vec![&dep];
let activated = activated_optional_deps(&features, &deps, &["rustls-0_23".to_string()]);
assert!(activated.contains("tokio_rustls_026"), "got: {activated:?}");
}
#[test]
fn only_referenced_rename_activated_among_same_package() {
let features = BTreeMap::from([
(
"rustls-0_20".to_string(),
vec!["dep:tokio-rustls-023".to_string()],
),
(
"rustls-0_23".to_string(),
vec!["dep:tokio-rustls-026".to_string()],
),
]);
let dep1 = ResolvedDependency {
name: "tokio-rustls".to_string(),
rename: Some("tokio-rustls-023".to_string()),
package_id: cargo_metadata::PackageId {
repr: "tokio-rustls 0.23.0".to_string(),
},
target: None,
optional: true,
uses_default_features: true,
features: vec![],
};
let dep2 = ResolvedDependency {
name: "tokio-rustls".to_string(),
rename: Some("tokio-rustls-026".to_string()),
package_id: cargo_metadata::PackageId {
repr: "tokio-rustls 0.26.0".to_string(),
},
target: None,
optional: true,
uses_default_features: true,
features: vec![],
};
let deps = vec![&dep1, &dep2];
let activated = activated_optional_deps(&features, &deps, &["rustls-0_23".to_string()]);
assert!(
activated.contains("tokio_rustls_026"),
"026 should be activated"
);
assert!(
!activated.contains("tokio_rustls_023"),
"023 should NOT be activated"
);
}
#[test]
fn platform_deps_preserved_with_target_string() {
let activated = HashSet::new();
let deps = vec![
ResolvedDependency {
name: "winapi".to_string(),
rename: None,
package_id: cargo_metadata::PackageId {
repr: "winapi 0.3.0".to_string(),
},
target: Some(Platform::Cfg(CfgExpr::Value(Cfg::KeyPair(
"target_os".to_string(),
"windows".to_string(),
)))),
optional: false,
uses_default_features: true,
features: vec![],
},
ResolvedDependency {
name: "libc".to_string(),
rename: None,
package_id: cargo_metadata::PackageId {
repr: "libc 0.2.0".to_string(),
},
target: Some(Platform::Cfg(CfgExpr::Value(Cfg::Name("unix".to_string())))),
optional: false,
uses_default_features: true,
features: vec![],
},
];
let result = resolve_deps(&deps, &activated);
// Both deps kept — platform filtering is done by the Nix consumer
assert_eq!(result.len(), 2, "got: {result:?}");
assert_eq!(
result[0].target.as_deref(),
Some("cfg(target_os = \"windows\")")
);
assert_eq!(result[1].target.as_deref(), Some("cfg(unix)"));
}
}
================================================
FILE: crate2nix/src/lib.rs
================================================
//! # crate2nix
//!
//! Internal library for the crate2nix binary. This is not meant to be used separately, I just enjoy
//! writing doc tests ;)
//!
//! [Repository](https://github.com/kolloch/crate2nix)
#![forbid(unsafe_code)]
#![deny(missing_docs)]
use std::env;
use std::path::PathBuf;
use std::{
collections::{BTreeMap, HashMap, HashSet, VecDeque},
path::Path,
};
use anyhow::format_err;
use anyhow::Context;
use anyhow::Error;
use cargo_metadata::Metadata;
use cargo_metadata::PackageId;
use metadata::MergedMetadata;
use serde::Deserialize;
use serde::Serialize;
use crate::metadata::IndexedMetadata;
use crate::resolve::{CrateDerivation, ResolvedSource};
use itertools::Itertools;
use resolve::CratesIoSource;
mod command;
pub mod config;
pub mod json_output;
mod lock;
mod metadata;
pub mod nix_build;
mod prefetch;
pub mod render;
mod resolve;
pub mod sources;
#[cfg(test)]
pub mod test;
pub mod util;
/// The resolved build info and the input for rendering the build.nix.tera template.
#[derive(Debug, Deserialize, Serialize)]
pub struct BuildInfo {
/// The package ID of the root crate.
pub root_package_id: Option,
/// Workspaces member package IDs by package names.
pub workspace_members: BTreeMap,
/// Registries used by the crates.
pub registries: BTreeMap,
/// Build info for all crates needed for this build.
pub crates: Vec,
/// For convenience include the source for tests.
pub indexed_metadata: IndexedMetadata,
/// The generation configuration.
pub info: GenerateInfo,
/// The generation configuration.
pub config: GenerateConfig,
/// Workspace root directory path (from cargo metadata).
pub workspace_root: Option,
}
impl BuildInfo {
/// Return the `NixBuildInfo` data ready for rendering the nix build file.
pub fn for_config(info: &GenerateInfo, config: &GenerateConfig) -> Result {
let merged = {
let mut metadatas = Vec::new();
for cargo_toml in &config.cargo_toml {
metadatas.push(cargo_metadata(config, cargo_toml)?);
}
metadata::MergedMetadata::merge(metadatas)?
};
let indexed_metadata = IndexedMetadata::new_from_merged(&merged).map_err(|e| {
format_err!(
"while indexing metadata for {:#?}: {}",
config
.cargo_toml
.iter()
.map(|p| p.to_string_lossy())
.collect::>(),
e
)
})?;
let mut default_nix = BuildInfo::new(info, config, indexed_metadata)?;
default_nix.prune_unneeded_crates();
prefetch_and_fill_crates_sha256(config, &merged, &mut default_nix)?;
prefetch_and_fill_registries(config, &mut default_nix)?;
Ok(default_nix)
}
fn prune_unneeded_crates(&mut self) {
let mut queue: VecDeque<&PackageId> = self
.root_package_id
.iter()
.chain(self.workspace_members.values())
.collect();
let mut reachable = HashSet::new();
let indexed_crates: BTreeMap<_, _> =
self.crates.iter().map(|c| (&c.package_id, c)).collect();
while let Some(next_package_id) = queue.pop_back() {
if !reachable.insert(next_package_id.clone()) {
continue;
}
queue.extend(
indexed_crates
.get(next_package_id)
.iter()
.flat_map(|c| {
c.dependencies
.iter()
.chain(c.build_dependencies.iter())
.chain(c.dev_dependencies.iter())
})
.map(|d| &d.package_id),
);
}
self.crates.retain(|c| reachable.contains(&c.package_id));
}
fn new(
info: &GenerateInfo,
config: &GenerateConfig,
metadata: IndexedMetadata,
) -> Result {
let crate2nix_json = crate::config::Config::read_from_or_default(
&config
.crate_hashes_json
.parent()
.expect("crate-hashes.json has parent dir")
.join("crate2nix.json"),
)?;
Ok(BuildInfo {
root_package_id: metadata.root.clone(),
workspace_members: metadata
.workspace_members
.iter()
.flat_map(|pkg_id| {
metadata
.pkgs_by_id
.get(pkg_id)
.map(|pkg| (pkg.name.clone(), pkg_id.clone()))
})
.collect(),
registries: BTreeMap::new(),
crates: metadata
.pkgs_by_id
.values()
.map(|package| {
CrateDerivation::resolve(config, &crate2nix_json, &metadata, package)
})
.collect::>()?,
workspace_root: metadata.workspace_root.clone(),
indexed_metadata: metadata,
info: info.clone(),
config: config.clone(),
})
}
}
/// Call `cargo metadata` and return result.
fn cargo_metadata(config: &GenerateConfig, cargo_toml: &Path) -> Result {
let mut cmd = cargo_metadata::MetadataCommand::new();
let mut other_options = config.other_metadata_options.clone();
other_options.push("--locked".into());
cmd.manifest_path(cargo_toml).other_options(&*other_options);
cmd.exec().map_err(|e| {
format_err!(
"while retrieving metadata about {}: {}",
&cargo_toml.to_string_lossy(),
e
)
})
}
/// Prefetch hashes when necessary.
fn prefetch_and_fill_crates_sha256(
config: &GenerateConfig,
merged: &MergedMetadata,
default_nix: &mut BuildInfo,
) -> Result<(), Error> {
let mut from_lock_file: HashMap =
extract_hashes_from_lockfile(config, merged, default_nix)?;
for (_package_id, hash) in from_lock_file.iter_mut() {
let bytes =
hex::decode(&hash).map_err(|e| format_err!("while decoding '{}': {}", hash, e))?;
*hash = nix_base32::to_nix_base32(&bytes);
}
let prefetched = prefetch::prefetch(
config,
&from_lock_file,
&default_nix.crates,
&default_nix.indexed_metadata.id_shortener,
)
.map_err(|e| format_err!("while prefetching crates for calculating sha256: {}", e))?;
for package in default_nix.crates.iter_mut() {
if package.source.sha256().is_none() {
if let Some(hash) = prefetched
.get(
default_nix
.indexed_metadata
.id_shortener
.lengthen_ref(&package.package_id),
)
.or_else(|| from_lock_file.get(&package.package_id))
{
package.source = package.source.with_sha256(hash.clone());
}
}
}
Ok(())
}
/// Prefetch hashes when necessary.
fn prefetch_and_fill_registries(
config: &GenerateConfig,
default_nix: &mut BuildInfo,
) -> Result<(), Error> {
default_nix.registries = prefetch::prefetch_registries(config, &default_nix.crates)
.map_err(|e| format_err!("while prefetching crates for calculating sha256: {}", e))?;
Ok(())
}
fn extract_hashes_from_lockfile(
config: &GenerateConfig,
merged: &MergedMetadata,
default_nix: &mut BuildInfo,
) -> Result, Error> {
if !config.use_cargo_lock_checksums {
return Ok(HashMap::new());
}
let mut hashes: HashMap = HashMap::new();
for cargo_toml in &config.cargo_toml {
let lock_file_path = cargo_toml.parent().unwrap().join("Cargo.lock");
let lock_file = crate::lock::EncodableResolve::load_lock_file(&lock_file_path)?;
lock_file
.get_hashes_by_package_id(merged, &mut hashes)
.context(format!(
"while parsing checksums from Lockfile {}",
&lock_file_path.to_string_lossy()
))?;
}
let hashes_with_shortened_ids: HashMap = hashes
.into_iter()
.map(|(package_id, hash)| {
(
default_nix
.indexed_metadata
.id_shortener
.shorten_owned(package_id),
hash,
)
})
.collect();
let mut missing_hashes = Vec::new();
for package in default_nix.crates.iter_mut().filter(|c| match &c.source {
ResolvedSource::CratesIo(CratesIoSource { sha256, .. }) if sha256.is_none() => {
!hashes_with_shortened_ids.contains_key(&c.package_id)
}
_ => false,
}) {
missing_hashes.push(format!("{} {}", package.crate_name, package.version));
}
if !missing_hashes.is_empty() {
eprintln!(
"Did not find all crates.io hashes in Cargo.lock. Hashes for e.g. {} are missing.\n\
This is probably a bug.",
missing_hashes.iter().take(10).join(", ")
);
}
Ok(hashes_with_shortened_ids)
}
/// Some info about the crate2nix invocation.
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct GenerateInfo {
/// The version of this `crate2nix` instance.
pub crate2nix_version: String,
/// The arguments that were passed to `crate2nix`.
pub crate2nix_arguments: Vec,
}
impl Default for GenerateInfo {
fn default() -> GenerateInfo {
GenerateInfo {
crate2nix_version: env!("CARGO_PKG_VERSION").to_string(),
crate2nix_arguments: env::args().skip(1).collect(),
}
}
}
/// Configuration for the default.nix generation.
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct GenerateConfig {
/// The path to `Cargo.toml`.
pub cargo_toml: Vec,
/// Whether to inspect `Cargo.lock` for checksums so that we do not need to prefetch them.
pub use_cargo_lock_checksums: bool,
/// The path of the generated `Cargo.nix` file.
pub output: PathBuf,
/// The path of the `crate-hashes.json` file which is used to look up hashes and/or store
/// prefetched hashes at.
pub crate_hashes_json: PathBuf,
/// The path of the `registry-hashes.json` file which is used to look up hashes and/or store
/// prefetched hashes at.
pub registry_hashes_json: PathBuf,
/// The nix expression for the nixpkgs path to use.
pub nixpkgs_path: String,
/// Additional arguments to pass to `cargo metadata`.
pub other_metadata_options: Vec,
/// Whether to read a `crate-hashes.json` file.
pub read_crate_hashes: bool,
}
================================================
FILE: crate2nix/src/lock.rs
================================================
//! Code for extracting hashes and more from Cargo.lock
use anyhow::{format_err, Error};
use cargo_metadata::PackageId;
use serde::{de, ser, Deserialize, Serialize};
use std::collections::{BTreeMap, HashMap};
use std::fmt;
use std::path::Path;
use std::str::FromStr;
use crate::metadata::MergedMetadata;
impl EncodableResolve {
pub fn load_lock_file(path: &Path) -> Result {
let config = &std::fs::read_to_string(path)
.map_err(|e| format_err!("while reading lock file {}: {}", path.display(), e))?;
Self::load_lock_string(path, config)
}
pub fn load_lock_string(path: &Path, config: &str) -> Result {
let resolve: toml::Value = toml::from_str(config)
.map_err(|e| format_err!("while parsing toml from {}: {}", path.display(), e))?;
let v: EncodableResolve = resolve
.try_into()
.map_err(|e| format_err!("unexpected format in {}: {}", path.display(), e))?;
Ok(v)
}
pub fn get_hashes_by_package_id(
&self,
metadata: &MergedMetadata,
hashes: &mut HashMap,
) -> Result<(), Error> {
let mut package_id_by_source = HashMap::new();
for p in &metadata.packages {
let Some(ref source) = p.source else {
// local crate
continue;
};
let key = (p.name.as_str(), source.repr.as_str(), p.version.to_string());
package_id_by_source.insert(key, &p.id);
}
for EncodableDependency {
name,
version,
source,
checksum,
..
} in self.package.iter()
{
let Some(source) = source.as_ref() else {
continue;
};
let Some(package_id) =
package_id_by_source.get(&(name.as_str(), source.as_str(), version.clone()))
else {
continue;
};
let checksum = match checksum.as_ref() {
Some(checksum) if checksum == "" => None,
Some(checksum) => Some(checksum),
None => {
// Retrieve legacy checksums.
self.metadata.as_ref().and_then(|metadata| {
let checksum_key = format!("checksum {name} {version} ({source})");
metadata.get(&checksum_key)
})
}
};
if let Some(checksum) = checksum {
hashes.insert((*package_id).clone(), checksum.to_owned());
}
}
Ok(())
}
}
//
// The code below was copied/adjusted from Cargo.
//
/// The `Cargo.lock` structure.
#[derive(Serialize, Deserialize, Debug)]
pub struct EncodableResolve {
package: Vec,
/// `root` is optional to allow backward compatibility.
root: Option,
metadata: Option>,
}
#[derive(Serialize, Deserialize, Debug, PartialOrd, Ord, PartialEq, Eq)]
pub struct EncodableDependency {
name: String,
version: String,
source: Option,
checksum: Option