Generate Nix packages from URLs
Note: It is likely that the generated package will not work without some tweaks, also remember to double check the license and description even if it does work
- Hash prefetching powered by nurl with support for
cargoHashandvendorHash - Dependency inference for Rust, Go, and Python projects
- Interactive prompts with fuzzy tab completions
- License detection
The latest release of nix-init is packaged in nixpkgs and kept up to date on the unstable branches
If you want to use a more recent snapshot of nix-init, it is also available as a
flake. The following command is equivalent to running nix-init --help:
nix run github:nix-community/nix-init -- --helpor if you don't have flakes enabled:
nix run --extra-experimental-features "flakes nix-command" github:nix-community/nix-init -- --helpUsage: nix-init [OPTIONS] [OUTPUT]
Arguments:
[OUTPUT] The path or directory to output the generated file to
Options:
-u, --url <URL> Specify the URL
--rev <REV> Specify the tag or revision
-S, --submodules[=<SUBMODULES>] Always fetch submodules when possible [possible values: true, false]
-V, --version [<VERSION>] Specify the version of the package, or print nix-init version if no arguments are present
--pname <PNAME> Specify the pname
--builder <BUILDER> Specify the builder
--cargo-vendor <CARGO_VENDOR> Specify how the cargo dependencies are vendored [possible values: fetchCargoVendor, importCargoLock]
-y, --overwrite[=<OVERWRITE>] Always overwrite files [possible values: true, false]
--headless Don't prompt for anything (requires --url)
-n, --nixpkgs <NIXPKGS> Path to nixpkgs (in nix)
-C, --commit[=<COMMIT>] Commit the changes if the output path is name-based (RFC 140) [possible values: true, false]
-c, --config <CONFIG> Specify the config file
-h, --help Print help (see more with '--help')
stdenv.mkDerivationandstdenvNoCC.mkDerivationbuildRustPackagebuildPythonApplicationandbuildPythonPackagebuildGoModule
fetchCratefetchFromGitHubfetchFromGitLabfetchFromGiteafetchPypi- All other fetchers supported by nurl are also supported, you just have to manually input the tag/revision of the package
nix-init will try to find nix-init/config.toml under XDG configuration
directories
See CHANGELOG.md